sampleClass.cxx 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. // Filename: sampleClass.cxx
  2. // Created by: drose (10Jun00)
  3. //
  4. ////////////////////////////////////////////////////////////////////
  5. //
  6. // PANDA 3D SOFTWARE
  7. // Copyright (c) 2001, Disney Enterprises, Inc. All rights reserved
  8. //
  9. // All use of this software is subject to the terms of the Panda 3d
  10. // Software license. You should have received a copy of this license
  11. // along with this source code; you will also find a current copy of
  12. // the license at http://www.panda3d.org/license.txt .
  13. //
  14. // To contact the maintainers of this program write to
  15. // [email protected] .
  16. //
  17. ////////////////////////////////////////////////////////////////////
  18. #include "sampleClass.h"
  19. TypeHandle SampleClass::_type_handle;
  20. ////////////////////////////////////////////////////////////////////
  21. // Function: SampleClass::Constructor
  22. // Access: Public
  23. // Description:
  24. ////////////////////////////////////////////////////////////////////
  25. SampleClass::
  26. SampleClass() {
  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::
  35. public_method() {
  36. switch (_private_data_member) {
  37. case NE_case_one:
  38. return 0;
  39. case NE_case_two:
  40. return _flag;
  41. default:
  42. return -1;
  43. }
  44. }
  45. ////////////////////////////////////////////////////////////////////
  46. // Function: SampleClass::protected_method
  47. // Access: Protected
  48. // Description: A few sentences describing what protected_method is
  49. // supposed to do.
  50. ////////////////////////////////////////////////////////////////////
  51. bool SampleClass::
  52. protected_method() {
  53. if (_flag > 0) {
  54. _flag--;
  55. return false;
  56. } else {
  57. return true;
  58. }
  59. }
  60. ////////////////////////////////////////////////////////////////////
  61. // Function: SampleClass::private_method
  62. // Access: Private
  63. // Description: A few sentences describing what private_method is
  64. // supposed to do.
  65. ////////////////////////////////////////////////////////////////////
  66. void SampleClass::
  67. private_method() {
  68. }