Panda3D
 All Classes Functions Variables Enumerations
sampleClass.cxx
00001 // Filename: sampleClass.cxx
00002 // Created by:  drose (10Jun00)
00003 //
00004 ////////////////////////////////////////////////////////////////////
00005 //
00006 // PANDA 3D SOFTWARE
00007 // Copyright (c) Carnegie Mellon University.  All rights reserved.
00008 //
00009 // All use of this software is subject to the terms of the revised BSD
00010 // license.  You should have received a copy of this license along
00011 // with this source code in a file named "LICENSE."
00012 //
00013 ////////////////////////////////////////////////////////////////////
00014 
00015 #include "sampleClass.h"
00016 
00017 TypeHandle SampleClass::_type_handle;
00018 
00019 ////////////////////////////////////////////////////////////////////
00020 //     Function: SampleClass::Constructor
00021 //       Access: Public
00022 //  Description:
00023 ////////////////////////////////////////////////////////////////////
00024 SampleClass::
00025 SampleClass() {
00026 }
00027 
00028 ////////////////////////////////////////////////////////////////////
00029 //     Function: SampleClass::public_method
00030 //       Access: Public
00031 //  Description: A few sentences describing what public_method is
00032 //               supposed to do and why you'd want to call it.
00033 ////////////////////////////////////////////////////////////////////
00034 int SampleClass::
00035 public_method() {
00036   switch (_private_data_member) {
00037   case NE_case_one:
00038     return 0;
00039 
00040   case NE_case_two:
00041     return _flag;
00042 
00043   default:
00044     return -1;
00045   }
00046 }
00047 
00048 ////////////////////////////////////////////////////////////////////
00049 //     Function: SampleClass::protected_method
00050 //       Access: Protected
00051 //  Description: A few sentences describing what protected_method is
00052 //               supposed to do.
00053 ////////////////////////////////////////////////////////////////////
00054 bool SampleClass::
00055 protected_method() {
00056   if (_flag > 0) {
00057     _flag--;
00058     return false;
00059   } else {
00060     return true;
00061   }
00062 }
00063 
00064 ////////////////////////////////////////////////////////////////////
00065 //     Function: SampleClass::private_method
00066 //       Access: Private
00067 //  Description: A few sentences describing what private_method is
00068 //               supposed to do.
00069 ////////////////////////////////////////////////////////////////////
00070 void SampleClass::
00071 private_method() {
00072 }
 All Classes Functions Variables Enumerations