00001 // Filename: sampleClass.cxx 00002 // Created by: drose (10Jun00) 00003 // 00004 //////////////////////////////////////////////////////////////////// 00005 // 00006 // PANDA 3D SOFTWARE 00007 // Copyright (c) 2001, Disney Enterprises, Inc. All rights reserved 00008 // 00009 // All use of this software is subject to the terms of the Panda 3d 00010 // Software license. You should have received a copy of this license 00011 // along with this source code; you will also find a current copy of 00012 // the license at http://www.panda3d.org/license.txt . 00013 // 00014 // To contact the maintainers of this program write to 00015 // panda3d@yahoogroups.com . 00016 // 00017 //////////////////////////////////////////////////////////////////// 00018 00019 #include "sampleClass.h" 00020 00021 TypeHandle SampleClass::_type_handle; 00022 00023 //////////////////////////////////////////////////////////////////// 00024 // Function: SampleClass::Constructor 00025 // Access: Public 00026 // Description: 00027 //////////////////////////////////////////////////////////////////// 00028 SampleClass:: 00029 SampleClass() { 00030 } 00031 00032 //////////////////////////////////////////////////////////////////// 00033 // Function: SampleClass::public_method 00034 // Access: Public 00035 // Description: A few sentences describing what public_method is 00036 // supposed to do and why you'd want to call it. 00037 //////////////////////////////////////////////////////////////////// 00038 int SampleClass:: 00039 public_method() { 00040 switch (_private_data_member) { 00041 case NE_case_one: 00042 return 0; 00043 00044 case NE_case_two: 00045 return _flag; 00046 00047 default: 00048 return -1; 00049 } 00050 } 00051 00052 //////////////////////////////////////////////////////////////////// 00053 // Function: SampleClass::protected_method 00054 // Access: Protected 00055 // Description: A few sentences describing what protected_method is 00056 // supposed to do. 00057 //////////////////////////////////////////////////////////////////// 00058 bool SampleClass:: 00059 protected_method() { 00060 if (_flag > 0) { 00061 _flag--; 00062 return false; 00063 } else { 00064 return true; 00065 } 00066 } 00067 00068 //////////////////////////////////////////////////////////////////// 00069 // Function: SampleClass::private_method 00070 // Access: Private 00071 // Description: A few sentences describing what private_method is 00072 // supposed to do. 00073 //////////////////////////////////////////////////////////////////// 00074 void SampleClass:: 00075 private_method() { 00076 }