Panda3D
sampleClass.cxx
1 // Filename: sampleClass.cxx
2 // Created by: drose (10Jun00)
3 //
4 ////////////////////////////////////////////////////////////////////
5 //
6 // PANDA 3D SOFTWARE
7 // Copyright (c) Carnegie Mellon University. All rights reserved.
8 //
9 // All use of this software is subject to the terms of the revised BSD
10 // license. You should have received a copy of this license along
11 // with this source code in a file named "LICENSE."
12 //
13 ////////////////////////////////////////////////////////////////////
14 
15 #include "sampleClass.h"
16 
17 TypeHandle SampleClass::_type_handle;
18 
19 ////////////////////////////////////////////////////////////////////
20 // Function: SampleClass::Constructor
21 // Access: Public
22 // Description:
23 ////////////////////////////////////////////////////////////////////
24 SampleClass::
25 SampleClass() {
26 }
27 
28 ////////////////////////////////////////////////////////////////////
29 // Function: SampleClass::public_method
30 // Access: Public
31 // Description: A few sentences describing what public_method is
32 // supposed to do and why you'd want to call it.
33 ////////////////////////////////////////////////////////////////////
34 int SampleClass::
36  switch (_private_data_member) {
37  case NE_case_one:
38  return 0;
39 
40  case NE_case_two:
41  return _flag;
42 
43  default:
44  return -1;
45  }
46 }
47 
48 ////////////////////////////////////////////////////////////////////
49 // Function: SampleClass::protected_method
50 // Access: Protected
51 // Description: A few sentences describing what protected_method is
52 // supposed to do.
53 ////////////////////////////////////////////////////////////////////
54 bool SampleClass::
55 protected_method() {
56  if (_flag > 0) {
57  _flag--;
58  return false;
59  } else {
60  return true;
61  }
62 }
63 
64 ////////////////////////////////////////////////////////////////////
65 // Function: SampleClass::private_method
66 // Access: Private
67 // Description: A few sentences describing what private_method is
68 // supposed to do.
69 ////////////////////////////////////////////////////////////////////
70 void SampleClass::
71 private_method() {
72 }
int public_method()
A few sentences describing what public_method is supposed to do and why you'd want to call it...
Definition: sampleClass.cxx:35
TypeHandle is the identifier used to differentiate C++ class types.
Definition: typeHandle.h:85