Browse Source

Update copyright header

David Rose 24 years ago
parent
commit
2f4e207edb
100 changed files with 2039 additions and 757 deletions
  1. 25 12
      dtool/src/cppparser/cppArrayType.cxx
  2. 13 0
      dtool/src/cppparser/cppArrayType.h
  3. 14 1
      dtool/src/cppparser/cppBisonDefs.h
  4. 19 6
      dtool/src/cppparser/cppClassTemplateParameter.cxx
  5. 13 0
      dtool/src/cppparser/cppClassTemplateParameter.h
  6. 15 2
      dtool/src/cppparser/cppCommentBlock.cxx
  7. 14 1
      dtool/src/cppparser/cppCommentBlock.h
  8. 24 11
      dtool/src/cppparser/cppConstType.cxx
  9. 13 0
      dtool/src/cppparser/cppConstType.h
  10. 44 31
      dtool/src/cppparser/cppDeclaration.cxx
  11. 13 0
      dtool/src/cppparser/cppDeclaration.h
  12. 24 11
      dtool/src/cppparser/cppEnumType.cxx
  13. 14 1
      dtool/src/cppparser/cppEnumType.h
  14. 71 58
      dtool/src/cppparser/cppExpression.cxx
  15. 16 3
      dtool/src/cppparser/cppExpression.h
  16. 20 7
      dtool/src/cppparser/cppExpressionParser.cxx
  17. 14 1
      dtool/src/cppparser/cppExpressionParser.h
  18. 25 12
      dtool/src/cppparser/cppExtensionType.cxx
  19. 13 0
      dtool/src/cppparser/cppExtensionType.h
  20. 32 19
      dtool/src/cppparser/cppFile.cxx
  21. 15 2
      dtool/src/cppparser/cppFile.h
  22. 20 7
      dtool/src/cppparser/cppFunctionGroup.cxx
  23. 14 1
      dtool/src/cppparser/cppFunctionGroup.h
  24. 32 19
      dtool/src/cppparser/cppFunctionType.cxx
  25. 13 0
      dtool/src/cppparser/cppFunctionType.h
  26. 15 2
      dtool/src/cppparser/cppGlobals.cxx
  27. 14 1
      dtool/src/cppparser/cppGlobals.h
  28. 43 30
      dtool/src/cppparser/cppIdentifier.cxx
  29. 13 0
      dtool/src/cppparser/cppIdentifier.h
  30. 45 32
      dtool/src/cppparser/cppInstance.cxx
  31. 14 1
      dtool/src/cppparser/cppInstance.h
  32. 24 11
      dtool/src/cppparser/cppInstanceIdentifier.cxx
  33. 14 1
      dtool/src/cppparser/cppInstanceIdentifier.h
  34. 27 14
      dtool/src/cppparser/cppManifest.cxx
  35. 13 0
      dtool/src/cppparser/cppManifest.h
  36. 29 16
      dtool/src/cppparser/cppNameComponent.cxx
  37. 13 0
      dtool/src/cppparser/cppNameComponent.h
  38. 23 10
      dtool/src/cppparser/cppNamespace.cxx
  39. 13 0
      dtool/src/cppparser/cppNamespace.h
  40. 20 16
      dtool/src/cppparser/cppParameterList.cxx
  41. 13 0
      dtool/src/cppparser/cppParameterList.h
  42. 19 6
      dtool/src/cppparser/cppParser.cxx
  43. 14 1
      dtool/src/cppparser/cppParser.h
  44. 25 12
      dtool/src/cppparser/cppPointerType.cxx
  45. 11 7
      dtool/src/cppparser/cppPointerType.h
  46. 118 105
      dtool/src/cppparser/cppPreprocessor.cxx
  47. 14 1
      dtool/src/cppparser/cppPreprocessor.h
  48. 23 10
      dtool/src/cppparser/cppReferenceType.cxx
  49. 13 0
      dtool/src/cppparser/cppReferenceType.h
  50. 78 65
      dtool/src/cppparser/cppScope.cxx
  51. 14 1
      dtool/src/cppparser/cppScope.h
  52. 20 7
      dtool/src/cppparser/cppSimpleType.cxx
  53. 13 0
      dtool/src/cppparser/cppSimpleType.h
  54. 42 29
      dtool/src/cppparser/cppStructType.cxx
  55. 14 1
      dtool/src/cppparser/cppStructType.h
  56. 23 10
      dtool/src/cppparser/cppTBDType.cxx
  57. 13 0
      dtool/src/cppparser/cppTBDType.h
  58. 26 13
      dtool/src/cppparser/cppTemplateParameterList.cxx
  59. 13 0
      dtool/src/cppparser/cppTemplateParameterList.h
  60. 27 14
      dtool/src/cppparser/cppTemplateScope.cxx
  61. 14 1
      dtool/src/cppparser/cppTemplateScope.h
  62. 21 8
      dtool/src/cppparser/cppToken.cxx
  63. 13 0
      dtool/src/cppparser/cppToken.h
  64. 17 4
      dtool/src/cppparser/cppType.cxx
  65. 14 1
      dtool/src/cppparser/cppType.h
  66. 20 7
      dtool/src/cppparser/cppTypeDeclaration.cxx
  67. 14 1
      dtool/src/cppparser/cppTypeDeclaration.h
  68. 20 7
      dtool/src/cppparser/cppTypeParser.cxx
  69. 14 1
      dtool/src/cppparser/cppTypeParser.h
  70. 30 17
      dtool/src/cppparser/cppTypeProxy.cxx
  71. 13 0
      dtool/src/cppparser/cppTypeProxy.h
  72. 21 8
      dtool/src/cppparser/cppTypedef.cxx
  73. 13 0
      dtool/src/cppparser/cppTypedef.h
  74. 19 6
      dtool/src/cppparser/cppUsing.cxx
  75. 13 0
      dtool/src/cppparser/cppUsing.h
  76. 17 4
      dtool/src/cppparser/cppVisibility.cxx
  77. 13 0
      dtool/src/cppparser/cppVisibility.h
  78. 15 2
      dtool/src/cppparser/indent.cxx
  79. 14 1
      dtool/src/cppparser/indent.h
  80. 14 1
      dtool/src/dconfig/configTable.I
  81. 17 4
      dtool/src/dconfig/configTable.cxx
  82. 14 1
      dtool/src/dconfig/configTable.h
  83. 15 2
      dtool/src/dconfig/config_dconfig.cxx
  84. 14 1
      dtool/src/dconfig/config_dconfig.h
  85. 15 2
      dtool/src/dconfig/config_notify.cxx
  86. 14 1
      dtool/src/dconfig/config_notify.h
  87. 14 1
      dtool/src/dconfig/config_setup.h
  88. 15 2
      dtool/src/dconfig/dconfig.I
  89. 15 2
      dtool/src/dconfig/dconfig.cxx
  90. 14 1
      dtool/src/dconfig/dconfig.h
  91. 13 0
      dtool/src/dconfig/expand.I
  92. 13 0
      dtool/src/dconfig/expand.h
  93. 14 1
      dtool/src/dconfig/notify.I
  94. 20 7
      dtool/src/dconfig/notify.cxx
  95. 18 5
      dtool/src/dconfig/notify.h
  96. 17 4
      dtool/src/dconfig/notifyCategory.I
  97. 21 8
      dtool/src/dconfig/notifyCategory.cxx
  98. 21 8
      dtool/src/dconfig/notifyCategory.h
  99. 28 15
      dtool/src/dconfig/notifyCategoryProxy.I
  100. 15 2
      dtool/src/dconfig/notifyCategoryProxy.h

+ 25 - 12
dtool/src/cppparser/cppArrayType.cxx

@@ -1,6 +1,19 @@
-// Filename: cppArrayType.C
+// Filename: cppArrayType.cxx
 // Created by:  drose (19Oct99)
 // Created by:  drose (19Oct99)
-// 
+//
+////////////////////////////////////////////////////////////////////
+//
+// PANDA 3D SOFTWARE
+// Copyright (c) 2001, Disney Enterprises, Inc.  All rights reserved
+//
+// All use of this software is subject to the terms of the Panda 3d
+// Software license.  You should have received a copy of this license
+// along with this source code; you will also find a current copy of
+// the license at http://www.panda3d.org/license.txt .
+//
+// To contact the maintainers of this program write to
+// [email protected] .
+//
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 
 
 
 
@@ -10,7 +23,7 @@
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 //     Function: CPPArrayType::Constructor
 //     Function: CPPArrayType::Constructor
 //       Access: Public
 //       Access: Public
-//  Description: 
+//  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 CPPArrayType::
 CPPArrayType::
 CPPArrayType(CPPType *element_type, CPPExpression *bounds) :
 CPPArrayType(CPPType *element_type, CPPExpression *bounds) :
@@ -30,7 +43,7 @@ CPPArrayType(CPPType *element_type, CPPExpression *bounds) :
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 bool CPPArrayType::
 bool CPPArrayType::
 is_fully_specified() const {
 is_fully_specified() const {
-  return CPPType::is_fully_specified() && 
+  return CPPType::is_fully_specified() &&
     _element_type->is_fully_specified();
     _element_type->is_fully_specified();
 }
 }
 
 
@@ -89,7 +102,7 @@ is_equivalent(const CPPType &other) const {
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 //     Function: CPPArrayType::substitute_decl
 //     Function: CPPArrayType::substitute_decl
 //       Access: Public, Virtual
 //       Access: Public, Virtual
-//  Description: 
+//  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 CPPDeclaration *CPPArrayType::
 CPPDeclaration *CPPArrayType::
 substitute_decl(CPPDeclaration::SubstDecl &subst,
 substitute_decl(CPPDeclaration::SubstDecl &subst,
@@ -100,12 +113,12 @@ substitute_decl(CPPDeclaration::SubstDecl &subst,
   }
   }
 
 
   CPPArrayType *rep = new CPPArrayType(*this);
   CPPArrayType *rep = new CPPArrayType(*this);
-  rep->_element_type = 
+  rep->_element_type =
     _element_type->substitute_decl(subst, current_scope, global_scope)
     _element_type->substitute_decl(subst, current_scope, global_scope)
     ->as_type();
     ->as_type();
-  
+
   if (_bounds != NULL) {
   if (_bounds != NULL) {
-    rep->_bounds = 
+    rep->_bounds =
       _bounds->substitute_decl(subst, current_scope, global_scope)
       _bounds->substitute_decl(subst, current_scope, global_scope)
       ->as_expression();
       ->as_expression();
   }
   }
@@ -123,7 +136,7 @@ substitute_decl(CPPDeclaration::SubstDecl &subst,
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 //     Function: CPPArrayType::output
 //     Function: CPPArrayType::output
 //       Access: Public, Virtual
 //       Access: Public, Virtual
-//  Description: 
+//  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 void CPPArrayType::
 void CPPArrayType::
 output(ostream &out, int indent_level, CPPScope *scope, bool complete) const {
 output(ostream &out, int indent_level, CPPScope *scope, bool complete) const {
@@ -155,14 +168,14 @@ output_instance(ostream &out, int indent_level, CPPScope *scope,
   brackets << "]";
   brackets << "]";
   string bracketsstr = brackets.str();
   string bracketsstr = brackets.str();
 
 
-  _element_type->output_instance(out, indent_level, scope, complete, 
+  _element_type->output_instance(out, indent_level, scope, complete,
                                  prename, name + bracketsstr);
                                  prename, name + bracketsstr);
 }
 }
 
 
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 //     Function: CPPArrayType::get_subtype
 //     Function: CPPArrayType::get_subtype
 //       Access: Public, Virtual
 //       Access: Public, Virtual
-//  Description: 
+//  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 CPPDeclaration::SubType CPPArrayType::
 CPPDeclaration::SubType CPPArrayType::
 get_subtype() const {
 get_subtype() const {
@@ -172,7 +185,7 @@ get_subtype() const {
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 //     Function: CPPArrayType::as_array_type
 //     Function: CPPArrayType::as_array_type
 //       Access: Public, Virtual
 //       Access: Public, Virtual
-//  Description: 
+//  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 CPPArrayType *CPPArrayType::
 CPPArrayType *CPPArrayType::
 as_array_type() {
 as_array_type() {

+ 13 - 0
dtool/src/cppparser/cppArrayType.h

@@ -2,6 +2,19 @@
 // Created by:  drose (19Oct99)
 // Created by:  drose (19Oct99)
 //
 //
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
+//
+// PANDA 3D SOFTWARE
+// Copyright (c) 2001, Disney Enterprises, Inc.  All rights reserved
+//
+// All use of this software is subject to the terms of the Panda 3d
+// Software license.  You should have received a copy of this license
+// along with this source code; you will also find a current copy of
+// the license at http://www.panda3d.org/license.txt .
+//
+// To contact the maintainers of this program write to
+// [email protected] .
+//
+////////////////////////////////////////////////////////////////////
 
 
 #ifndef CPPARRAYTYPE_H
 #ifndef CPPARRAYTYPE_H
 #define CPPARRAYTYPE_H
 #define CPPARRAYTYPE_H

+ 14 - 1
dtool/src/cppparser/cppBisonDefs.h

@@ -1,7 +1,20 @@
-// Filename: cppBison.h
+// Filename: cppBisonDefs.h
 // Created by:  drose (17Jan99)
 // Created by:  drose (17Jan99)
 //
 //
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
+//
+// PANDA 3D SOFTWARE
+// Copyright (c) 2001, Disney Enterprises, Inc.  All rights reserved
+//
+// All use of this software is subject to the terms of the Panda 3d
+// Software license.  You should have received a copy of this license
+// along with this source code; you will also find a current copy of
+// the license at http://www.panda3d.org/license.txt .
+//
+// To contact the maintainers of this program write to
+// [email protected] .
+//
+////////////////////////////////////////////////////////////////////
 
 
 #ifndef CPPBISON_H
 #ifndef CPPBISON_H
 #define CPPBISON_H
 #define CPPBISON_H

+ 19 - 6
dtool/src/cppparser/cppClassTemplateParameter.cxx

@@ -1,6 +1,19 @@
-// Filename: cppClassTemplateParameter.C
+// Filename: cppClassTemplateParameter.cxx
 // Created by:  drose (28Oct99)
 // Created by:  drose (28Oct99)
-// 
+//
+////////////////////////////////////////////////////////////////////
+//
+// PANDA 3D SOFTWARE
+// Copyright (c) 2001, Disney Enterprises, Inc.  All rights reserved
+//
+// All use of this software is subject to the terms of the Panda 3d
+// Software license.  You should have received a copy of this license
+// along with this source code; you will also find a current copy of
+// the license at http://www.panda3d.org/license.txt .
+//
+// To contact the maintainers of this program write to
+// [email protected] .
+//
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 
 
 
 
@@ -10,7 +23,7 @@
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 //     Function: CPPClassTemplateParameter::Constructor
 //     Function: CPPClassTemplateParameter::Constructor
 //       Access: Public
 //       Access: Public
-//  Description: 
+//  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 CPPClassTemplateParameter::
 CPPClassTemplateParameter::
 CPPClassTemplateParameter(CPPIdentifier *ident, CPPType *default_type) :
 CPPClassTemplateParameter(CPPIdentifier *ident, CPPType *default_type) :
@@ -36,7 +49,7 @@ is_fully_specified() const {
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 //     Function: CPPClassTemplateParameter::output
 //     Function: CPPClassTemplateParameter::output
 //       Access: Public, Virtual
 //       Access: Public, Virtual
-//  Description: 
+//  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 void CPPClassTemplateParameter::
 void CPPClassTemplateParameter::
 output(ostream &out, int indent_level, CPPScope *scope, bool complete) const {
 output(ostream &out, int indent_level, CPPScope *scope, bool complete) const {
@@ -56,7 +69,7 @@ output(ostream &out, int indent_level, CPPScope *scope, bool complete) const {
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 //     Function: CPPClassTemplateParameter::get_subtype
 //     Function: CPPClassTemplateParameter::get_subtype
 //       Access: Public, Virtual
 //       Access: Public, Virtual
-//  Description: 
+//  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 CPPDeclaration::SubType CPPClassTemplateParameter::
 CPPDeclaration::SubType CPPClassTemplateParameter::
 get_subtype() const {
 get_subtype() const {
@@ -66,7 +79,7 @@ get_subtype() const {
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 //     Function: CPPClassTemplateParameter::as_classTemplateParameter
 //     Function: CPPClassTemplateParameter::as_classTemplateParameter
 //       Access: Public, Virtual
 //       Access: Public, Virtual
-//  Description: 
+//  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 CPPClassTemplateParameter *CPPClassTemplateParameter::
 CPPClassTemplateParameter *CPPClassTemplateParameter::
 as_class_template_parameter() {
 as_class_template_parameter() {

+ 13 - 0
dtool/src/cppparser/cppClassTemplateParameter.h

@@ -2,6 +2,19 @@
 // Created by:  drose (28Oct99)
 // Created by:  drose (28Oct99)
 //
 //
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
+//
+// PANDA 3D SOFTWARE
+// Copyright (c) 2001, Disney Enterprises, Inc.  All rights reserved
+//
+// All use of this software is subject to the terms of the Panda 3d
+// Software license.  You should have received a copy of this license
+// along with this source code; you will also find a current copy of
+// the license at http://www.panda3d.org/license.txt .
+//
+// To contact the maintainers of this program write to
+// [email protected] .
+//
+////////////////////////////////////////////////////////////////////
 
 
 #ifndef CPPCLASSTEMPLATEPARAMETER_H
 #ifndef CPPCLASSTEMPLATEPARAMETER_H
 #define CPPCLASSTEMPLATEPARAMETER_H
 #define CPPCLASSTEMPLATEPARAMETER_H

+ 15 - 2
dtool/src/cppparser/cppCommentBlock.cxx

@@ -1,6 +1,19 @@
-// Filename: cppCommentBlock.C
+// Filename: cppCommentBlock.cxx
 // Created by:  drose (15Aug00)
 // Created by:  drose (15Aug00)
-// 
+//
+////////////////////////////////////////////////////////////////////
+//
+// PANDA 3D SOFTWARE
+// Copyright (c) 2001, Disney Enterprises, Inc.  All rights reserved
+//
+// All use of this software is subject to the terms of the Panda 3d
+// Software license.  You should have received a copy of this license
+// along with this source code; you will also find a current copy of
+// the license at http://www.panda3d.org/license.txt .
+//
+// To contact the maintainers of this program write to
+// [email protected] .
+//
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 
 
 #include "cppCommentBlock.h"
 #include "cppCommentBlock.h"

+ 14 - 1
dtool/src/cppparser/cppCommentBlock.h

@@ -1,6 +1,19 @@
 // Filename: cppCommentBlock.h
 // Filename: cppCommentBlock.h
 // Created by:  drose (15Aug00)
 // Created by:  drose (15Aug00)
-// 
+//
+////////////////////////////////////////////////////////////////////
+//
+// PANDA 3D SOFTWARE
+// Copyright (c) 2001, Disney Enterprises, Inc.  All rights reserved
+//
+// All use of this software is subject to the terms of the Panda 3d
+// Software license.  You should have received a copy of this license
+// along with this source code; you will also find a current copy of
+// the license at http://www.panda3d.org/license.txt .
+//
+// To contact the maintainers of this program write to
+// [email protected] .
+//
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 
 
 #ifndef CPPCOMMENTBLOCK_H
 #ifndef CPPCOMMENTBLOCK_H

+ 24 - 11
dtool/src/cppparser/cppConstType.cxx

@@ -1,6 +1,19 @@
-// Filename: cppConstType.C
+// Filename: cppConstType.cxx
 // Created by:  drose (28Oct99)
 // Created by:  drose (28Oct99)
-// 
+//
+////////////////////////////////////////////////////////////////////
+//
+// PANDA 3D SOFTWARE
+// Copyright (c) 2001, Disney Enterprises, Inc.  All rights reserved
+//
+// All use of this software is subject to the terms of the Panda 3d
+// Software license.  You should have received a copy of this license
+// along with this source code; you will also find a current copy of
+// the license at http://www.panda3d.org/license.txt .
+//
+// To contact the maintainers of this program write to
+// [email protected] .
+//
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 
 
 
 
@@ -9,7 +22,7 @@
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 //     Function: CPPConstType::Constructor
 //     Function: CPPConstType::Constructor
 //       Access: Public
 //       Access: Public
-//  Description: 
+//  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 CPPConstType::
 CPPConstType::
 CPPConstType(CPPType *wrapped_around) :
 CPPConstType(CPPType *wrapped_around) :
@@ -28,17 +41,17 @@ CPPConstType(CPPType *wrapped_around) :
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 bool CPPConstType::
 bool CPPConstType::
 is_fully_specified() const {
 is_fully_specified() const {
-  return CPPType::is_fully_specified() && 
+  return CPPType::is_fully_specified() &&
     _wrapped_around->is_fully_specified();
     _wrapped_around->is_fully_specified();
 }
 }
 
 
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 //     Function: CPPConstType::substitute_decl
 //     Function: CPPConstType::substitute_decl
 //       Access: Public, Virtual
 //       Access: Public, Virtual
-//  Description: 
+//  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 CPPDeclaration *CPPConstType::
 CPPDeclaration *CPPConstType::
-substitute_decl(CPPDeclaration::SubstDecl &subst, 
+substitute_decl(CPPDeclaration::SubstDecl &subst,
                 CPPScope *current_scope, CPPScope *global_scope) {
                 CPPScope *current_scope, CPPScope *global_scope) {
   SubstDecl::const_iterator si = subst.find(this);
   SubstDecl::const_iterator si = subst.find(this);
   if (si != subst.end()) {
   if (si != subst.end()) {
@@ -46,7 +59,7 @@ substitute_decl(CPPDeclaration::SubstDecl &subst,
   }
   }
 
 
   CPPConstType *rep = new CPPConstType(*this);
   CPPConstType *rep = new CPPConstType(*this);
-  rep->_wrapped_around = 
+  rep->_wrapped_around =
     _wrapped_around->substitute_decl(subst, current_scope, global_scope)
     _wrapped_around->substitute_decl(subst, current_scope, global_scope)
     ->as_type();
     ->as_type();
 
 
@@ -114,7 +127,7 @@ is_equivalent(const CPPType &other) const {
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 //     Function: CPPConstType::output
 //     Function: CPPConstType::output
 //       Access: Public, Virtual
 //       Access: Public, Virtual
-//  Description: 
+//  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 void CPPConstType::
 void CPPConstType::
 output(ostream &out, int indent_level, CPPScope *scope, bool complete) const {
 output(ostream &out, int indent_level, CPPScope *scope, bool complete) const {
@@ -134,14 +147,14 @@ void CPPConstType::
 output_instance(ostream &out, int indent_level, CPPScope *scope,
 output_instance(ostream &out, int indent_level, CPPScope *scope,
                 bool complete, const string &prename,
                 bool complete, const string &prename,
                 const string &name) const {
                 const string &name) const {
-  _wrapped_around->output_instance(out, indent_level, scope, complete, 
+  _wrapped_around->output_instance(out, indent_level, scope, complete,
                                    "const " + prename, name);
                                    "const " + prename, name);
 }
 }
 
 
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 //     Function: CPPConstType::get_subtype
 //     Function: CPPConstType::get_subtype
 //       Access: Public, Virtual
 //       Access: Public, Virtual
-//  Description: 
+//  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 CPPDeclaration::SubType CPPConstType::
 CPPDeclaration::SubType CPPConstType::
 get_subtype() const {
 get_subtype() const {
@@ -151,7 +164,7 @@ get_subtype() const {
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 //     Function: CPPConstType::as_const_type
 //     Function: CPPConstType::as_const_type
 //       Access: Public, Virtual
 //       Access: Public, Virtual
-//  Description: 
+//  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 CPPConstType *CPPConstType::
 CPPConstType *CPPConstType::
 as_const_type() {
 as_const_type() {

+ 13 - 0
dtool/src/cppparser/cppConstType.h

@@ -2,6 +2,19 @@
 // Created by:  drose (28Oct99)
 // Created by:  drose (28Oct99)
 //
 //
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
+//
+// PANDA 3D SOFTWARE
+// Copyright (c) 2001, Disney Enterprises, Inc.  All rights reserved
+//
+// All use of this software is subject to the terms of the Panda 3d
+// Software license.  You should have received a copy of this license
+// along with this source code; you will also find a current copy of
+// the license at http://www.panda3d.org/license.txt .
+//
+// To contact the maintainers of this program write to
+// [email protected] .
+//
+////////////////////////////////////////////////////////////////////
 
 
 #ifndef CPPCONSTTYPE_H
 #ifndef CPPCONSTTYPE_H
 #define CPPCONSTTYPE_H
 #define CPPCONSTTYPE_H

+ 44 - 31
dtool/src/cppparser/cppDeclaration.cxx

@@ -1,6 +1,19 @@
-// Filename: cppDeclaration.C
+// Filename: cppDeclaration.cxx
 // Created by:  drose (19Oct99)
 // Created by:  drose (19Oct99)
-// 
+//
+////////////////////////////////////////////////////////////////////
+//
+// PANDA 3D SOFTWARE
+// Copyright (c) 2001, Disney Enterprises, Inc.  All rights reserved
+//
+// All use of this software is subject to the terms of the Panda 3d
+// Software license.  You should have received a copy of this license
+// along with this source code; you will also find a current copy of
+// the license at http://www.panda3d.org/license.txt .
+//
+// To contact the maintainers of this program write to
+// [email protected] .
+//
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 
 
 
 
@@ -10,7 +23,7 @@
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 //     Function: CPPDeclaration::Constructor
 //     Function: CPPDeclaration::Constructor
 //       Access: Public
 //       Access: Public
-//  Description: 
+//  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 CPPDeclaration::
 CPPDeclaration::
 CPPDeclaration(const CPPFile &file) :
 CPPDeclaration(const CPPFile &file) :
@@ -24,7 +37,7 @@ CPPDeclaration(const CPPFile &file) :
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 //     Function: CPPDeclaration::Copy Constructor
 //     Function: CPPDeclaration::Copy Constructor
 //       Access: Public
 //       Access: Public
-//  Description: 
+//  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 CPPDeclaration::
 CPPDeclaration::
 CPPDeclaration(const CPPDeclaration &copy) :
 CPPDeclaration(const CPPDeclaration &copy) :
@@ -38,7 +51,7 @@ CPPDeclaration(const CPPDeclaration &copy) :
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 //     Function: CPPDeclaration::Destructor
 //     Function: CPPDeclaration::Destructor
 //       Access: Public
 //       Access: Public
-//  Description: 
+//  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 CPPDeclaration::
 CPPDeclaration::
 ~CPPDeclaration() {
 ~CPPDeclaration() {
@@ -47,7 +60,7 @@ CPPDeclaration::
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 //     Function: CPPDeclaration::Equivalence Operator
 //     Function: CPPDeclaration::Equivalence Operator
 //       Access: Public
 //       Access: Public
-//  Description: 
+//  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 bool CPPDeclaration::
 bool CPPDeclaration::
 operator == (const CPPDeclaration &other) const {
 operator == (const CPPDeclaration &other) const {
@@ -60,7 +73,7 @@ operator == (const CPPDeclaration &other) const {
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 //     Function: CPPDeclaration::Nonequivalence Operator
 //     Function: CPPDeclaration::Nonequivalence Operator
 //       Access: Public
 //       Access: Public
-//  Description: 
+//  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 bool CPPDeclaration::
 bool CPPDeclaration::
 operator != (const CPPDeclaration &other) const {
 operator != (const CPPDeclaration &other) const {
@@ -70,7 +83,7 @@ operator != (const CPPDeclaration &other) const {
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 //     Function: CPPDeclaration::Ordering Operator
 //     Function: CPPDeclaration::Ordering Operator
 //       Access: Public
 //       Access: Public
-//  Description: 
+//  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 bool CPPDeclaration::
 bool CPPDeclaration::
 operator < (const CPPDeclaration &other) const {
 operator < (const CPPDeclaration &other) const {
@@ -121,10 +134,10 @@ is_fully_specified() const {
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 //     Function: CPPDeclaration::instantiate
 //     Function: CPPDeclaration::instantiate
 //       Access: Public, Virtual
 //       Access: Public, Virtual
-//  Description: 
+//  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 CPPDeclaration *CPPDeclaration::
 CPPDeclaration *CPPDeclaration::
-instantiate(const CPPTemplateParameterList *, 
+instantiate(const CPPTemplateParameterList *,
             CPPScope *, CPPScope *,
             CPPScope *, CPPScope *,
             CPPPreprocessor *error_sink) const {
             CPPPreprocessor *error_sink) const {
   if (error_sink != NULL) {
   if (error_sink != NULL) {
@@ -136,7 +149,7 @@ instantiate(const CPPTemplateParameterList *,
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 //     Function: CPPDeclaration::substitute_decl
 //     Function: CPPDeclaration::substitute_decl
 //       Access: Public, Virtual
 //       Access: Public, Virtual
-//  Description: 
+//  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 CPPDeclaration *CPPDeclaration::
 CPPDeclaration *CPPDeclaration::
 substitute_decl(SubstDecl &subst, CPPScope *, CPPScope *) {
 substitute_decl(SubstDecl &subst, CPPScope *, CPPScope *) {
@@ -150,7 +163,7 @@ substitute_decl(SubstDecl &subst, CPPScope *, CPPScope *) {
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 //     Function: CPPDeclaration::as_instance
 //     Function: CPPDeclaration::as_instance
 //       Access: Public, Virtual
 //       Access: Public, Virtual
-//  Description: 
+//  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 CPPInstance *CPPDeclaration::
 CPPInstance *CPPDeclaration::
 as_instance() {
 as_instance() {
@@ -160,7 +173,7 @@ as_instance() {
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 //     Function: CPPDeclaration::as_class_template_parameter
 //     Function: CPPDeclaration::as_class_template_parameter
 //       Access: Public, Virtual
 //       Access: Public, Virtual
-//  Description: 
+//  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 CPPClassTemplateParameter *CPPDeclaration::
 CPPClassTemplateParameter *CPPDeclaration::
 as_class_template_parameter() {
 as_class_template_parameter() {
@@ -170,7 +183,7 @@ as_class_template_parameter() {
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 //     Function: CPPDeclaration::as_typedef
 //     Function: CPPDeclaration::as_typedef
 //       Access: Public, Virtual
 //       Access: Public, Virtual
-//  Description: 
+//  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 CPPTypedef *CPPDeclaration::
 CPPTypedef *CPPDeclaration::
 as_typedef() {
 as_typedef() {
@@ -180,7 +193,7 @@ as_typedef() {
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 //     Function: CPPDeclaration::as_type_declaration
 //     Function: CPPDeclaration::as_type_declaration
 //       Access: Public, Virtual
 //       Access: Public, Virtual
-//  Description: 
+//  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 CPPTypeDeclaration *CPPDeclaration::
 CPPTypeDeclaration *CPPDeclaration::
 as_type_declaration() {
 as_type_declaration() {
@@ -190,7 +203,7 @@ as_type_declaration() {
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 //     Function: CPPDeclaration::as_expression
 //     Function: CPPDeclaration::as_expression
 //       Access: Public, Virtual
 //       Access: Public, Virtual
-//  Description: 
+//  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 CPPExpression *CPPDeclaration::
 CPPExpression *CPPDeclaration::
 as_expression() {
 as_expression() {
@@ -200,7 +213,7 @@ as_expression() {
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 //     Function: CPPDeclaration::as_type
 //     Function: CPPDeclaration::as_type
 //       Access: Public, Virtual
 //       Access: Public, Virtual
-//  Description: 
+//  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 CPPType *CPPDeclaration::
 CPPType *CPPDeclaration::
 as_type() {
 as_type() {
@@ -210,7 +223,7 @@ as_type() {
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 //     Function: CPPDeclaration::as_namespace
 //     Function: CPPDeclaration::as_namespace
 //       Access: Public, Virtual
 //       Access: Public, Virtual
-//  Description: 
+//  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 CPPNamespace *CPPDeclaration::
 CPPNamespace *CPPDeclaration::
 as_namespace() {
 as_namespace() {
@@ -220,7 +233,7 @@ as_namespace() {
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 //     Function: CPPDeclaration::as_using
 //     Function: CPPDeclaration::as_using
 //       Access: Public, Virtual
 //       Access: Public, Virtual
-//  Description: 
+//  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 CPPUsing *CPPDeclaration::
 CPPUsing *CPPDeclaration::
 as_using() {
 as_using() {
@@ -230,7 +243,7 @@ as_using() {
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 //     Function: CPPDeclaration::as_simple_type
 //     Function: CPPDeclaration::as_simple_type
 //       Access: Public, Virtual
 //       Access: Public, Virtual
-//  Description: 
+//  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 CPPSimpleType *CPPDeclaration::
 CPPSimpleType *CPPDeclaration::
 as_simple_type() {
 as_simple_type() {
@@ -240,7 +253,7 @@ as_simple_type() {
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 //     Function: CPPDeclaration::as_pointer_type
 //     Function: CPPDeclaration::as_pointer_type
 //       Access: Public, Virtual
 //       Access: Public, Virtual
-//  Description: 
+//  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 CPPPointerType *CPPDeclaration::
 CPPPointerType *CPPDeclaration::
 as_pointer_type() {
 as_pointer_type() {
@@ -250,7 +263,7 @@ as_pointer_type() {
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 //     Function: CPPDeclaration::as_reference_type
 //     Function: CPPDeclaration::as_reference_type
 //       Access: Public, Virtual
 //       Access: Public, Virtual
-//  Description: 
+//  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 CPPReferenceType *CPPDeclaration::
 CPPReferenceType *CPPDeclaration::
 as_reference_type() {
 as_reference_type() {
@@ -260,7 +273,7 @@ as_reference_type() {
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 //     Function: CPPDeclaration::as_array_type
 //     Function: CPPDeclaration::as_array_type
 //       Access: Public, Virtual
 //       Access: Public, Virtual
-//  Description: 
+//  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 CPPArrayType *CPPDeclaration::
 CPPArrayType *CPPDeclaration::
 as_array_type() {
 as_array_type() {
@@ -270,7 +283,7 @@ as_array_type() {
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 //     Function: CPPDeclaration::as_const_type
 //     Function: CPPDeclaration::as_const_type
 //       Access: Public, Virtual
 //       Access: Public, Virtual
-//  Description: 
+//  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 CPPConstType *CPPDeclaration::
 CPPConstType *CPPDeclaration::
 as_const_type() {
 as_const_type() {
@@ -280,7 +293,7 @@ as_const_type() {
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 //     Function: CPPDeclaration::as_function_type
 //     Function: CPPDeclaration::as_function_type
 //       Access: Public, Virtual
 //       Access: Public, Virtual
-//  Description: 
+//  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 CPPFunctionType *CPPDeclaration::
 CPPFunctionType *CPPDeclaration::
 as_function_type() {
 as_function_type() {
@@ -290,7 +303,7 @@ as_function_type() {
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 //     Function: CPPDeclaration::as_function_group
 //     Function: CPPDeclaration::as_function_group
 //       Access: Public, Virtual
 //       Access: Public, Virtual
-//  Description: 
+//  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 CPPFunctionGroup *CPPDeclaration::
 CPPFunctionGroup *CPPDeclaration::
 as_function_group() {
 as_function_group() {
@@ -300,7 +313,7 @@ as_function_group() {
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 //     Function: CPPDeclaration::as_extension_type
 //     Function: CPPDeclaration::as_extension_type
 //       Access: Public, Virtual
 //       Access: Public, Virtual
-//  Description: 
+//  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 CPPExtensionType *CPPDeclaration::
 CPPExtensionType *CPPDeclaration::
 as_extension_type() {
 as_extension_type() {
@@ -310,7 +323,7 @@ as_extension_type() {
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 //     Function: CPPDeclaration::as_struct_type
 //     Function: CPPDeclaration::as_struct_type
 //       Access: Public, Virtual
 //       Access: Public, Virtual
-//  Description: 
+//  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 CPPStructType *CPPDeclaration::
 CPPStructType *CPPDeclaration::
 as_struct_type() {
 as_struct_type() {
@@ -320,7 +333,7 @@ as_struct_type() {
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 //     Function: CPPDeclaration::as_enum_type
 //     Function: CPPDeclaration::as_enum_type
 //       Access: Public, Virtual
 //       Access: Public, Virtual
-//  Description: 
+//  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 CPPEnumType *CPPDeclaration::
 CPPEnumType *CPPDeclaration::
 as_enum_type() {
 as_enum_type() {
@@ -330,7 +343,7 @@ as_enum_type() {
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 //     Function: CPPDeclaration::as_tbd_type
 //     Function: CPPDeclaration::as_tbd_type
 //       Access: Public, Virtual
 //       Access: Public, Virtual
-//  Description: 
+//  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 CPPTBDType *CPPDeclaration::
 CPPTBDType *CPPDeclaration::
 as_tbd_type() {
 as_tbd_type() {
@@ -340,7 +353,7 @@ as_tbd_type() {
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 //     Function: CPPDeclaration::as_type_proxy
 //     Function: CPPDeclaration::as_type_proxy
 //       Access: Public, Virtual
 //       Access: Public, Virtual
-//  Description: 
+//  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 CPPTypeProxy *CPPDeclaration::
 CPPTypeProxy *CPPDeclaration::
 as_type_proxy() {
 as_type_proxy() {

+ 13 - 0
dtool/src/cppparser/cppDeclaration.h

@@ -2,6 +2,19 @@
 // Created by:  drose (19Oct99)
 // Created by:  drose (19Oct99)
 //
 //
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
+//
+// PANDA 3D SOFTWARE
+// Copyright (c) 2001, Disney Enterprises, Inc.  All rights reserved
+//
+// All use of this software is subject to the terms of the Panda 3d
+// Software license.  You should have received a copy of this license
+// along with this source code; you will also find a current copy of
+// the license at http://www.panda3d.org/license.txt .
+//
+// To contact the maintainers of this program write to
+// [email protected] .
+//
+////////////////////////////////////////////////////////////////////
 
 
 #ifndef CPPDECLARATION_H
 #ifndef CPPDECLARATION_H
 #define CPPDECLARATION_H
 #define CPPDECLARATION_H

+ 24 - 11
dtool/src/cppparser/cppEnumType.cxx

@@ -1,6 +1,19 @@
-// Filename: cppEnumType.C
+// Filename: cppEnumType.cxx
 // Created by:  drose (25Oct99)
 // Created by:  drose (25Oct99)
-// 
+//
+////////////////////////////////////////////////////////////////////
+//
+// PANDA 3D SOFTWARE
+// Copyright (c) 2001, Disney Enterprises, Inc.  All rights reserved
+//
+// All use of this software is subject to the terms of the Panda 3d
+// Software license.  You should have received a copy of this license
+// along with this source code; you will also find a current copy of
+// the license at http://www.panda3d.org/license.txt .
+//
+// To contact the maintainers of this program write to
+// [email protected] .
+//
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 
 
 
 
@@ -15,7 +28,7 @@
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 //     Function: CPPEnumType::Constructor
 //     Function: CPPEnumType::Constructor
 //       Access: Public
 //       Access: Public
-//  Description: 
+//  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 CPPEnumType::
 CPPEnumType::
 CPPEnumType(CPPIdentifier *ident, CPPScope *current_scope,
 CPPEnumType(CPPIdentifier *ident, CPPScope *current_scope,
@@ -27,11 +40,11 @@ CPPEnumType(CPPIdentifier *ident, CPPScope *current_scope,
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 //     Function: CPPEnumType::add_element
 //     Function: CPPEnumType::add_element
 //       Access: Public
 //       Access: Public
-//  Description: 
+//  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 void CPPEnumType::
 void CPPEnumType::
 add_element(const string &name, CPPScope *scope, CPPExpression *value) {
 add_element(const string &name, CPPScope *scope, CPPExpression *value) {
-  CPPType *type = 
+  CPPType *type =
     CPPType::new_type(new CPPSimpleType(CPPSimpleType::T_int,
     CPPType::new_type(new CPPSimpleType(CPPSimpleType::T_int,
                                         CPPSimpleType::F_unsigned));
                                         CPPSimpleType::F_unsigned));
   CPPIdentifier *ident = new CPPIdentifier(name);
   CPPIdentifier *ident = new CPPIdentifier(name);
@@ -55,7 +68,7 @@ is_incomplete() const {
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 //     Function: CPPEnumType::substitute_decl
 //     Function: CPPEnumType::substitute_decl
 //       Access: Public, Virtual
 //       Access: Public, Virtual
-//  Description: 
+//  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 CPPDeclaration *CPPEnumType::
 CPPDeclaration *CPPEnumType::
 substitute_decl(CPPDeclaration::SubstDecl &subst,
 substitute_decl(CPPDeclaration::SubstDecl &subst,
@@ -67,7 +80,7 @@ substitute_decl(CPPDeclaration::SubstDecl &subst,
 
 
   CPPEnumType *rep = new CPPEnumType(*this);
   CPPEnumType *rep = new CPPEnumType(*this);
   if (_ident != NULL) {
   if (_ident != NULL) {
-    rep->_ident = 
+    rep->_ident =
       _ident->substitute_decl(subst, current_scope, global_scope);
       _ident->substitute_decl(subst, current_scope, global_scope);
   }
   }
 
 
@@ -84,7 +97,7 @@ substitute_decl(CPPDeclaration::SubstDecl &subst,
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 //     Function: CPPEnumType::output
 //     Function: CPPEnumType::output
 //       Access: Public, Virtual
 //       Access: Public, Virtual
-//  Description: 
+//  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 void CPPEnumType::
 void CPPEnumType::
 output(ostream &out, int indent_level, CPPScope *scope, bool complete) const {
 output(ostream &out, int indent_level, CPPScope *scope, bool complete) const {
@@ -104,7 +117,7 @@ output(ostream &out, int indent_level, CPPScope *scope, bool complete) const {
     if (_ident != NULL) {
     if (_ident != NULL) {
       out << " " << _ident->get_local_name(scope);
       out << " " << _ident->get_local_name(scope);
     }
     }
-    
+
     out << " {\n";
     out << " {\n";
     Elements::const_iterator ei;
     Elements::const_iterator ei;
     for (ei = _elements.begin(); ei != _elements.end(); ++ei) {
     for (ei = _elements.begin(); ei != _elements.end(); ++ei) {
@@ -121,7 +134,7 @@ output(ostream &out, int indent_level, CPPScope *scope, bool complete) const {
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 //     Function: CPPEnumType::get_subtype
 //     Function: CPPEnumType::get_subtype
 //       Access: Public, Virtual
 //       Access: Public, Virtual
-//  Description: 
+//  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 CPPDeclaration::SubType CPPEnumType::
 CPPDeclaration::SubType CPPEnumType::
 get_subtype() const {
 get_subtype() const {
@@ -131,7 +144,7 @@ get_subtype() const {
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 //     Function: CPPEnumType::as_enum_type
 //     Function: CPPEnumType::as_enum_type
 //       Access: Public, Virtual
 //       Access: Public, Virtual
-//  Description: 
+//  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 CPPEnumType *CPPEnumType::
 CPPEnumType *CPPEnumType::
 as_enum_type() {
 as_enum_type() {

+ 14 - 1
dtool/src/cppparser/cppEnumType.h

@@ -2,6 +2,19 @@
 // Created by:  drose (25Oct99)
 // Created by:  drose (25Oct99)
 //
 //
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
+//
+// PANDA 3D SOFTWARE
+// Copyright (c) 2001, Disney Enterprises, Inc.  All rights reserved
+//
+// All use of this software is subject to the terms of the Panda 3d
+// Software license.  You should have received a copy of this license
+// along with this source code; you will also find a current copy of
+// the license at http://www.panda3d.org/license.txt .
+//
+// To contact the maintainers of this program write to
+// [email protected] .
+//
+////////////////////////////////////////////////////////////////////
 
 
 #ifndef CPPENUMTYPE_H
 #ifndef CPPENUMTYPE_H
 #define CPPENUMTYPE_H
 #define CPPENUMTYPE_H
@@ -40,7 +53,7 @@ public:
   virtual SubType get_subtype() const;
   virtual SubType get_subtype() const;
 
 
   virtual CPPEnumType *as_enum_type();
   virtual CPPEnumType *as_enum_type();
- 
+
   typedef vector<CPPInstance *> Elements;
   typedef vector<CPPInstance *> Elements;
   Elements _elements;
   Elements _elements;
 };
 };

+ 71 - 58
dtool/src/cppparser/cppExpression.cxx

@@ -1,6 +1,19 @@
-// Filename: cppExpression.C
+// Filename: cppExpression.cxx
 // Created by:  drose (25Oct99)
 // Created by:  drose (25Oct99)
-// 
+//
+////////////////////////////////////////////////////////////////////
+//
+// PANDA 3D SOFTWARE
+// Copyright (c) 2001, Disney Enterprises, Inc.  All rights reserved
+//
+// All use of this software is subject to the terms of the Panda 3d
+// Software license.  You should have received a copy of this license
+// along with this source code; you will also find a current copy of
+// the license at http://www.panda3d.org/license.txt .
+//
+// To contact the maintainers of this program write to
+// [email protected] .
+//
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 
 
 
 
@@ -23,7 +36,7 @@
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 //     Function: CPPExpresion::Result::Constructor
 //     Function: CPPExpresion::Result::Constructor
 //       Access: Public
 //       Access: Public
-//  Description: 
+//  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 CPPExpression::Result::
 CPPExpression::Result::
 Result() {
 Result() {
@@ -33,7 +46,7 @@ Result() {
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 //     Function: CPPExpresion::Result::Constructor
 //     Function: CPPExpresion::Result::Constructor
 //       Access: Public
 //       Access: Public
-//  Description: 
+//  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 CPPExpression::Result::
 CPPExpression::Result::
 Result(int value) {
 Result(int value) {
@@ -44,7 +57,7 @@ Result(int value) {
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 //     Function: CPPExpresion::Result::Constructor
 //     Function: CPPExpresion::Result::Constructor
 //       Access: Public
 //       Access: Public
-//  Description: 
+//  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 CPPExpression::Result::
 CPPExpression::Result::
 Result(double value) {
 Result(double value) {
@@ -55,7 +68,7 @@ Result(double value) {
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 //     Function: CPPExpresion::Result::Constructor
 //     Function: CPPExpresion::Result::Constructor
 //       Access: Public
 //       Access: Public
-//  Description: 
+//  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 CPPExpression::Result::
 CPPExpression::Result::
 Result(void *value) {
 Result(void *value) {
@@ -67,7 +80,7 @@ Result(void *value) {
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 //     Function: CPPExpresion::Result::as_integer
 //     Function: CPPExpresion::Result::as_integer
 //       Access: Public
 //       Access: Public
-//  Description: 
+//  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 int CPPExpression::Result::
 int CPPExpression::Result::
 as_integer() const {
 as_integer() const {
@@ -91,7 +104,7 @@ as_integer() const {
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 //     Function: CPPExpresion::Result::as_real
 //     Function: CPPExpresion::Result::as_real
 //       Access: Public
 //       Access: Public
-//  Description: 
+//  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 double CPPExpression::Result::
 double CPPExpression::Result::
 as_real() const {
 as_real() const {
@@ -115,7 +128,7 @@ as_real() const {
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 //     Function: CPPExpresion::Result::as_pointer
 //     Function: CPPExpresion::Result::as_pointer
 //       Access: Public
 //       Access: Public
-//  Description: 
+//  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 void *CPPExpression::Result::
 void *CPPExpression::Result::
 as_pointer() const {
 as_pointer() const {
@@ -139,7 +152,7 @@ as_pointer() const {
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 //     Function: CPPExpresion::Result::output
 //     Function: CPPExpresion::Result::output
 //       Access: Public
 //       Access: Public
-//  Description: 
+//  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 void CPPExpression::Result::
 void CPPExpression::Result::
 output(ostream &out) const {
 output(ostream &out) const {
@@ -168,11 +181,11 @@ output(ostream &out) const {
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 //     Function: CPPExpresion::Constructor
 //     Function: CPPExpresion::Constructor
 //       Access: Public
 //       Access: Public
-//  Description: 
+//  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 CPPExpression::
 CPPExpression::
 CPPExpression(int value) :
 CPPExpression(int value) :
-  CPPDeclaration(CPPFile()) 
+  CPPDeclaration(CPPFile())
 {
 {
   _type = T_integer;
   _type = T_integer;
   _u._integer = value;
   _u._integer = value;
@@ -181,11 +194,11 @@ CPPExpression(int value) :
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 //     Function: CPPExpression::Constructor
 //     Function: CPPExpression::Constructor
 //       Access: Public
 //       Access: Public
-//  Description: 
+//  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 CPPExpression::
 CPPExpression::
 CPPExpression(double value) :
 CPPExpression(double value) :
-  CPPDeclaration(CPPFile()) 
+  CPPDeclaration(CPPFile())
 {
 {
   _type = T_real;
   _type = T_real;
   _u._real = value;
   _u._real = value;
@@ -194,11 +207,11 @@ CPPExpression(double value) :
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 //     Function: CPPExpression::Constructor
 //     Function: CPPExpression::Constructor
 //       Access: Public
 //       Access: Public
-//  Description: 
+//  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 CPPExpression::
 CPPExpression::
 CPPExpression(const string &value) :
 CPPExpression(const string &value) :
-  CPPDeclaration(CPPFile()) 
+  CPPDeclaration(CPPFile())
 {
 {
   _type = T_string;
   _type = T_string;
   _str = value;
   _str = value;
@@ -207,14 +220,14 @@ CPPExpression(const string &value) :
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 //     Function: CPPExpression::Constructor
 //     Function: CPPExpression::Constructor
 //       Access: Public
 //       Access: Public
-//  Description: 
+//  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 CPPExpression::
 CPPExpression::
-CPPExpression(CPPIdentifier *ident, CPPScope *current_scope, 
+CPPExpression(CPPIdentifier *ident, CPPScope *current_scope,
               CPPScope *global_scope, CPPPreprocessor *error_sink) :
               CPPScope *global_scope, CPPPreprocessor *error_sink) :
-  CPPDeclaration(CPPFile()) 
+  CPPDeclaration(CPPFile())
 {
 {
-  CPPDeclaration *decl = 
+  CPPDeclaration *decl =
     ident->find_symbol(current_scope, global_scope, error_sink);
     ident->find_symbol(current_scope, global_scope, error_sink);
 
 
   if (decl != NULL) {
   if (decl != NULL) {
@@ -239,11 +252,11 @@ CPPExpression(CPPIdentifier *ident, CPPScope *current_scope,
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 //     Function: CPPExpression::Constructor
 //     Function: CPPExpression::Constructor
 //       Access: Public
 //       Access: Public
-//  Description: 
+//  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 CPPExpression::
 CPPExpression::
 CPPExpression(int unary_operator, CPPExpression *op1) :
 CPPExpression(int unary_operator, CPPExpression *op1) :
-  CPPDeclaration(CPPFile()) 
+  CPPDeclaration(CPPFile())
 {
 {
   _type = T_unary_operation;
   _type = T_unary_operation;
   _u._op._operator = unary_operator;
   _u._op._operator = unary_operator;
@@ -255,11 +268,11 @@ CPPExpression(int unary_operator, CPPExpression *op1) :
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 //     Function: CPPExpression::Constructor
 //     Function: CPPExpression::Constructor
 //       Access: Public
 //       Access: Public
-//  Description: 
+//  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 CPPExpression::
 CPPExpression::
 CPPExpression(int binary_operator, CPPExpression *op1, CPPExpression *op2) :
 CPPExpression(int binary_operator, CPPExpression *op1, CPPExpression *op2) :
-  CPPDeclaration(CPPFile()) 
+  CPPDeclaration(CPPFile())
 {
 {
   _type = T_binary_operation;
   _type = T_binary_operation;
   _u._op._operator = binary_operator;
   _u._op._operator = binary_operator;
@@ -271,12 +284,12 @@ CPPExpression(int binary_operator, CPPExpression *op1, CPPExpression *op2) :
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 //     Function: CPPExpression::Constructor
 //     Function: CPPExpression::Constructor
 //       Access: Public
 //       Access: Public
-//  Description: 
+//  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 CPPExpression::
 CPPExpression::
-CPPExpression(int trinary_operator, CPPExpression *op1, CPPExpression *op2, 
+CPPExpression(int trinary_operator, CPPExpression *op1, CPPExpression *op2,
               CPPExpression *op3) :
               CPPExpression *op3) :
-  CPPDeclaration(CPPFile()) 
+  CPPDeclaration(CPPFile())
 {
 {
   _type = T_trinary_operation;
   _type = T_trinary_operation;
   _u._op._operator = trinary_operator;
   _u._op._operator = trinary_operator;
@@ -349,7 +362,7 @@ new_op(CPPType *type, CPPExpression *op1) {
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 //     Function: CPPExpression::named sizeof_func constructor
 //     Function: CPPExpression::named sizeof_func constructor
 //       Access: Public, Static
 //       Access: Public, Static
-//  Description: 
+//  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 CPPExpression CPPExpression::
 CPPExpression CPPExpression::
 sizeof_func(CPPType *type) {
 sizeof_func(CPPType *type) {
@@ -363,7 +376,7 @@ sizeof_func(CPPType *type) {
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 //     Function: CPPExpression::Destructor
 //     Function: CPPExpression::Destructor
 //       Access: Public
 //       Access: Public
-//  Description: 
+//  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 CPPExpression::
 CPPExpression::
 ~CPPExpression() {
 ~CPPExpression() {
@@ -372,7 +385,7 @@ CPPExpression::
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 //     Function: CPPExpression::evaluate
 //     Function: CPPExpression::evaluate
 //       Access: Public
 //       Access: Public
-//  Description: 
+//  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 CPPExpression::Result CPPExpression::
 CPPExpression::Result CPPExpression::
 evaluate() const {
 evaluate() const {
@@ -432,7 +445,7 @@ evaluate() const {
 
 
     // In all other cases, both operands must be valid in order for
     // In all other cases, both operands must be valid in order for
     // the operation to be valid.
     // the operation to be valid.
-    if (r2._type == RT_error && 
+    if (r2._type == RT_error &&
         (_u._op._operator != OROR && _u._op._operator != ANDAND)) {
         (_u._op._operator != OROR && _u._op._operator != ANDAND)) {
       return r2;
       return r2;
     }
     }
@@ -459,7 +472,7 @@ evaluate() const {
 
 
     case UNARY_NEGATE:
     case UNARY_NEGATE:
       return Result(~r1.as_integer());
       return Result(~r1.as_integer());
-     
+
     case UNARY_MINUS:
     case UNARY_MINUS:
       return (r1._type == RT_real) ? Result(-r1.as_real()) : Result(-r1.as_integer());
       return (r1._type == RT_real) ? Result(-r1.as_real()) : Result(-r1.as_integer());
 
 
@@ -567,7 +580,7 @@ evaluate() const {
       return Result(r1.as_integer() >> r2.as_integer());
       return Result(r1.as_integer() >> r2.as_integer());
 
 
     case '?':
     case '?':
-      return r1.as_integer() ? 
+      return r1.as_integer() ?
         _u._op._op2->evaluate() : _u._op._op3->evaluate();
         _u._op._op2->evaluate() : _u._op._op3->evaluate();
 
 
     case '.':
     case '.':
@@ -606,19 +619,19 @@ CPPType *CPPExpression::
 determine_type() const {
 determine_type() const {
   CPPType *t1, *t2;
   CPPType *t1, *t2;
 
 
-  CPPType *int_type = 
+  CPPType *int_type =
     CPPType::new_type(new CPPSimpleType(CPPSimpleType::T_int));
     CPPType::new_type(new CPPSimpleType(CPPSimpleType::T_int));
 
 
-  CPPType *bool_type = 
+  CPPType *bool_type =
     CPPType::new_type(new CPPSimpleType(CPPSimpleType::T_bool));
     CPPType::new_type(new CPPSimpleType(CPPSimpleType::T_bool));
 
 
-  CPPType *float_type = 
+  CPPType *float_type =
     CPPType::new_type(new CPPSimpleType(CPPSimpleType::T_double));
     CPPType::new_type(new CPPSimpleType(CPPSimpleType::T_double));
 
 
-  CPPType *char_type = 
+  CPPType *char_type =
     CPPType::new_type(new CPPSimpleType(CPPSimpleType::T_char));
     CPPType::new_type(new CPPSimpleType(CPPSimpleType::T_char));
 
 
-  CPPType *const_char_type = 
+  CPPType *const_char_type =
     CPPType::new_type(new CPPConstType(char_type));
     CPPType::new_type(new CPPConstType(char_type));
 
 
   CPPType *char_star_type =
   CPPType *char_star_type =
@@ -678,7 +691,7 @@ determine_type() const {
 
 
     case UNARY_NEGATE:
     case UNARY_NEGATE:
       return int_type;
       return int_type;
-     
+
     case UNARY_MINUS:
     case UNARY_MINUS:
       return t1;
       return t1;
 
 
@@ -765,12 +778,12 @@ determine_type() const {
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 //     Function: CPPExpression::substitute_decl
 //     Function: CPPExpression::substitute_decl
 //       Access: Public, Virtual
 //       Access: Public, Virtual
-//  Description: 
+//  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 CPPDeclaration *CPPExpression::
 CPPDeclaration *CPPExpression::
 substitute_decl(CPPDeclaration::SubstDecl &subst,
 substitute_decl(CPPDeclaration::SubstDecl &subst,
                 CPPScope *current_scope, CPPScope *global_scope) {
                 CPPScope *current_scope, CPPScope *global_scope) {
-  CPPDeclaration *top = 
+  CPPDeclaration *top =
     CPPDeclaration::substitute_decl(subst, current_scope, global_scope);
     CPPDeclaration::substitute_decl(subst, current_scope, global_scope);
   if (top != this) {
   if (top != this) {
     return top;
     return top;
@@ -800,7 +813,7 @@ substitute_decl(CPPDeclaration::SubstDecl &subst,
   case T_typecast:
   case T_typecast:
   case T_construct:
   case T_construct:
   case T_new:
   case T_new:
-    rep->_u._typecast._op1 = 
+    rep->_u._typecast._op1 =
       _u._typecast._op1->substitute_decl(subst, current_scope, global_scope)
       _u._typecast._op1->substitute_decl(subst, current_scope, global_scope)
       ->as_expression();
       ->as_expression();
     any_changed = any_changed || (rep->_u._typecast._op1 != _u._typecast._op1);
     any_changed = any_changed || (rep->_u._typecast._op1 != _u._typecast._op1);
@@ -809,21 +822,21 @@ substitute_decl(CPPDeclaration::SubstDecl &subst,
   case T_default_construct:
   case T_default_construct:
   case T_default_new:
   case T_default_new:
   case T_sizeof:
   case T_sizeof:
-    rep->_u._typecast._to = 
+    rep->_u._typecast._to =
       _u._typecast._to->substitute_decl(subst, current_scope, global_scope)
       _u._typecast._to->substitute_decl(subst, current_scope, global_scope)
       ->as_type();
       ->as_type();
     any_changed = any_changed || (rep->_u._typecast._to != _u._typecast._to);
     any_changed = any_changed || (rep->_u._typecast._to != _u._typecast._to);
     break;
     break;
 
 
   case T_trinary_operation:
   case T_trinary_operation:
-    rep->_u._op._op3 = 
+    rep->_u._op._op3 =
       _u._op._op3->substitute_decl(subst, current_scope, global_scope)
       _u._op._op3->substitute_decl(subst, current_scope, global_scope)
       ->as_expression();
       ->as_expression();
     any_changed = any_changed || (rep->_u._op._op3 != _u._op._op3);
     any_changed = any_changed || (rep->_u._op._op3 != _u._op._op3);
     // fall through
     // fall through
 
 
   case T_binary_operation:
   case T_binary_operation:
-    rep->_u._op._op2 = 
+    rep->_u._op._op2 =
       _u._op._op2->substitute_decl(subst, current_scope, global_scope)
       _u._op._op2->substitute_decl(subst, current_scope, global_scope)
       ->as_expression();
       ->as_expression();
     any_changed = any_changed || (rep->_u._op._op2 != _u._op._op2);
     any_changed = any_changed || (rep->_u._op._op2 != _u._op._op2);
@@ -896,7 +909,7 @@ is_tbd() const {
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 //     Function: CPPExpression::output
 //     Function: CPPExpression::output
 //       Access: Public
 //       Access: Public
-//  Description: 
+//  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 void CPPExpression::
 void CPPExpression::
 output(ostream &out, int indent_level, CPPScope *scope, bool) const {
 output(ostream &out, int indent_level, CPPScope *scope, bool) const {
@@ -967,7 +980,7 @@ output(ostream &out, int indent_level, CPPScope *scope, bool) const {
     break;
     break;
 
 
   case T_construct:
   case T_construct:
-    out << "(" << _u._typecast._to->get_typedef_name(scope) 
+    out << "(" << _u._typecast._to->get_typedef_name(scope)
         << "(" << *_u._typecast._op1 << "))";
         << "(" << *_u._typecast._op1 << "))";
     break;
     break;
 
 
@@ -999,7 +1012,7 @@ output(ostream &out, int indent_level, CPPScope *scope, bool) const {
     case UNARY_NEGATE:
     case UNARY_NEGATE:
       out << "(~ " << *_u._op._op1 << ")";
       out << "(~ " << *_u._op._op1 << ")";
       break;
       break;
-     
+
     case UNARY_MINUS:
     case UNARY_MINUS:
       out << "(- " << *_u._op._op1 << ")";
       out << "(- " << *_u._op._op1 << ")";
       break;
       break;
@@ -1027,31 +1040,31 @@ output(ostream &out, int indent_level, CPPScope *scope, bool) const {
     case OROR:
     case OROR:
       out << "(" << *_u._op._op1 << " || " << *_u._op._op2 << ")";
       out << "(" << *_u._op._op1 << " || " << *_u._op._op2 << ")";
       break;
       break;
-      
+
     case ANDAND:
     case ANDAND:
       out << "(" << *_u._op._op1 << " && " << *_u._op._op2 << ")";
       out << "(" << *_u._op._op1 << " && " << *_u._op._op2 << ")";
       break;
       break;
-      
+
     case EQCOMPARE:
     case EQCOMPARE:
       out << "(" << *_u._op._op1 << " == " << *_u._op._op2 << ")";
       out << "(" << *_u._op._op1 << " == " << *_u._op._op2 << ")";
       break;
       break;
-      
+
     case NECOMPARE:
     case NECOMPARE:
       out << "(" << *_u._op._op1 << " != " << *_u._op._op2 << ")";
       out << "(" << *_u._op._op1 << " != " << *_u._op._op2 << ")";
       break;
       break;
-      
+
     case LECOMPARE:
     case LECOMPARE:
       out << "(" << *_u._op._op1 << " <= " << *_u._op._op2 << ")";
       out << "(" << *_u._op._op1 << " <= " << *_u._op._op2 << ")";
       break;
       break;
-      
+
     case GECOMPARE:
     case GECOMPARE:
       out << "(" << *_u._op._op1 << " >= " << *_u._op._op2 << ")";
       out << "(" << *_u._op._op1 << " >= " << *_u._op._op2 << ")";
       break;
       break;
-      
+
     case LSHIFT:
     case LSHIFT:
       out << "(" << *_u._op._op1 << " << " << *_u._op._op2 << ")";
       out << "(" << *_u._op._op1 << " << " << *_u._op._op2 << ")";
       break;
       break;
-      
+
     case RSHIFT:
     case RSHIFT:
       out << "(" << *_u._op._op1 << " >> " << *_u._op._op2 << ")";
       out << "(" << *_u._op._op1 << " >> " << *_u._op._op2 << ")";
       break;
       break;
@@ -1075,7 +1088,7 @@ output(ostream &out, int indent_level, CPPScope *scope, bool) const {
     case ',': // Comma, no parens are used
     case ',': // Comma, no parens are used
       out << *_u._op._op1 << ", " << *_u._op._op2;
       out << *_u._op._op1 << ", " << *_u._op._op2;
       break;
       break;
-      
+
     default:
     default:
       out << "(" << *_u._op._op1 << " " << (char)_u._op._operator
       out << "(" << *_u._op._op1 << " " << (char)_u._op._operator
           << " " << *_u._op._op2 << ")";
           << " " << *_u._op._op2 << ")";
@@ -1095,7 +1108,7 @@ output(ostream &out, int indent_level, CPPScope *scope, bool) const {
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 //     Function: CPPExpression::get_subtype
 //     Function: CPPExpression::get_subtype
 //       Access: Public, Virtual
 //       Access: Public, Virtual
-//  Description: 
+//  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 CPPDeclaration::SubType CPPExpression::
 CPPDeclaration::SubType CPPExpression::
 get_subtype() const {
 get_subtype() const {
@@ -1105,7 +1118,7 @@ get_subtype() const {
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 //     Function: CPPExpression::as_expression
 //     Function: CPPExpression::as_expression
 //       Access: Public, Virtual
 //       Access: Public, Virtual
-//  Description: 
+//  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 CPPExpression *CPPExpression::
 CPPExpression *CPPExpression::
 as_expression() {
 as_expression() {

+ 16 - 3
dtool/src/cppparser/cppExpression.h

@@ -2,6 +2,19 @@
 // Created by:  drose (25Oct99)
 // Created by:  drose (25Oct99)
 //
 //
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
+//
+// PANDA 3D SOFTWARE
+// Copyright (c) 2001, Disney Enterprises, Inc.  All rights reserved
+//
+// All use of this software is subject to the terms of the Panda 3d
+// Software license.  You should have received a copy of this license
+// along with this source code; you will also find a current copy of
+// the license at http://www.panda3d.org/license.txt .
+//
+// To contact the maintainers of this program write to
+// [email protected] .
+//
+////////////////////////////////////////////////////////////////////
 
 
 #ifndef CPPEXPRESSION_H
 #ifndef CPPEXPRESSION_H
 #define CPPEXPRESSION_H
 #define CPPEXPRESSION_H
@@ -79,7 +92,7 @@ public:
 
 
   virtual CPPExpression *as_expression();
   virtual CPPExpression *as_expression();
 
 
- 
+
   enum Type {
   enum Type {
     T_integer,
     T_integer,
     T_real,
     T_real,
@@ -97,7 +110,7 @@ public:
     T_binary_operation,
     T_binary_operation,
     T_trinary_operation,
     T_trinary_operation,
   };
   };
- 
+
   Type _type;
   Type _type;
   string _str;
   string _str;
   union {
   union {
@@ -136,4 +149,4 @@ operator << (ostream &out, const CPPExpression::Result &result) {
 
 
 #endif
 #endif
 
 
- 
+

+ 20 - 7
dtool/src/cppparser/cppExpressionParser.cxx

@@ -1,6 +1,19 @@
-// Filename: cppExpressionParser.C
+// Filename: cppExpressionParser.cxx
 // Created by:  drose (25Oct99)
 // Created by:  drose (25Oct99)
-// 
+//
+////////////////////////////////////////////////////////////////////
+//
+// PANDA 3D SOFTWARE
+// Copyright (c) 2001, Disney Enterprises, Inc.  All rights reserved
+//
+// All use of this software is subject to the terms of the Panda 3d
+// Software license.  You should have received a copy of this license
+// along with this source code; you will also find a current copy of
+// the license at http://www.panda3d.org/license.txt .
+//
+// To contact the maintainers of this program write to
+// [email protected] .
+//
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 
 
 
 
@@ -10,7 +23,7 @@
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 //     Function: CPPExpressionParser::Constructor
 //     Function: CPPExpressionParser::Constructor
 //       Access: Public
 //       Access: Public
-//  Description: 
+//  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 CPPExpressionParser::
 CPPExpressionParser::
 CPPExpressionParser(CPPScope *current_scope, CPPScope *global_scope) :
 CPPExpressionParser(CPPScope *current_scope, CPPScope *global_scope) :
@@ -23,7 +36,7 @@ CPPExpressionParser(CPPScope *current_scope, CPPScope *global_scope) :
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 //     Function: CPPExpressionParser::Destructor
 //     Function: CPPExpressionParser::Destructor
 //       Access: Public
 //       Access: Public
-//  Description: 
+//  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 CPPExpressionParser::
 CPPExpressionParser::
 ~CPPExpressionParser() {
 ~CPPExpressionParser() {
@@ -32,7 +45,7 @@ CPPExpressionParser::
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 //     Function: CPPExpressionParser::parse_expr
 //     Function: CPPExpressionParser::parse_expr
 //       Access: Public
 //       Access: Public
-//  Description: 
+//  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 bool CPPExpressionParser::
 bool CPPExpressionParser::
 parse_expr(const string &expr) {
 parse_expr(const string &expr) {
@@ -49,7 +62,7 @@ parse_expr(const string &expr) {
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 //     Function: CPPExpressionParser::parse_expr
 //     Function: CPPExpressionParser::parse_expr
 //       Access: Public
 //       Access: Public
-//  Description: 
+//  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 bool CPPExpressionParser::
 bool CPPExpressionParser::
 parse_expr(const string &expr, const CPPPreprocessor &filepos) {
 parse_expr(const string &expr, const CPPPreprocessor &filepos) {
@@ -68,7 +81,7 @@ parse_expr(const string &expr, const CPPPreprocessor &filepos) {
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 //     Function: CPPExpressionParser::output
 //     Function: CPPExpressionParser::output
 //       Access: Public
 //       Access: Public
-//  Description: 
+//  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 void CPPExpressionParser::
 void CPPExpressionParser::
 output(ostream &out) const {
 output(ostream &out) const {

+ 14 - 1
dtool/src/cppparser/cppExpressionParser.h

@@ -2,6 +2,19 @@
 // Created by:  drose (25Oct99)
 // Created by:  drose (25Oct99)
 //
 //
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
+//
+// PANDA 3D SOFTWARE
+// Copyright (c) 2001, Disney Enterprises, Inc.  All rights reserved
+//
+// All use of this software is subject to the terms of the Panda 3d
+// Software license.  You should have received a copy of this license
+// along with this source code; you will also find a current copy of
+// the license at http://www.panda3d.org/license.txt .
+//
+// To contact the maintainers of this program write to
+// [email protected] .
+//
+////////////////////////////////////////////////////////////////////
 
 
 #ifndef CPPEXPRESSIONPARSER_H
 #ifndef CPPEXPRESSIONPARSER_H
 #define CPPEXPRESSIONPARSER_H
 #define CPPEXPRESSIONPARSER_H
@@ -40,4 +53,4 @@ operator << (ostream &out, const CPPExpressionParser &ep) {
 
 
 #endif
 #endif
 
 
- 
+

+ 25 - 12
dtool/src/cppparser/cppExtensionType.cxx

@@ -1,6 +1,19 @@
-// Filename: cppExtensionType.C
+// Filename: cppExtensionType.cxx
 // Created by:  drose (21Oct99)
 // Created by:  drose (21Oct99)
-// 
+//
+////////////////////////////////////////////////////////////////////
+//
+// PANDA 3D SOFTWARE
+// Copyright (c) 2001, Disney Enterprises, Inc.  All rights reserved
+//
+// All use of this software is subject to the terms of the Panda 3d
+// Software license.  You should have received a copy of this license
+// along with this source code; you will also find a current copy of
+// the license at http://www.panda3d.org/license.txt .
+//
+// To contact the maintainers of this program write to
+// [email protected] .
+//
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 
 
 
 
@@ -13,10 +26,10 @@
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 //     Function: CPPExtensionType::Conextensionor
 //     Function: CPPExtensionType::Conextensionor
 //       Access: Public
 //       Access: Public
-//  Description: 
+//  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 CPPExtensionType::
 CPPExtensionType::
-CPPExtensionType(CPPExtensionType::Type type, 
+CPPExtensionType(CPPExtensionType::Type type,
                  CPPIdentifier *ident, CPPScope *current_scope,
                  CPPIdentifier *ident, CPPScope *current_scope,
                  const CPPFile &file) :
                  const CPPFile &file) :
   CPPType(file),
   CPPType(file),
@@ -30,7 +43,7 @@ CPPExtensionType(CPPExtensionType::Type type,
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 //     Function: CPPExtensionType::get_simple_name
 //     Function: CPPExtensionType::get_simple_name
 //       Access: Public, Virtual
 //       Access: Public, Virtual
-//  Description: 
+//  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 string CPPExtensionType::
 string CPPExtensionType::
 get_simple_name() const {
 get_simple_name() const {
@@ -43,7 +56,7 @@ get_simple_name() const {
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 //     Function: CPPExtensionType::get_local_name
 //     Function: CPPExtensionType::get_local_name
 //       Access: Public, Virtual
 //       Access: Public, Virtual
-//  Description: 
+//  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 string CPPExtensionType::
 string CPPExtensionType::
 get_local_name(CPPScope *scope) const {
 get_local_name(CPPScope *scope) const {
@@ -56,7 +69,7 @@ get_local_name(CPPScope *scope) const {
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 //     Function: CPPExtensionType::get_fully_scoped_name
 //     Function: CPPExtensionType::get_fully_scoped_name
 //       Access: Public, Virtual
 //       Access: Public, Virtual
-//  Description: 
+//  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 string CPPExtensionType::
 string CPPExtensionType::
 get_fully_scoped_name() const {
 get_fully_scoped_name() const {
@@ -96,7 +109,7 @@ is_tbd() const {
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 //     Function: CPPExtensionType::substitute_decl
 //     Function: CPPExtensionType::substitute_decl
 //       Access: Public, Virtual
 //       Access: Public, Virtual
-//  Description: 
+//  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 CPPDeclaration *CPPExtensionType::
 CPPDeclaration *CPPExtensionType::
 substitute_decl(CPPDeclaration::SubstDecl &subst,
 substitute_decl(CPPDeclaration::SubstDecl &subst,
@@ -108,7 +121,7 @@ substitute_decl(CPPDeclaration::SubstDecl &subst,
 
 
   CPPExtensionType *rep = new CPPExtensionType(*this);
   CPPExtensionType *rep = new CPPExtensionType(*this);
   if (_ident != NULL) {
   if (_ident != NULL) {
-    rep->_ident = 
+    rep->_ident =
       _ident->substitute_decl(subst, current_scope, global_scope);
       _ident->substitute_decl(subst, current_scope, global_scope);
   }
   }
 
 
@@ -147,7 +160,7 @@ is_equivalent(const CPPType &other) const {
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 //     Function: CPPExtensionType::output
 //     Function: CPPExtensionType::output
 //       Access: Public, Virtual
 //       Access: Public, Virtual
-//  Description: 
+//  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 void CPPExtensionType::
 void CPPExtensionType::
 output(ostream &out, int, CPPScope *scope, bool) const {
 output(ostream &out, int, CPPScope *scope, bool) const {
@@ -170,7 +183,7 @@ output(ostream &out, int, CPPScope *scope, bool) const {
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 //     Function: CPPExtensionType::get_subtype
 //     Function: CPPExtensionType::get_subtype
 //       Access: Public, Virtual
 //       Access: Public, Virtual
-//  Description: 
+//  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 CPPDeclaration::SubType CPPExtensionType::
 CPPDeclaration::SubType CPPExtensionType::
 get_subtype() const {
 get_subtype() const {
@@ -180,7 +193,7 @@ get_subtype() const {
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 //     Function: CPPExtensionType::as_extension_type
 //     Function: CPPExtensionType::as_extension_type
 //       Access: Public, Virtual
 //       Access: Public, Virtual
-//  Description: 
+//  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 CPPExtensionType *CPPExtensionType::
 CPPExtensionType *CPPExtensionType::
 as_extension_type() {
 as_extension_type() {

+ 13 - 0
dtool/src/cppparser/cppExtensionType.h

@@ -2,6 +2,19 @@
 // Created by:  drose (21Oct99)
 // Created by:  drose (21Oct99)
 //
 //
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
+//
+// PANDA 3D SOFTWARE
+// Copyright (c) 2001, Disney Enterprises, Inc.  All rights reserved
+//
+// All use of this software is subject to the terms of the Panda 3d
+// Software license.  You should have received a copy of this license
+// along with this source code; you will also find a current copy of
+// the license at http://www.panda3d.org/license.txt .
+//
+// To contact the maintainers of this program write to
+// [email protected] .
+//
+////////////////////////////////////////////////////////////////////
 
 
 #ifndef CPPEXTENSIONTYPE_H
 #ifndef CPPEXTENSIONTYPE_H
 #define CPPEXTENSIONTYPE_H
 #define CPPEXTENSIONTYPE_H

+ 32 - 19
dtool/src/cppparser/cppFile.cxx

@@ -1,6 +1,19 @@
-// Filename: cppFile.C
+// Filename: cppFile.cxx
 // Created by:  drose (11Nov99)
 // Created by:  drose (11Nov99)
-// 
+//
+////////////////////////////////////////////////////////////////////
+//
+// PANDA 3D SOFTWARE
+// Copyright (c) 2001, Disney Enterprises, Inc.  All rights reserved
+//
+// All use of this software is subject to the terms of the Panda 3d
+// Software license.  You should have received a copy of this license
+// along with this source code; you will also find a current copy of
+// the license at http://www.panda3d.org/license.txt .
+//
+// To contact the maintainers of this program write to
+// [email protected] .
+//
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 
 
 
 
@@ -11,7 +24,7 @@
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 //     Function: CPPFile::Constructor
 //     Function: CPPFile::Constructor
 //       Access: Public
 //       Access: Public
-//  Description: 
+//  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 CPPFile::
 CPPFile::
 CPPFile(const Filename &filename, const Filename &filename_as_referenced,
 CPPFile(const Filename &filename, const Filename &filename_as_referenced,
@@ -27,12 +40,12 @@ CPPFile(const Filename &filename, const Filename &filename_as_referenced,
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 //     Function: CPPFile::Copy Constructor
 //     Function: CPPFile::Copy Constructor
 //       Access: Public
 //       Access: Public
-//  Description: 
+//  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 CPPFile::
 CPPFile::
 CPPFile(const CPPFile &copy) :
 CPPFile(const CPPFile &copy) :
-  _filename(copy._filename), 
-  _filename_as_referenced(copy._filename_as_referenced), 
+  _filename(copy._filename),
+  _filename_as_referenced(copy._filename_as_referenced),
   _source(copy._source)
   _source(copy._source)
 {
 {
 }
 }
@@ -40,7 +53,7 @@ CPPFile(const CPPFile &copy) :
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 //     Function: CPPFile::Copy Assignment Operator
 //     Function: CPPFile::Copy Assignment Operator
 //       Access: Public
 //       Access: Public
-//  Description: 
+//  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 void CPPFile::
 void CPPFile::
 operator = (const CPPFile &copy) {
 operator = (const CPPFile &copy) {
@@ -52,7 +65,7 @@ operator = (const CPPFile &copy) {
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 //     Function: CPPFile::Destructor
 //     Function: CPPFile::Destructor
 //       Access: Public
 //       Access: Public
-//  Description: 
+//  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 CPPFile::
 CPPFile::
 ~CPPFile() {
 ~CPPFile() {
@@ -83,13 +96,13 @@ bool CPPFile::
 is_c_or_i_file(const Filename &filename) {
 is_c_or_i_file(const Filename &filename) {
   string extension = filename.get_extension();
   string extension = filename.get_extension();
   // downcase the extension.
   // downcase the extension.
-  for (string::iterator ei = extension.begin(); 
+  for (string::iterator ei = extension.begin();
        ei != extension.end();
        ei != extension.end();
        ++ei) {
        ++ei) {
     (*ei) = tolower(*ei);
     (*ei) = tolower(*ei);
   }
   }
-    
-  return (extension == "c" || extension == "cc" || 
+
+  return (extension == "c" || extension == "cc" ||
           extension == "cpp" || extension == "c++" || extension == "cxx" ||
           extension == "cpp" || extension == "c++" || extension == "cxx" ||
           extension == "i" || extension == "t");
           extension == "i" || extension == "t");
 }
 }
@@ -119,13 +132,13 @@ bool CPPFile::
 is_c_file(const Filename &filename) {
 is_c_file(const Filename &filename) {
   string extension = filename.get_extension();
   string extension = filename.get_extension();
   // downcase the extension.
   // downcase the extension.
-  for (string::iterator ei = extension.begin(); 
+  for (string::iterator ei = extension.begin();
        ei != extension.end();
        ei != extension.end();
        ++ei) {
        ++ei) {
     (*ei) = tolower(*ei);
     (*ei) = tolower(*ei);
   }
   }
-    
-  return (extension == "c" || extension == "cc" || 
+
+  return (extension == "c" || extension == "cc" ||
           extension == "cpp" || extension == "c++" || extension == "cxx");
           extension == "cpp" || extension == "c++" || extension == "cxx");
 }
 }
 
 
@@ -148,7 +161,7 @@ replace_nearer(const CPPFile &other) {
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 //     Function: CPPFile::Ordering Operator
 //     Function: CPPFile::Ordering Operator
 //       Access: Public
 //       Access: Public
-//  Description: 
+//  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 bool CPPFile::
 bool CPPFile::
 operator < (const CPPFile &other) const {
 operator < (const CPPFile &other) const {
@@ -158,7 +171,7 @@ operator < (const CPPFile &other) const {
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 //     Function: CPPFile::Equality Operator
 //     Function: CPPFile::Equality Operator
 //       Access: Public
 //       Access: Public
-//  Description: 
+//  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 bool CPPFile::
 bool CPPFile::
 operator == (const CPPFile &other) const {
 operator == (const CPPFile &other) const {
@@ -168,7 +181,7 @@ operator == (const CPPFile &other) const {
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 //     Function: CPPFile::Inequality Operator
 //     Function: CPPFile::Inequality Operator
 //       Access: Public
 //       Access: Public
-//  Description: 
+//  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 bool CPPFile::
 bool CPPFile::
 operator != (const CPPFile &other) const {
 operator != (const CPPFile &other) const {
@@ -178,7 +191,7 @@ operator != (const CPPFile &other) const {
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 //     Function: CPPFile::c_str
 //     Function: CPPFile::c_str
 //       Access: Public
 //       Access: Public
-//  Description: 
+//  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 const char *CPPFile::
 const char *CPPFile::
 c_str() const {
 c_str() const {
@@ -188,7 +201,7 @@ c_str() const {
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 //     Function: CPPFile::empty
 //     Function: CPPFile::empty
 //       Access: Public
 //       Access: Public
-//  Description: 
+//  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 bool CPPFile::
 bool CPPFile::
 empty() const {
 empty() const {

+ 15 - 2
dtool/src/cppparser/cppFile.h

@@ -2,6 +2,19 @@
 // Created by:  drose (11Nov99)
 // Created by:  drose (11Nov99)
 //
 //
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
+//
+// PANDA 3D SOFTWARE
+// Copyright (c) 2001, Disney Enterprises, Inc.  All rights reserved
+//
+// All use of this software is subject to the terms of the Panda 3d
+// Software license.  You should have received a copy of this license
+// along with this source code; you will also find a current copy of
+// the license at http://www.panda3d.org/license.txt .
+//
+// To contact the maintainers of this program write to
+// [email protected] .
+//
+////////////////////////////////////////////////////////////////////
 
 
 #ifndef CPPFILE_H
 #ifndef CPPFILE_H
 #define CPPFILE_H
 #define CPPFILE_H
@@ -25,8 +38,8 @@ public:
     S_none,        // File is internally generated
     S_none,        // File is internally generated
   };
   };
 
 
-  CPPFile(const Filename &filename = "", 
-          const Filename &filename_as_referenced = "", 
+  CPPFile(const Filename &filename = "",
+          const Filename &filename_as_referenced = "",
           Source source = S_none);
           Source source = S_none);
   CPPFile(const CPPFile &copy);
   CPPFile(const CPPFile &copy);
   void operator = (const CPPFile &copy);
   void operator = (const CPPFile &copy);

+ 20 - 7
dtool/src/cppparser/cppFunctionGroup.cxx

@@ -1,6 +1,19 @@
-// Filename: cppFunctionGroup.C
+// Filename: cppFunctionGroup.cxx
 // Created by:  drose (11Nov99)
 // Created by:  drose (11Nov99)
-// 
+//
+////////////////////////////////////////////////////////////////////
+//
+// PANDA 3D SOFTWARE
+// Copyright (c) 2001, Disney Enterprises, Inc.  All rights reserved
+//
+// All use of this software is subject to the terms of the Panda 3d
+// Software license.  You should have received a copy of this license
+// along with this source code; you will also find a current copy of
+// the license at http://www.panda3d.org/license.txt .
+//
+// To contact the maintainers of this program write to
+// [email protected] .
+//
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 
 
 
 
@@ -12,7 +25,7 @@
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 //     Function: CPPFunctionGroup::Constructor
 //     Function: CPPFunctionGroup::Constructor
 //       Access: Public
 //       Access: Public
-//  Description: 
+//  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 CPPFunctionGroup::
 CPPFunctionGroup::
 CPPFunctionGroup(const string &name) :
 CPPFunctionGroup(const string &name) :
@@ -24,7 +37,7 @@ CPPFunctionGroup(const string &name) :
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 //     Function: CPPFunctionGroup::Destructor
 //     Function: CPPFunctionGroup::Destructor
 //       Access: Public
 //       Access: Public
-//  Description: 
+//  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 CPPFunctionGroup::
 CPPFunctionGroup::
 ~CPPFunctionGroup() {
 ~CPPFunctionGroup() {
@@ -60,7 +73,7 @@ get_return_type() const {
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 //     Function: CPPFunctionGroup::output
 //     Function: CPPFunctionGroup::output
 //       Access: Public, Virtual
 //       Access: Public, Virtual
-//  Description: 
+//  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 void CPPFunctionGroup::
 void CPPFunctionGroup::
 output(ostream &out, int indent_level, CPPScope *scope, bool complete) const {
 output(ostream &out, int indent_level, CPPScope *scope, bool complete) const {
@@ -80,7 +93,7 @@ output(ostream &out, int indent_level, CPPScope *scope, bool complete) const {
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 //     Function: CPPFunctionGroup::get_subtype
 //     Function: CPPFunctionGroup::get_subtype
 //       Access: Public, Virtual
 //       Access: Public, Virtual
-//  Description: 
+//  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 CPPDeclaration::SubType CPPFunctionGroup::
 CPPDeclaration::SubType CPPFunctionGroup::
 get_subtype() const {
 get_subtype() const {
@@ -90,7 +103,7 @@ get_subtype() const {
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 //     Function: CPPFunctionGroup::as_function_group
 //     Function: CPPFunctionGroup::as_function_group
 //       Access: Public, Virtual
 //       Access: Public, Virtual
-//  Description: 
+//  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 CPPFunctionGroup *CPPFunctionGroup::
 CPPFunctionGroup *CPPFunctionGroup::
 as_function_group() {
 as_function_group() {

+ 14 - 1
dtool/src/cppparser/cppFunctionGroup.h

@@ -2,6 +2,19 @@
 // Created by:  drose (11Nov99)
 // Created by:  drose (11Nov99)
 //
 //
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
+//
+// PANDA 3D SOFTWARE
+// Copyright (c) 2001, Disney Enterprises, Inc.  All rights reserved
+//
+// All use of this software is subject to the terms of the Panda 3d
+// Software license.  You should have received a copy of this license
+// along with this source code; you will also find a current copy of
+// the license at http://www.panda3d.org/license.txt .
+//
+// To contact the maintainers of this program write to
+// [email protected] .
+//
+////////////////////////////////////////////////////////////////////
 
 
 #ifndef CPPFUNCTIONGROUP_H
 #ifndef CPPFUNCTIONGROUP_H
 #define CPPFUNCTIONGROUP_H
 #define CPPFUNCTIONGROUP_H
@@ -41,4 +54,4 @@ public:
 
 
 #endif
 #endif
 
 
- 
+

+ 32 - 19
dtool/src/cppparser/cppFunctionType.cxx

@@ -1,6 +1,19 @@
-// Filename: cppFunctionType.C
+// Filename: cppFunctionType.cxx
 // Created by:  drose (21Oct99)
 // Created by:  drose (21Oct99)
-// 
+//
+////////////////////////////////////////////////////////////////////
+//
+// PANDA 3D SOFTWARE
+// Copyright (c) 2001, Disney Enterprises, Inc.  All rights reserved
+//
+// All use of this software is subject to the terms of the Panda 3d
+// Software license.  You should have received a copy of this license
+// along with this source code; you will also find a current copy of
+// the license at http://www.panda3d.org/license.txt .
+//
+// To contact the maintainers of this program write to
+// [email protected] .
+//
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 
 
 
 
@@ -12,13 +25,13 @@
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 //     Function: CPPFunctionType::Constructor
 //     Function: CPPFunctionType::Constructor
 //       Access: Public
 //       Access: Public
-//  Description: 
+//  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 CPPFunctionType::
 CPPFunctionType::
 CPPFunctionType(CPPType *return_type, CPPParameterList *parameters,
 CPPFunctionType(CPPType *return_type, CPPParameterList *parameters,
                 int flags) :
                 int flags) :
   CPPType(CPPFile()),
   CPPType(CPPFile()),
-  _return_type(return_type), 
+  _return_type(return_type),
   _parameters(parameters),
   _parameters(parameters),
   _flags(flags)
   _flags(flags)
 {
 {
@@ -38,10 +51,10 @@ CPPFunctionType(CPPType *return_type, CPPParameterList *parameters,
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 //     Function: CPPFunctionType::Copy Constructor
 //     Function: CPPFunctionType::Copy Constructor
 //       Access: Public
 //       Access: Public
-//  Description: 
+//  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 CPPFunctionType::
 CPPFunctionType::
-CPPFunctionType(const CPPFunctionType &copy) : 
+CPPFunctionType(const CPPFunctionType &copy) :
   CPPType(copy),
   CPPType(copy),
   _return_type(copy._return_type),
   _return_type(copy._return_type),
   _parameters(copy._parameters),
   _parameters(copy._parameters),
@@ -53,7 +66,7 @@ CPPFunctionType(const CPPFunctionType &copy) :
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 //     Function: CPPFunctionType::Copy Assignment Operator
 //     Function: CPPFunctionType::Copy Assignment Operator
 //       Access: Public
 //       Access: Public
-//  Description: 
+//  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 void CPPFunctionType::
 void CPPFunctionType::
 operator = (const CPPFunctionType &copy) {
 operator = (const CPPFunctionType &copy) {
@@ -74,7 +87,7 @@ operator = (const CPPFunctionType &copy) {
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 bool CPPFunctionType::
 bool CPPFunctionType::
 is_fully_specified() const {
 is_fully_specified() const {
-  return CPPType::is_fully_specified() && 
+  return CPPType::is_fully_specified() &&
     _return_type->is_fully_specified() &&
     _return_type->is_fully_specified() &&
     _parameters->is_fully_specified();
     _parameters->is_fully_specified();
 }
 }
@@ -82,7 +95,7 @@ is_fully_specified() const {
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 //     Function: CPPFunctionType::substitute_decl
 //     Function: CPPFunctionType::substitute_decl
 //       Access: Public, Virtual
 //       Access: Public, Virtual
-//  Description: 
+//  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 CPPDeclaration *CPPFunctionType::
 CPPDeclaration *CPPFunctionType::
 substitute_decl(CPPDeclaration::SubstDecl &subst,
 substitute_decl(CPPDeclaration::SubstDecl &subst,
@@ -93,11 +106,11 @@ substitute_decl(CPPDeclaration::SubstDecl &subst,
   }
   }
 
 
   CPPFunctionType *rep = new CPPFunctionType(*this);
   CPPFunctionType *rep = new CPPFunctionType(*this);
-  rep->_return_type = 
+  rep->_return_type =
     _return_type->substitute_decl(subst, current_scope, global_scope)
     _return_type->substitute_decl(subst, current_scope, global_scope)
     ->as_type();
     ->as_type();
 
 
-  rep->_parameters = 
+  rep->_parameters =
     _parameters->substitute_decl(subst, current_scope, global_scope);
     _parameters->substitute_decl(subst, current_scope, global_scope);
 
 
   if (rep->_return_type == _return_type &&
   if (rep->_return_type == _return_type &&
@@ -122,7 +135,7 @@ substitute_decl(CPPDeclaration::SubstDecl &subst,
 CPPType *CPPFunctionType::
 CPPType *CPPFunctionType::
 resolve_type(CPPScope *current_scope, CPPScope *global_scope) {
 resolve_type(CPPScope *current_scope, CPPScope *global_scope) {
   CPPType *rtype = _return_type->resolve_type(current_scope, global_scope);
   CPPType *rtype = _return_type->resolve_type(current_scope, global_scope);
-  CPPParameterList *params = 
+  CPPParameterList *params =
     _parameters->resolve_type(current_scope, global_scope);
     _parameters->resolve_type(current_scope, global_scope);
 
 
   if (rtype != _return_type || params != _parameters) {
   if (rtype != _return_type || params != _parameters) {
@@ -153,7 +166,7 @@ is_tbd() const {
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 //     Function: CPPFunctionType::output
 //     Function: CPPFunctionType::output
 //       Access: Public, Virtual
 //       Access: Public, Virtual
-//  Description: 
+//  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 void CPPFunctionType::
 void CPPFunctionType::
 output(ostream &out, int indent_level, CPPScope *scope, bool complete) const {
 output(ostream &out, int indent_level, CPPScope *scope, bool complete) const {
@@ -223,10 +236,10 @@ output_instance(ostream &out, int indent_level, CPPScope *scope,
 
 
   } else {
   } else {
     if (prename.empty()) {
     if (prename.empty()) {
-      _return_type->output_instance(out, indent_level, scope, complete, 
+      _return_type->output_instance(out, indent_level, scope, complete,
                                     "", prename + name + str);
                                     "", prename + name + str);
     } else {
     } else {
-      _return_type->output_instance(out, indent_level, scope, complete, 
+      _return_type->output_instance(out, indent_level, scope, complete,
                                     "", "(" + prename + name + ")" + str);
                                     "", "(" + prename + name + ")" + str);
     }
     }
   }
   }
@@ -251,8 +264,8 @@ get_num_default_parameters() const {
   const CPPParameterList::Parameters &params = _parameters->_parameters;
   const CPPParameterList::Parameters &params = _parameters->_parameters;
   CPPParameterList::Parameters::const_reverse_iterator pi;
   CPPParameterList::Parameters::const_reverse_iterator pi;
   int count = 0;
   int count = 0;
-  for (pi = params.rbegin(); 
-       pi != params.rend() && (*pi)->_initializer != (CPPExpression *)NULL; 
+  for (pi = params.rbegin();
+       pi != params.rend() && (*pi)->_initializer != (CPPExpression *)NULL;
        ++pi) {
        ++pi) {
     count++;
     count++;
   }
   }
@@ -263,7 +276,7 @@ get_num_default_parameters() const {
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 //     Function: CPPFunctionType::get_subtype
 //     Function: CPPFunctionType::get_subtype
 //       Access: Public, Virtual
 //       Access: Public, Virtual
-//  Description: 
+//  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 CPPDeclaration::SubType CPPFunctionType::
 CPPDeclaration::SubType CPPFunctionType::
 get_subtype() const {
 get_subtype() const {
@@ -273,7 +286,7 @@ get_subtype() const {
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 //     Function: CPPFunctionType::as_function_type
 //     Function: CPPFunctionType::as_function_type
 //       Access: Public, Virtual
 //       Access: Public, Virtual
-//  Description: 
+//  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 CPPFunctionType *CPPFunctionType::
 CPPFunctionType *CPPFunctionType::
 as_function_type() {
 as_function_type() {

+ 13 - 0
dtool/src/cppparser/cppFunctionType.h

@@ -2,6 +2,19 @@
 // Created by:  drose (21Oct99)
 // Created by:  drose (21Oct99)
 //
 //
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
+//
+// PANDA 3D SOFTWARE
+// Copyright (c) 2001, Disney Enterprises, Inc.  All rights reserved
+//
+// All use of this software is subject to the terms of the Panda 3d
+// Software license.  You should have received a copy of this license
+// along with this source code; you will also find a current copy of
+// the license at http://www.panda3d.org/license.txt .
+//
+// To contact the maintainers of this program write to
+// [email protected] .
+//
+////////////////////////////////////////////////////////////////////
 
 
 #ifndef CPPFUNCTIONTYPE_H
 #ifndef CPPFUNCTIONTYPE_H
 #define CPPFUNCTIONTYPE_H
 #define CPPFUNCTIONTYPE_H

+ 15 - 2
dtool/src/cppparser/cppGlobals.cxx

@@ -1,6 +1,19 @@
-// Filename: cppGlobals.C
+// Filename: cppGlobals.cxx
 // Created by:  drose (16May00)
 // Created by:  drose (16May00)
-// 
+//
+////////////////////////////////////////////////////////////////////
+//
+// PANDA 3D SOFTWARE
+// Copyright (c) 2001, Disney Enterprises, Inc.  All rights reserved
+//
+// All use of this software is subject to the terms of the Panda 3d
+// Software license.  You should have received a copy of this license
+// along with this source code; you will also find a current copy of
+// the license at http://www.panda3d.org/license.txt .
+//
+// To contact the maintainers of this program write to
+// [email protected] .
+//
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 
 
 #include "cppGlobals.h"
 #include "cppGlobals.h"

+ 14 - 1
dtool/src/cppparser/cppGlobals.h

@@ -1,6 +1,19 @@
 // Filename: cppGlobals.h
 // Filename: cppGlobals.h
 // Created by:  drose (16May00)
 // Created by:  drose (16May00)
-// 
+//
+////////////////////////////////////////////////////////////////////
+//
+// PANDA 3D SOFTWARE
+// Copyright (c) 2001, Disney Enterprises, Inc.  All rights reserved
+//
+// All use of this software is subject to the terms of the Panda 3d
+// Software license.  You should have received a copy of this license
+// along with this source code; you will also find a current copy of
+// the license at http://www.panda3d.org/license.txt .
+//
+// To contact the maintainers of this program write to
+// [email protected] .
+//
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 
 
 #ifndef CPPGLOBALS_H
 #ifndef CPPGLOBALS_H

+ 43 - 30
dtool/src/cppparser/cppIdentifier.cxx

@@ -1,6 +1,19 @@
-// Filename: cppIdentifier.C
+// Filename: cppIdentifier.cxx
 // Created by:  drose (26Oct99)
 // Created by:  drose (26Oct99)
-// 
+//
+////////////////////////////////////////////////////////////////////
+//
+// PANDA 3D SOFTWARE
+// Copyright (c) 2001, Disney Enterprises, Inc.  All rights reserved
+//
+// All use of this software is subject to the terms of the Panda 3d
+// Software license.  You should have received a copy of this license
+// along with this source code; you will also find a current copy of
+// the license at http://www.panda3d.org/license.txt .
+//
+// To contact the maintainers of this program write to
+// [email protected] .
+//
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 
 
 
 
@@ -16,7 +29,7 @@
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 //     Function: CPPIdentifier::Constructor
 //     Function: CPPIdentifier::Constructor
 //       Access: Public
 //       Access: Public
-//  Description: 
+//  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 CPPIdentifier::
 CPPIdentifier::
 CPPIdentifier(const string &name, const CPPFile &file) : _file(file) {
 CPPIdentifier(const string &name, const CPPFile &file) : _file(file) {
@@ -27,7 +40,7 @@ CPPIdentifier(const string &name, const CPPFile &file) : _file(file) {
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 //     Function: CPPIdentifier::Constructor
 //     Function: CPPIdentifier::Constructor
 //       Access: Public
 //       Access: Public
-//  Description: 
+//  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 CPPIdentifier::
 CPPIdentifier::
 CPPIdentifier(const CPPNameComponent &name) {
 CPPIdentifier(const CPPNameComponent &name) {
@@ -38,7 +51,7 @@ CPPIdentifier(const CPPNameComponent &name) {
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 //     Function: CPPIdentifier::add_name
 //     Function: CPPIdentifier::add_name
 //       Access: Public
 //       Access: Public
-//  Description: 
+//  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 void CPPIdentifier::
 void CPPIdentifier::
 add_name(const string &name) {
 add_name(const string &name) {
@@ -48,7 +61,7 @@ add_name(const string &name) {
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 //     Function: CPPIdentifier::add_name
 //     Function: CPPIdentifier::add_name
 //       Access: Public
 //       Access: Public
-//  Description: 
+//  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 void CPPIdentifier::
 void CPPIdentifier::
 add_name(const CPPNameComponent &name) {
 add_name(const CPPNameComponent &name) {
@@ -58,7 +71,7 @@ add_name(const CPPNameComponent &name) {
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 //     Function: CPPIdentifier::Equivalence Operator
 //     Function: CPPIdentifier::Equivalence Operator
 //       Access: Public
 //       Access: Public
-//  Description: 
+//  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 bool CPPIdentifier::
 bool CPPIdentifier::
 operator == (const CPPIdentifier &other) const {
 operator == (const CPPIdentifier &other) const {
@@ -75,9 +88,9 @@ operator == (const CPPIdentifier &other) const {
 }
 }
 
 
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
-//     Function: CPPIdentifier::Nonequivalence Operator 
+//     Function: CPPIdentifier::Nonequivalence Operator
 //       Access: Public
 //       Access: Public
-//  Description: 
+//  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 bool CPPIdentifier::
 bool CPPIdentifier::
 operator != (const CPPIdentifier &other) const {
 operator != (const CPPIdentifier &other) const {
@@ -87,7 +100,7 @@ operator != (const CPPIdentifier &other) const {
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 //     Function: CPPIdentifier::Ordering Operator
 //     Function: CPPIdentifier::Ordering Operator
 //       Access: Public
 //       Access: Public
-//  Description: 
+//  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 bool CPPIdentifier::
 bool CPPIdentifier::
 operator < (const CPPIdentifier &other) const {
 operator < (const CPPIdentifier &other) const {
@@ -106,7 +119,7 @@ operator < (const CPPIdentifier &other) const {
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 //     Function: CPPIdentifier::is_scoped
 //     Function: CPPIdentifier::is_scoped
 //       Access: Public
 //       Access: Public
-//  Description: 
+//  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 bool CPPIdentifier::
 bool CPPIdentifier::
 is_scoped() const {
 is_scoped() const {
@@ -117,7 +130,7 @@ is_scoped() const {
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 //     Function: CPPIdentifier::get_simple_name
 //     Function: CPPIdentifier::get_simple_name
 //       Access: Public
 //       Access: Public
-//  Description: 
+//  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 string CPPIdentifier::
 string CPPIdentifier::
 get_simple_name() const {
 get_simple_name() const {
@@ -127,7 +140,7 @@ get_simple_name() const {
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 //     Function: CPPIdentifier::get_local_name
 //     Function: CPPIdentifier::get_local_name
 //       Access: Public
 //       Access: Public
-//  Description: 
+//  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 string CPPIdentifier::
 string CPPIdentifier::
 get_local_name(CPPScope *scope) const {
 get_local_name(CPPScope *scope) const {
@@ -143,7 +156,7 @@ get_local_name(CPPScope *scope) const {
     // Determine the scope of everything up until but not including the
     // Determine the scope of everything up until but not including the
     // last name.
     // last name.
     CPPScope *my_scope = get_scope(scope, NULL);
     CPPScope *my_scope = get_scope(scope, NULL);
-    
+
     if (my_scope == NULL) {
     if (my_scope == NULL) {
       result = get_fully_scoped_name();
       result = get_fully_scoped_name();
     } else if (my_scope == scope) {
     } else if (my_scope == scope) {
@@ -162,7 +175,7 @@ get_local_name(CPPScope *scope) const {
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 //     Function: CPPIdentifier::get_fully_scoped_name
 //     Function: CPPIdentifier::get_fully_scoped_name
 //       Access: Public
 //       Access: Public
-//  Description: 
+//  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 string CPPIdentifier::
 string CPPIdentifier::
 get_fully_scoped_name() const {
 get_fully_scoped_name() const {
@@ -219,7 +232,7 @@ is_tbd() const {
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 //     Function: CPPIdentifier::get_scope
 //     Function: CPPIdentifier::get_scope
 //       Access: Public
 //       Access: Public
-//  Description: 
+//  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 CPPScope *CPPIdentifier::
 CPPScope *CPPIdentifier::
 get_scope(CPPScope *current_scope, CPPScope *global_scope,
 get_scope(CPPScope *current_scope, CPPScope *global_scope,
@@ -263,7 +276,7 @@ get_scope(CPPScope *current_scope, CPPScope *global_scope,
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 //     Function: CPPIdentifier::get_scope
 //     Function: CPPIdentifier::get_scope
 //       Access: Public
 //       Access: Public
-//  Description: 
+//  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 CPPScope *CPPIdentifier::
 CPPScope *CPPIdentifier::
 get_scope(CPPScope *current_scope, CPPScope *global_scope,
 get_scope(CPPScope *current_scope, CPPScope *global_scope,
@@ -339,7 +352,7 @@ find_type(CPPScope *current_scope, CPPScope *global_scope,
     if (type != NULL) {
     if (type != NULL) {
       if (!type->is_incomplete() || force_instantiate) {
       if (!type->is_incomplete() || force_instantiate) {
         type = type->instantiate(_names.back().get_templ(),
         type = type->instantiate(_names.back().get_templ(),
-                                 current_scope, global_scope, 
+                                 current_scope, global_scope,
                                  error_sink)->as_type();
                                  error_sink)->as_type();
 
 
         // If we ended up with another template, instantiate later.
         // If we ended up with another template, instantiate later.
@@ -380,9 +393,9 @@ find_type(CPPScope *current_scope, CPPScope *global_scope,
     if (is_fully_specified()) {
     if (is_fully_specified()) {
       // If our identifier fully specifies the instantiation, then
       // If our identifier fully specifies the instantiation, then
       // apply it.
       // apply it.
-      CPPDeclaration *decl = 
+      CPPDeclaration *decl =
         type->instantiate(_names.back().get_templ(),
         type->instantiate(_names.back().get_templ(),
-                          current_scope, global_scope, 
+                          current_scope, global_scope,
                           error_sink);
                           error_sink);
       assert(decl != NULL);
       assert(decl != NULL);
       CPPType *new_type = decl->as_type();
       CPPType *new_type = decl->as_type();
@@ -398,7 +411,7 @@ find_type(CPPScope *current_scope, CPPScope *global_scope,
       type = CPPType::new_type(new CPPTBDType((CPPIdentifier *)this));
       type = CPPType::new_type(new CPPTBDType((CPPIdentifier *)this));
     }
     }
     //    type->_file.replace_nearer(_file);
     //    type->_file.replace_nearer(_file);
-  }    
+  }
   return type;
   return type;
 }
 }
 
 
@@ -406,7 +419,7 @@ find_type(CPPScope *current_scope, CPPScope *global_scope,
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 //     Function: CPPIdentifier::find_symbol
 //     Function: CPPIdentifier::find_symbol
 //       Access: Public
 //       Access: Public
-//  Description: 
+//  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 CPPDeclaration *CPPIdentifier::
 CPPDeclaration *CPPIdentifier::
 find_symbol(CPPScope *current_scope, CPPScope *global_scope,
 find_symbol(CPPScope *current_scope, CPPScope *global_scope,
@@ -428,7 +441,7 @@ find_symbol(CPPScope *current_scope, CPPScope *global_scope,
         sym = CPPType::new_type(new CPPTBDType((CPPIdentifier *)this));
         sym = CPPType::new_type(new CPPTBDType((CPPIdentifier *)this));
       } else {
       } else {
         // Instantiate the symbol.
         // Instantiate the symbol.
-        sym = sym->instantiate(_names.back().get_templ(), current_scope, 
+        sym = sym->instantiate(_names.back().get_templ(), current_scope,
                                global_scope, error_sink);
                                global_scope, error_sink);
       }
       }
     }
     }
@@ -440,7 +453,7 @@ find_symbol(CPPScope *current_scope, CPPScope *global_scope,
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 //     Function: CPPIdentifier::find_template
 //     Function: CPPIdentifier::find_template
 //       Access: Public
 //       Access: Public
-//  Description: 
+//  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 CPPDeclaration *CPPIdentifier::
 CPPDeclaration *CPPIdentifier::
 find_template(CPPScope *current_scope, CPPScope *global_scope,
 find_template(CPPScope *current_scope, CPPScope *global_scope,
@@ -455,7 +468,7 @@ find_template(CPPScope *current_scope, CPPScope *global_scope,
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 //     Function: CPPIdentifier::find_scope
 //     Function: CPPIdentifier::find_scope
 //       Access: Public
 //       Access: Public
-//  Description: 
+//  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 CPPScope *CPPIdentifier::
 CPPScope *CPPIdentifier::
 find_scope(CPPScope *current_scope, CPPScope *global_scope,
 find_scope(CPPScope *current_scope, CPPScope *global_scope,
@@ -471,7 +484,7 @@ find_scope(CPPScope *current_scope, CPPScope *global_scope,
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 //     Function: CPPIdentifier::substitute_decl
 //     Function: CPPIdentifier::substitute_decl
 //       Access: Public
 //       Access: Public
-//  Description: 
+//  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 CPPIdentifier *CPPIdentifier::
 CPPIdentifier *CPPIdentifier::
 substitute_decl(CPPDeclaration::SubstDecl &subst,
 substitute_decl(CPPDeclaration::SubstDecl &subst,
@@ -500,7 +513,7 @@ substitute_decl(CPPDeclaration::SubstDecl &subst,
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 //     Function: CPPIdentifier::output
 //     Function: CPPIdentifier::output
 //       Access: Public
 //       Access: Public
-//  Description: 
+//  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 void CPPIdentifier::
 void CPPIdentifier::
 output(ostream &out, CPPScope *scope) const {
 output(ostream &out, CPPScope *scope) const {
@@ -515,7 +528,7 @@ output(ostream &out, CPPScope *scope) const {
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 //     Function: CPPIdentifier::output_local_name
 //     Function: CPPIdentifier::output_local_name
 //       Access: Public
 //       Access: Public
-//  Description: 
+//  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 void CPPIdentifier::
 void CPPIdentifier::
 output_local_name(ostream &out, CPPScope *scope) const {
 output_local_name(ostream &out, CPPScope *scope) const {
@@ -529,7 +542,7 @@ output_local_name(ostream &out, CPPScope *scope) const {
     // Determine the scope of everything up until but not including the
     // Determine the scope of everything up until but not including the
     // last name.
     // last name.
     CPPScope *my_scope = get_scope(scope, NULL);
     CPPScope *my_scope = get_scope(scope, NULL);
-    
+
     if (my_scope == NULL) {
     if (my_scope == NULL) {
       output_fully_scoped_name(out);
       output_fully_scoped_name(out);
     } else {
     } else {
@@ -541,7 +554,7 @@ output_local_name(ostream &out, CPPScope *scope) const {
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 //     Function: CPPIdentifier::output_fully_scoped_name
 //     Function: CPPIdentifier::output_fully_scoped_name
 //       Access: Public
 //       Access: Public
-//  Description: 
+//  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 void CPPIdentifier::
 void CPPIdentifier::
 output_fully_scoped_name(ostream &out) const {
 output_fully_scoped_name(ostream &out) const {

+ 13 - 0
dtool/src/cppparser/cppIdentifier.h

@@ -2,6 +2,19 @@
 // Created by:  drose (26Oct99)
 // Created by:  drose (26Oct99)
 //
 //
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
+//
+// PANDA 3D SOFTWARE
+// Copyright (c) 2001, Disney Enterprises, Inc.  All rights reserved
+//
+// All use of this software is subject to the terms of the Panda 3d
+// Software license.  You should have received a copy of this license
+// along with this source code; you will also find a current copy of
+// the license at http://www.panda3d.org/license.txt .
+//
+// To contact the maintainers of this program write to
+// [email protected] .
+//
+////////////////////////////////////////////////////////////////////
 
 
 #ifndef CPPIDENTIFIER_H
 #ifndef CPPIDENTIFIER_H
 #define CPPIDENTIFIER_H
 #define CPPIDENTIFIER_H

+ 45 - 32
dtool/src/cppparser/cppInstance.cxx

@@ -1,6 +1,19 @@
-// Filename: cppInstance.C
+// Filename: cppInstance.cxx
 // Created by:  drose (19Oct99)
 // Created by:  drose (19Oct99)
-// 
+//
+////////////////////////////////////////////////////////////////////
+//
+// PANDA 3D SOFTWARE
+// Copyright (c) 2001, Disney Enterprises, Inc.  All rights reserved
+//
+// All use of this software is subject to the terms of the Panda 3d
+// Software license.  You should have received a copy of this license
+// along with this source code; you will also find a current copy of
+// the license at http://www.panda3d.org/license.txt .
+//
+// To contact the maintainers of this program write to
+// [email protected] .
+//
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 
 
 
 
@@ -22,7 +35,7 @@
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 //     Function: CPPInstance::Constructor
 //     Function: CPPInstance::Constructor
 //       Access: Public
 //       Access: Public
-//  Description: 
+//  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 CPPInstance::
 CPPInstance::
 CPPInstance(CPPType *type, const string &name, int storage_class) :
 CPPInstance(CPPType *type, const string &name, int storage_class) :
@@ -37,7 +50,7 @@ CPPInstance(CPPType *type, const string &name, int storage_class) :
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 //     Function: CPPInstance::Constructor
 //     Function: CPPInstance::Constructor
 //       Access: Public
 //       Access: Public
-//  Description: 
+//  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 CPPInstance::
 CPPInstance::
 CPPInstance(CPPType *type, CPPIdentifier *ident, int storage_class) :
 CPPInstance(CPPType *type, CPPIdentifier *ident, int storage_class) :
@@ -73,7 +86,7 @@ CPPInstance(CPPType *type, CPPInstanceIdentifier *ii, int storage_class,
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 //     Function: CPPInstance::Copy Constructor
 //     Function: CPPInstance::Copy Constructor
 //       Access: Public
 //       Access: Public
-//  Description: 
+//  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 CPPInstance::
 CPPInstance::
 CPPInstance(const CPPInstance &copy) :
 CPPInstance(const CPPInstance &copy) :
@@ -89,7 +102,7 @@ CPPInstance(const CPPInstance &copy) :
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 //     Function: CPPInstance::Destructor
 //     Function: CPPInstance::Destructor
 //       Access: Public
 //       Access: Public
-//  Description: 
+//  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 CPPInstance::
 CPPInstance::
 ~CPPInstance() {
 ~CPPInstance() {
@@ -110,10 +123,10 @@ make_typecast_function(CPPInstance *inst, CPPIdentifier *ident,
                        CPPParameterList *parameters, int function_flags) {
                        CPPParameterList *parameters, int function_flags) {
   CPPType *type = CPPType::new_type(inst->_type);
   CPPType *type = CPPType::new_type(inst->_type);
   delete inst;
   delete inst;
-      
+
   function_flags |= (int)CPPFunctionType::F_operator_typecast;
   function_flags |= (int)CPPFunctionType::F_operator_typecast;
 
 
-  CPPType *ft = 
+  CPPType *ft =
     CPPType::new_type(new CPPFunctionType(type, parameters, function_flags));
     CPPType::new_type(new CPPFunctionType(type, parameters, function_flags));
 
 
   return new CPPInstance(ft, ident);
   return new CPPInstance(ft, ident);
@@ -122,7 +135,7 @@ make_typecast_function(CPPInstance *inst, CPPIdentifier *ident,
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 //     Function: CPPInstance::Equivalence Operator
 //     Function: CPPInstance::Equivalence Operator
 //       Access: Public
 //       Access: Public
-//  Description: 
+//  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 bool CPPInstance::
 bool CPPInstance::
 operator == (const CPPInstance &other) const {
 operator == (const CPPInstance &other) const {
@@ -138,7 +151,7 @@ operator == (const CPPInstance &other) const {
   // on the identifier.
   // on the identifier.
   if ((_ident == NULL && other._ident != NULL) ||
   if ((_ident == NULL && other._ident != NULL) ||
       (_ident != NULL && other._ident == NULL) ||
       (_ident != NULL && other._ident == NULL) ||
-      (_ident != NULL && other._ident != NULL && *_ident != *other._ident)) 
+      (_ident != NULL && other._ident != NULL && *_ident != *other._ident))
   {
   {
     return false;
     return false;
   }
   }
@@ -147,7 +160,7 @@ operator == (const CPPInstance &other) const {
   if ((_initializer == NULL && other._initializer != NULL) ||
   if ((_initializer == NULL && other._initializer != NULL) ||
       (_initializer != NULL && other._initializer == NULL) ||
       (_initializer != NULL && other._initializer == NULL) ||
       (_initializer != NULL && other._initializer != NULL &&
       (_initializer != NULL && other._initializer != NULL &&
-       *_initializer != *other._initializer)) 
+       *_initializer != *other._initializer))
   {
   {
     return false;
     return false;
   }
   }
@@ -158,7 +171,7 @@ operator == (const CPPInstance &other) const {
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 //     Function: CPPInstance::Nonequivalence Operator
 //     Function: CPPInstance::Nonequivalence Operator
 //       Access: Public
 //       Access: Public
-//  Description: 
+//  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 bool CPPInstance::
 bool CPPInstance::
 operator != (const CPPInstance &other) const {
 operator != (const CPPInstance &other) const {
@@ -168,7 +181,7 @@ operator != (const CPPInstance &other) const {
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 //     Function: CPPInstance::Ordering Operator
 //     Function: CPPInstance::Ordering Operator
 //       Access: Public
 //       Access: Public
-//  Description: 
+//  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 bool CPPInstance::
 bool CPPInstance::
 operator < (const CPPInstance &other) const {
 operator < (const CPPInstance &other) const {
@@ -184,7 +197,7 @@ operator < (const CPPInstance &other) const {
   // on the identifier.
   // on the identifier.
   if ((_ident == NULL && other._ident != NULL) ||
   if ((_ident == NULL && other._ident != NULL) ||
       (_ident != NULL && other._ident == NULL) ||
       (_ident != NULL && other._ident == NULL) ||
-      (_ident != NULL && other._ident != NULL && *_ident != *other._ident)) 
+      (_ident != NULL && other._ident != NULL && *_ident != *other._ident))
   {
   {
     if (_ident == NULL || other._ident == NULL) {
     if (_ident == NULL || other._ident == NULL) {
       return _ident < other._ident;
       return _ident < other._ident;
@@ -196,7 +209,7 @@ operator < (const CPPInstance &other) const {
   if ((_initializer == NULL && other._initializer != NULL) ||
   if ((_initializer == NULL && other._initializer != NULL) ||
       (_initializer != NULL && other._initializer == NULL) ||
       (_initializer != NULL && other._initializer == NULL) ||
       (_initializer != NULL && other._initializer != NULL &&
       (_initializer != NULL && other._initializer != NULL &&
-       *_initializer != *other._initializer)) 
+       *_initializer != *other._initializer))
   {
   {
     if (_initializer == NULL || other._initializer == NULL) {
     if (_initializer == NULL || other._initializer == NULL) {
       return _initializer < other._initializer;
       return _initializer < other._initializer;
@@ -234,7 +247,7 @@ set_initializer(CPPExpression *initializer) {
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 //     Function: CPPInstance::is_scoped
 //     Function: CPPInstance::is_scoped
 //       Access: Public
 //       Access: Public
-//  Description: 
+//  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 bool CPPInstance::
 bool CPPInstance::
 is_scoped() const {
 is_scoped() const {
@@ -248,7 +261,7 @@ is_scoped() const {
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 //     Function: CPPInstance::get_scope
 //     Function: CPPInstance::get_scope
 //       Access: Public
 //       Access: Public
-//  Description: 
+//  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 CPPScope *CPPInstance::
 CPPScope *CPPInstance::
 get_scope(CPPScope *current_scope, CPPScope *global_scope,
 get_scope(CPPScope *current_scope, CPPScope *global_scope,
@@ -263,7 +276,7 @@ get_scope(CPPScope *current_scope, CPPScope *global_scope,
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 //     Function: CPPInstance::get_simple_name
 //     Function: CPPInstance::get_simple_name
 //       Access: Public
 //       Access: Public
-//  Description: 
+//  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 string CPPInstance::
 string CPPInstance::
 get_simple_name() const {
 get_simple_name() const {
@@ -277,7 +290,7 @@ get_simple_name() const {
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 //     Function: CPPInstance::get_local_name
 //     Function: CPPInstance::get_local_name
 //       Access: Public
 //       Access: Public
-//  Description: 
+//  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 string CPPInstance::
 string CPPInstance::
 get_local_name(CPPScope *scope) const {
 get_local_name(CPPScope *scope) const {
@@ -291,7 +304,7 @@ get_local_name(CPPScope *scope) const {
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 //     Function: CPPInstance::get_fully_scoped_name
 //     Function: CPPInstance::get_fully_scoped_name
 //       Access: Public
 //       Access: Public
-//  Description: 
+//  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 string CPPInstance::
 string CPPInstance::
 get_fully_scoped_name() const {
 get_fully_scoped_name() const {
@@ -327,7 +340,7 @@ check_for_constructor(CPPScope *current_scope, CPPScope *global_scope) {
           (new CPPSimpleType(CPPSimpleType::T_void));
           (new CPPSimpleType(CPPSimpleType::T_void));
 
 
         _type = CPPType::new_type
         _type = CPPType::new_type
-          (new CPPFunctionType(void_type, func->_parameters, 
+          (new CPPFunctionType(void_type, func->_parameters,
                                func->_flags | CPPFunctionType::F_constructor));
                                func->_flags | CPPFunctionType::F_constructor));
 
 
       } else if (method_name == "~" + class_name) {
       } else if (method_name == "~" + class_name) {
@@ -335,7 +348,7 @@ check_for_constructor(CPPScope *current_scope, CPPScope *global_scope) {
           (new CPPSimpleType(CPPSimpleType::T_void));
           (new CPPSimpleType(CPPSimpleType::T_void));
 
 
         _type = CPPType::new_type
         _type = CPPType::new_type
-          (new CPPFunctionType(void_type, func->_parameters, 
+          (new CPPFunctionType(void_type, func->_parameters,
                                func->_flags | CPPFunctionType::F_destructor));
                                func->_flags | CPPFunctionType::F_destructor));
       }
       }
     }
     }
@@ -345,7 +358,7 @@ check_for_constructor(CPPScope *current_scope, CPPScope *global_scope) {
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 //     Function: CPPInstance::instantiate
 //     Function: CPPInstance::instantiate
 //       Access: Public
 //       Access: Public
-//  Description: 
+//  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 CPPDeclaration *CPPInstance::
 CPPDeclaration *CPPInstance::
 instantiate(const CPPTemplateParameterList *actual_params,
 instantiate(const CPPTemplateParameterList *actual_params,
@@ -353,7 +366,7 @@ instantiate(const CPPTemplateParameterList *actual_params,
             CPPPreprocessor *error_sink) const {
             CPPPreprocessor *error_sink) const {
   if (!is_template()) {
   if (!is_template()) {
     if (error_sink != NULL) {
     if (error_sink != NULL) {
-      error_sink->warning("Ignoring template parameters for instance " + 
+      error_sink->warning("Ignoring template parameters for instance " +
                           _ident->get_local_name());
                           _ident->get_local_name());
     }
     }
     return (CPPInstance *)this;
     return (CPPInstance *)this;
@@ -374,7 +387,7 @@ instantiate(const CPPTemplateParameterList *actual_params,
   actual_params->build_subst_decl(tscope->_parameters, subst,
   actual_params->build_subst_decl(tscope->_parameters, subst,
                                   current_scope, global_scope);
                                   current_scope, global_scope);
 
 
-  CPPInstance *inst = 
+  CPPInstance *inst =
     ((CPPInstance *)this)->substitute_decl(subst, current_scope, global_scope)
     ((CPPInstance *)this)->substitute_decl(subst, current_scope, global_scope)
     ->as_instance();
     ->as_instance();
   if (inst == this) {
   if (inst == this) {
@@ -419,19 +432,19 @@ is_fully_specified() const {
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 //     Function: CPPInstance::substitute_decl
 //     Function: CPPInstance::substitute_decl
 //       Access: Public, Virtual
 //       Access: Public, Virtual
-//  Description: 
+//  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 CPPDeclaration *CPPInstance::
 CPPDeclaration *CPPInstance::
 substitute_decl(CPPDeclaration::SubstDecl &subst,
 substitute_decl(CPPDeclaration::SubstDecl &subst,
                 CPPScope *current_scope, CPPScope *global_scope) {
                 CPPScope *current_scope, CPPScope *global_scope) {
-  CPPDeclaration *top = 
+  CPPDeclaration *top =
     CPPDeclaration::substitute_decl(subst, current_scope, global_scope);
     CPPDeclaration::substitute_decl(subst, current_scope, global_scope);
   if (top != this) {
   if (top != this) {
     return top;
     return top;
   }
   }
 
 
   CPPInstance *rep = new CPPInstance(*this);
   CPPInstance *rep = new CPPInstance(*this);
-  CPPDeclaration *new_type = 
+  CPPDeclaration *new_type =
     _type->substitute_decl(subst, current_scope, global_scope);
     _type->substitute_decl(subst, current_scope, global_scope);
   rep->_type = new_type->as_type();
   rep->_type = new_type->as_type();
 
 
@@ -441,7 +454,7 @@ substitute_decl(CPPDeclaration::SubstDecl &subst,
   }
   }
 
 
   if (_initializer != NULL) {
   if (_initializer != NULL) {
-    rep->_initializer = 
+    rep->_initializer =
       _initializer->substitute_decl(subst, current_scope, global_scope)
       _initializer->substitute_decl(subst, current_scope, global_scope)
       ->as_expression();
       ->as_expression();
   }
   }
@@ -459,7 +472,7 @@ substitute_decl(CPPDeclaration::SubstDecl &subst,
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 //     Function: CPPInstance::output
 //     Function: CPPInstance::output
 //       Access: Public, Virtual
 //       Access: Public, Virtual
-//  Description: 
+//  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 void CPPInstance::
 void CPPInstance::
 output(ostream &out, int indent_level, CPPScope *scope, bool complete) const {
 output(ostream &out, int indent_level, CPPScope *scope, bool complete) const {
@@ -534,7 +547,7 @@ output(ostream &out, int indent_level, CPPScope *scope, bool complete,
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 //     Function: CPPInstance::get_subtype
 //     Function: CPPInstance::get_subtype
 //       Access: Public, Virtual
 //       Access: Public, Virtual
-//  Description: 
+//  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 CPPDeclaration::SubType CPPInstance::
 CPPDeclaration::SubType CPPInstance::
 get_subtype() const {
 get_subtype() const {
@@ -544,7 +557,7 @@ get_subtype() const {
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 //     Function: CPPInstance::as_instance
 //     Function: CPPInstance::as_instance
 //       Access: Public, Virtual
 //       Access: Public, Virtual
-//  Description: 
+//  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 CPPInstance *CPPInstance::
 CPPInstance *CPPInstance::
 as_instance() {
 as_instance() {

+ 14 - 1
dtool/src/cppparser/cppInstance.h

@@ -2,6 +2,19 @@
 // Created by:  drose (19Oct99)
 // Created by:  drose (19Oct99)
 //
 //
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
+//
+// PANDA 3D SOFTWARE
+// Copyright (c) 2001, Disney Enterprises, Inc.  All rights reserved
+//
+// All use of this software is subject to the terms of the Panda 3d
+// Software license.  You should have received a copy of this license
+// along with this source code; you will also find a current copy of
+// the license at http://www.panda3d.org/license.txt .
+//
+// To contact the maintainers of this program write to
+// [email protected] .
+//
+////////////////////////////////////////////////////////////////////
 
 
 #ifndef CPPINSTANCE_H
 #ifndef CPPINSTANCE_H
 #define CPPINSTANCE_H
 #define CPPINSTANCE_H
@@ -40,7 +53,7 @@ public:
     SC_mutable      = 0x200,
     SC_mutable      = 0x200,
 
 
     // This bit is only set by CPPStructType::check_virtual().
     // This bit is only set by CPPStructType::check_virtual().
-    SC_inherited_virtual = 0x400, 
+    SC_inherited_virtual = 0x400,
   };
   };
 
 
   CPPInstance(CPPType *type, const string &name, int storage_class = 0);
   CPPInstance(CPPType *type, const string &name, int storage_class = 0);

+ 24 - 11
dtool/src/cppparser/cppInstanceIdentifier.cxx

@@ -1,6 +1,19 @@
-// Filename: cppInstanceIdentifier.C
+// Filename: cppInstanceIdentifier.cxx
 // Created by:  drose (21Oct99)
 // Created by:  drose (21Oct99)
-// 
+//
+////////////////////////////////////////////////////////////////////
+//
+// PANDA 3D SOFTWARE
+// Copyright (c) 2001, Disney Enterprises, Inc.  All rights reserved
+//
+// All use of this software is subject to the terms of the Panda 3d
+// Software license.  You should have received a copy of this license
+// along with this source code; you will also find a current copy of
+// the license at http://www.panda3d.org/license.txt .
+//
+// To contact the maintainers of this program write to
+// [email protected] .
+//
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 
 
 
 
@@ -16,7 +29,7 @@
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 //     Function: CPPInstanceIdentifier::Modifier::Constructor
 //     Function: CPPInstanceIdentifier::Modifier::Constructor
 //       Access: Public
 //       Access: Public
-//  Description: 
+//  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 CPPInstanceIdentifier::Modifier::
 CPPInstanceIdentifier::Modifier::
 Modifier(CPPInstanceIdentifierType type) :
 Modifier(CPPInstanceIdentifierType type) :
@@ -31,7 +44,7 @@ Modifier(CPPInstanceIdentifierType type) :
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 //     Function: CPPInstanceIdentifier::Modifier::named func_type constructor
 //     Function: CPPInstanceIdentifier::Modifier::named func_type constructor
 //       Access: Public, Static
 //       Access: Public, Static
-//  Description: 
+//  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 CPPInstanceIdentifier::Modifier CPPInstanceIdentifier::Modifier::
 CPPInstanceIdentifier::Modifier CPPInstanceIdentifier::Modifier::
 func_type(CPPParameterList *params, int flags) {
 func_type(CPPParameterList *params, int flags) {
@@ -44,7 +57,7 @@ func_type(CPPParameterList *params, int flags) {
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 //     Function: CPPInstanceIdentifier::Modifier::named array_type constructor
 //     Function: CPPInstanceIdentifier::Modifier::named array_type constructor
 //       Access: Public, Static
 //       Access: Public, Static
-//  Description: 
+//  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 CPPInstanceIdentifier::Modifier CPPInstanceIdentifier::Modifier::
 CPPInstanceIdentifier::Modifier CPPInstanceIdentifier::Modifier::
 array_type(CPPExpression *expr) {
 array_type(CPPExpression *expr) {
@@ -56,7 +69,7 @@ array_type(CPPExpression *expr) {
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 //     Function: CPPInstanceIdentifier::Modifier::named scoped_pointer_type
 //     Function: CPPInstanceIdentifier::Modifier::named scoped_pointer_type
 //       Access: Public, Static
 //       Access: Public, Static
-//  Description: 
+//  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 CPPInstanceIdentifier::Modifier CPPInstanceIdentifier::Modifier::
 CPPInstanceIdentifier::Modifier CPPInstanceIdentifier::Modifier::
 scoped_pointer_type(CPPIdentifier *scoping) {
 scoped_pointer_type(CPPIdentifier *scoping) {
@@ -68,7 +81,7 @@ scoped_pointer_type(CPPIdentifier *scoping) {
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 //     Function: CPPInstanceIdentifier::Constructor
 //     Function: CPPInstanceIdentifier::Constructor
 //       Access: Public
 //       Access: Public
-//  Description: 
+//  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 CPPInstanceIdentifier::
 CPPInstanceIdentifier::
 CPPInstanceIdentifier(CPPIdentifier *ident) : _ident(ident) {
 CPPInstanceIdentifier(CPPIdentifier *ident) : _ident(ident) {
@@ -93,7 +106,7 @@ unroll_type(CPPType *start_type) {
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 //     Function: CPPInstanceIdentifier::add_modifier
 //     Function: CPPInstanceIdentifier::add_modifier
 //       Access: Public
 //       Access: Public
-//  Description: 
+//  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 void CPPInstanceIdentifier::
 void CPPInstanceIdentifier::
 add_modifier(CPPInstanceIdentifierType type) {
 add_modifier(CPPInstanceIdentifierType type) {
@@ -103,7 +116,7 @@ add_modifier(CPPInstanceIdentifierType type) {
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 //     Function: CPPInstanceIdentifier::add_modifier
 //     Function: CPPInstanceIdentifier::add_modifier
 //       Access: Public
 //       Access: Public
-//  Description: 
+//  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 void CPPInstanceIdentifier::
 void CPPInstanceIdentifier::
 add_func_modifier(CPPParameterList *params, int flags) {
 add_func_modifier(CPPParameterList *params, int flags) {
@@ -118,7 +131,7 @@ add_scoped_pointer_modifier(CPPIdentifier *scoping) {
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 //     Function: CPPInstanceIdentifier::add_modifier
 //     Function: CPPInstanceIdentifier::add_modifier
 //       Access: Public
 //       Access: Public
-//  Description: 
+//  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 void CPPInstanceIdentifier::
 void CPPInstanceIdentifier::
 add_array_modifier(CPPExpression *expr) {
 add_array_modifier(CPPExpression *expr) {
@@ -128,7 +141,7 @@ add_array_modifier(CPPExpression *expr) {
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 //     Function: CPPInstanceIdentifier::get_scope
 //     Function: CPPInstanceIdentifier::get_scope
 //       Access: Public
 //       Access: Public
-//  Description: 
+//  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 CPPScope *CPPInstanceIdentifier::
 CPPScope *CPPInstanceIdentifier::
 get_scope(CPPScope *current_scope, CPPScope *global_scope,
 get_scope(CPPScope *current_scope, CPPScope *global_scope,

+ 14 - 1
dtool/src/cppparser/cppInstanceIdentifier.h

@@ -2,6 +2,19 @@
 // Created by:  drose (21Oct99)
 // Created by:  drose (21Oct99)
 //
 //
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
+//
+// PANDA 3D SOFTWARE
+// Copyright (c) 2001, Disney Enterprises, Inc.  All rights reserved
+//
+// All use of this software is subject to the terms of the Panda 3d
+// Software license.  You should have received a copy of this license
+// along with this source code; you will also find a current copy of
+// the license at http://www.panda3d.org/license.txt .
+//
+// To contact the maintainers of this program write to
+// [email protected] .
+//
+////////////////////////////////////////////////////////////////////
 
 
 #ifndef CPPINSTANCEIDENTIFIER_H
 #ifndef CPPINSTANCEIDENTIFIER_H
 #define CPPINSTANCEIDENTIFIER_H
 #define CPPINSTANCEIDENTIFIER_H
@@ -51,7 +64,7 @@ public:
 
 
   CPPScope *get_scope(CPPScope *current_scope, CPPScope *global_scope,
   CPPScope *get_scope(CPPScope *current_scope, CPPScope *global_scope,
                       CPPPreprocessor *error_sink = NULL) const;
                       CPPPreprocessor *error_sink = NULL) const;
- 
+
   CPPIdentifier *_ident;
   CPPIdentifier *_ident;
 
 
   class Modifier {
   class Modifier {

+ 27 - 14
dtool/src/cppparser/cppManifest.cxx

@@ -1,6 +1,19 @@
-// Filename: cppManifest.C
+// Filename: cppManifest.cxx
 // Created by:  drose (22Oct99)
 // Created by:  drose (22Oct99)
-// 
+//
+////////////////////////////////////////////////////////////////////
+//
+// PANDA 3D SOFTWARE
+// Copyright (c) 2001, Disney Enterprises, Inc.  All rights reserved
+//
+// All use of this software is subject to the terms of the Panda 3d
+// Software license.  You should have received a copy of this license
+// along with this source code; you will also find a current copy of
+// the license at http://www.panda3d.org/license.txt .
+//
+// To contact the maintainers of this program write to
+// [email protected] .
+//
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 
 
 
 
@@ -12,7 +25,7 @@
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 //     Function: CPPManifest::ExpansionNode::Constructor
 //     Function: CPPManifest::ExpansionNode::Constructor
 //       Access: Public
 //       Access: Public
-//  Description: 
+//  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 CPPManifest::ExpansionNode::
 CPPManifest::ExpansionNode::
 ExpansionNode(int parm_number) :
 ExpansionNode(int parm_number) :
@@ -23,7 +36,7 @@ ExpansionNode(int parm_number) :
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 //     Function: CPPManifest::ExpansionNode::Constructor
 //     Function: CPPManifest::ExpansionNode::Constructor
 //       Access: Public
 //       Access: Public
-//  Description: 
+//  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 CPPManifest::ExpansionNode::
 CPPManifest::ExpansionNode::
 ExpansionNode(const string &str) :
 ExpansionNode(const string &str) :
@@ -34,7 +47,7 @@ ExpansionNode(const string &str) :
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 //     Function: CPPManifest::Constructor
 //     Function: CPPManifest::Constructor
 //       Access: Public
 //       Access: Public
-//  Description: 
+//  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 CPPManifest::
 CPPManifest::
 CPPManifest(const string &args, const CPPFile &file) : _file(file) {
 CPPManifest(const string &args, const CPPFile &file) : _file(file) {
@@ -52,7 +65,7 @@ CPPManifest(const string &args, const CPPFile &file) : _file(file) {
   }
   }
 
 
   _name = args.substr(0, p);
   _name = args.substr(0, p);
-  
+
   vector_string parameter_names;
   vector_string parameter_names;
 
 
   if (args[p] == '(') {
   if (args[p] == '(') {
@@ -78,7 +91,7 @@ CPPManifest(const string &args, const CPPFile &file) : _file(file) {
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 //     Function: CPPManifest::Destructor
 //     Function: CPPManifest::Destructor
 //       Access: Public
 //       Access: Public
-//  Description: 
+//  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 CPPManifest::
 CPPManifest::
 ~CPPManifest() {
 ~CPPManifest() {
@@ -92,7 +105,7 @@ CPPManifest::
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 //     Function: CPPManifest::expand
 //     Function: CPPManifest::expand
 //       Access: Public
 //       Access: Public
-//  Description: 
+//  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 string CPPManifest::
 string CPPManifest::
 expand(const vector_string &args) const {
 expand(const vector_string &args) const {
@@ -133,7 +146,7 @@ determine_type() const {
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 //     Function: CPPManifest::output
 //     Function: CPPManifest::output
 //       Access: Public
 //       Access: Public
-//  Description: 
+//  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 void CPPManifest::
 void CPPManifest::
 output(ostream &out) const {
 output(ostream &out) const {
@@ -168,10 +181,10 @@ output(ostream &out) const {
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 //     Function: CPPManifest::parse_parameters
 //     Function: CPPManifest::parse_parameters
 //       Access: Private
 //       Access: Private
-//  Description: 
+//  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 void CPPManifest::
 void CPPManifest::
-parse_parameters(const string &args, size_t &p, 
+parse_parameters(const string &args, size_t &p,
                  vector_string &parameter_names) {
                  vector_string &parameter_names) {
   assert(p < args.size());
   assert(p < args.size());
   assert(args[p] == '(');
   assert(args[p] == '(');
@@ -184,7 +197,7 @@ parse_parameters(const string &args, size_t &p,
   while (p < args.size() && args[p] != ')') {
   while (p < args.size() && args[p] != ')') {
     // Here's the beginning of a parm.
     // Here's the beginning of a parm.
     size_t q = p;
     size_t q = p;
-    while (p < args.size() && !isspace(args[p]) && 
+    while (p < args.size() && !isspace(args[p]) &&
            args[p] != ')' && args[p] != ',') {
            args[p] != ')' && args[p] != ',') {
       p++;
       p++;
     }
     }
@@ -208,7 +221,7 @@ parse_parameters(const string &args, size_t &p,
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 //     Function: CPPManifest::save_expansion
 //     Function: CPPManifest::save_expansion
 //       Access: Private
 //       Access: Private
-//  Description: 
+//  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 void CPPManifest::
 void CPPManifest::
 save_expansion(const string &exp, const vector_string &parameter_names) {
 save_expansion(const string &exp, const vector_string &parameter_names) {
@@ -240,7 +253,7 @@ save_expansion(const string &exp, const vector_string &parameter_names) {
           pnum = i;
           pnum = i;
         }
         }
       }
       }
-      
+
       if (pnum != -1) {
       if (pnum != -1) {
         // Yep!
         // Yep!
         if (last != q) {
         if (last != q) {

+ 13 - 0
dtool/src/cppparser/cppManifest.h

@@ -2,6 +2,19 @@
 // Created by:  drose (22Oct99)
 // Created by:  drose (22Oct99)
 //
 //
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
+//
+// PANDA 3D SOFTWARE
+// Copyright (c) 2001, Disney Enterprises, Inc.  All rights reserved
+//
+// All use of this software is subject to the terms of the Panda 3d
+// Software license.  You should have received a copy of this license
+// along with this source code; you will also find a current copy of
+// the license at http://www.panda3d.org/license.txt .
+//
+// To contact the maintainers of this program write to
+// [email protected] .
+//
+////////////////////////////////////////////////////////////////////
 
 
 #ifndef CPPMANIFEST_H
 #ifndef CPPMANIFEST_H
 #define CPPMANIFEST_H
 #define CPPMANIFEST_H

+ 29 - 16
dtool/src/cppparser/cppNameComponent.cxx

@@ -1,6 +1,19 @@
-// Filename: cppNameComponent.C
+// Filename: cppNameComponent.cxx
 // Created by:  drose (12Nov99)
 // Created by:  drose (12Nov99)
-// 
+//
+////////////////////////////////////////////////////////////////////
+//
+// PANDA 3D SOFTWARE
+// Copyright (c) 2001, Disney Enterprises, Inc.  All rights reserved
+//
+// All use of this software is subject to the terms of the Panda 3d
+// Software license.  You should have received a copy of this license
+// along with this source code; you will also find a current copy of
+// the license at http://www.panda3d.org/license.txt .
+//
+// To contact the maintainers of this program write to
+// [email protected] .
+//
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 
 
 
 
@@ -10,11 +23,11 @@
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 //     Function: CPPNameComponent::Constructor
 //     Function: CPPNameComponent::Constructor
 //       Access: Public
 //       Access: Public
-//  Description: 
+//  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 CPPNameComponent::
 CPPNameComponent::
 CPPNameComponent(const string &name) :
 CPPNameComponent(const string &name) :
-  _name(name) 
+  _name(name)
 {
 {
   _templ = (CPPTemplateParameterList *)NULL;
   _templ = (CPPTemplateParameterList *)NULL;
 }
 }
@@ -22,7 +35,7 @@ CPPNameComponent(const string &name) :
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 //     Function: CPPNameComponent::Equivalence Operator
 //     Function: CPPNameComponent::Equivalence Operator
 //       Access: Public
 //       Access: Public
-//  Description: 
+//  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 bool CPPNameComponent::
 bool CPPNameComponent::
 operator == (const CPPNameComponent &other) const {
 operator == (const CPPNameComponent &other) const {
@@ -45,7 +58,7 @@ operator == (const CPPNameComponent &other) const {
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 //     Function: CPPNameComponent::Nonequivalence Operator
 //     Function: CPPNameComponent::Nonequivalence Operator
 //       Access: Public
 //       Access: Public
-//  Description: 
+//  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 bool CPPNameComponent::
 bool CPPNameComponent::
 operator != (const CPPNameComponent &other) const {
 operator != (const CPPNameComponent &other) const {
@@ -55,7 +68,7 @@ operator != (const CPPNameComponent &other) const {
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 //     Function: CPPNameComponent::Ordering Operator
 //     Function: CPPNameComponent::Ordering Operator
 //       Access: Public
 //       Access: Public
-//  Description: 
+//  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 bool CPPNameComponent::
 bool CPPNameComponent::
 operator < (const CPPNameComponent &other) const {
 operator < (const CPPNameComponent &other) const {
@@ -74,7 +87,7 @@ operator < (const CPPNameComponent &other) const {
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 //     Function: CPPNameComponent::output
 //     Function: CPPNameComponent::output
 //       Access: Public
 //       Access: Public
-//  Description: 
+//  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 string CPPNameComponent::
 string CPPNameComponent::
 get_name() const {
 get_name() const {
@@ -84,7 +97,7 @@ get_name() const {
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 //     Function: CPPNameComponent::get_name_with_templ
 //     Function: CPPNameComponent::get_name_with_templ
 //       Access: Public
 //       Access: Public
-//  Description: 
+//  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 string CPPNameComponent::
 string CPPNameComponent::
 get_name_with_templ(CPPScope *scope) const {
 get_name_with_templ(CPPScope *scope) const {
@@ -101,7 +114,7 @@ get_name_with_templ(CPPScope *scope) const {
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 //     Function: CPPNameComponent::get_templ
 //     Function: CPPNameComponent::get_templ
 //       Access: Public
 //       Access: Public
-//  Description: 
+//  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 CPPTemplateParameterList *CPPNameComponent::
 CPPTemplateParameterList *CPPNameComponent::
 get_templ() const {
 get_templ() const {
@@ -111,7 +124,7 @@ get_templ() const {
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 //     Function: CPPNameComponent::empty
 //     Function: CPPNameComponent::empty
 //       Access: Public
 //       Access: Public
-//  Description: 
+//  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 bool CPPNameComponent::
 bool CPPNameComponent::
 empty() const {
 empty() const {
@@ -121,7 +134,7 @@ empty() const {
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 //     Function: CPPNameComponent::has_templ
 //     Function: CPPNameComponent::has_templ
 //       Access: Public
 //       Access: Public
-//  Description: 
+//  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 bool CPPNameComponent::
 bool CPPNameComponent::
 has_templ() const {
 has_templ() const {
@@ -146,7 +159,7 @@ is_tbd() const {
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 //     Function: CPPNameComponent::set_name
 //     Function: CPPNameComponent::set_name
 //       Access: Public
 //       Access: Public
-//  Description: 
+//  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 void CPPNameComponent::
 void CPPNameComponent::
 set_name(const string &name) {
 set_name(const string &name) {
@@ -156,7 +169,7 @@ set_name(const string &name) {
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 //     Function: CPPNameComponent::append_name
 //     Function: CPPNameComponent::append_name
 //       Access: Public
 //       Access: Public
-//  Description: 
+//  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 void CPPNameComponent::
 void CPPNameComponent::
 append_name(const string &name) {
 append_name(const string &name) {
@@ -166,7 +179,7 @@ append_name(const string &name) {
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 //     Function: CPPNameComponent::set_templ
 //     Function: CPPNameComponent::set_templ
 //       Access: Public
 //       Access: Public
-//  Description: 
+//  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 void CPPNameComponent::
 void CPPNameComponent::
 set_templ(CPPTemplateParameterList *templ) {
 set_templ(CPPTemplateParameterList *templ) {
@@ -176,7 +189,7 @@ set_templ(CPPTemplateParameterList *templ) {
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 //     Function: CPPNameComponent::output
 //     Function: CPPNameComponent::output
 //       Access: Public
 //       Access: Public
-//  Description: 
+//  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 void CPPNameComponent::
 void CPPNameComponent::
 output(ostream &out) const {
 output(ostream &out) const {

+ 13 - 0
dtool/src/cppparser/cppNameComponent.h

@@ -2,6 +2,19 @@
 // Created by:  drose (12Nov99)
 // Created by:  drose (12Nov99)
 //
 //
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
+//
+// PANDA 3D SOFTWARE
+// Copyright (c) 2001, Disney Enterprises, Inc.  All rights reserved
+//
+// All use of this software is subject to the terms of the Panda 3d
+// Software license.  You should have received a copy of this license
+// along with this source code; you will also find a current copy of
+// the license at http://www.panda3d.org/license.txt .
+//
+// To contact the maintainers of this program write to
+// [email protected] .
+//
+////////////////////////////////////////////////////////////////////
 
 
 #ifndef CPPNAMECOMPONENT_H
 #ifndef CPPNAMECOMPONENT_H
 #define CPPNAMECOMPONENT_H
 #define CPPNAMECOMPONENT_H

+ 23 - 10
dtool/src/cppparser/cppNamespace.cxx

@@ -1,6 +1,19 @@
-// Filename: cppNamespace.C
+// Filename: cppNamespace.cxx
 // Created by:  drose (16Nov99)
 // Created by:  drose (16Nov99)
-// 
+//
+////////////////////////////////////////////////////////////////////
+//
+// PANDA 3D SOFTWARE
+// Copyright (c) 2001, Disney Enterprises, Inc.  All rights reserved
+//
+// All use of this software is subject to the terms of the Panda 3d
+// Software license.  You should have received a copy of this license
+// along with this source code; you will also find a current copy of
+// the license at http://www.panda3d.org/license.txt .
+//
+// To contact the maintainers of this program write to
+// [email protected] .
+//
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 
 
 
 
@@ -12,7 +25,7 @@
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 //     Function: CPPNamespace::Constructor
 //     Function: CPPNamespace::Constructor
 //       Access: Public
 //       Access: Public
-//  Description: 
+//  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 CPPNamespace::
 CPPNamespace::
 CPPNamespace(CPPIdentifier *ident, CPPScope *scope, const CPPFile &file) :
 CPPNamespace(CPPIdentifier *ident, CPPScope *scope, const CPPFile &file) :
@@ -24,7 +37,7 @@ CPPNamespace(CPPIdentifier *ident, CPPScope *scope, const CPPFile &file) :
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 //     Function: CPPNamespace::get_simple_name
 //     Function: CPPNamespace::get_simple_name
 //       Access: Public
 //       Access: Public
-//  Description: 
+//  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 string CPPNamespace::
 string CPPNamespace::
 get_simple_name() const {
 get_simple_name() const {
@@ -37,7 +50,7 @@ get_simple_name() const {
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 //     Function: CPPNamespace::get_local_name
 //     Function: CPPNamespace::get_local_name
 //       Access: Public
 //       Access: Public
-//  Description: 
+//  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 string CPPNamespace::
 string CPPNamespace::
 get_local_name(CPPScope *scope) const {
 get_local_name(CPPScope *scope) const {
@@ -50,7 +63,7 @@ get_local_name(CPPScope *scope) const {
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 //     Function: CPPNamespace::get_fully_scoped_name
 //     Function: CPPNamespace::get_fully_scoped_name
 //       Access: Public
 //       Access: Public
-//  Description: 
+//  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 string CPPNamespace::
 string CPPNamespace::
 get_fully_scoped_name() const {
 get_fully_scoped_name() const {
@@ -63,7 +76,7 @@ get_fully_scoped_name() const {
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 //     Function: CPPNamespace::get_scope
 //     Function: CPPNamespace::get_scope
 //       Access: Public
 //       Access: Public
-//  Description: 
+//  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 CPPScope *CPPNamespace::
 CPPScope *CPPNamespace::
 get_scope() const {
 get_scope() const {
@@ -73,7 +86,7 @@ get_scope() const {
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 //     Function: CPPNamespace::output
 //     Function: CPPNamespace::output
 //       Access: Public, Virtual
 //       Access: Public, Virtual
-//  Description: 
+//  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 void CPPNamespace::
 void CPPNamespace::
 output(ostream &out, int indent_level, CPPScope *scope, bool complete) const {
 output(ostream &out, int indent_level, CPPScope *scope, bool complete) const {
@@ -96,7 +109,7 @@ output(ostream &out, int indent_level, CPPScope *scope, bool complete) const {
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 //     Function: CPPNamespace::get_subtype
 //     Function: CPPNamespace::get_subtype
 //       Access: Public, Virtual
 //       Access: Public, Virtual
-//  Description: 
+//  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 CPPDeclaration::SubType CPPNamespace::
 CPPDeclaration::SubType CPPNamespace::
 get_subtype() const {
 get_subtype() const {
@@ -106,7 +119,7 @@ get_subtype() const {
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 //     Function: CPPNamespace::as_namespace
 //     Function: CPPNamespace::as_namespace
 //       Access: Public, Virtual
 //       Access: Public, Virtual
-//  Description: 
+//  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 CPPNamespace *CPPNamespace::
 CPPNamespace *CPPNamespace::
 as_namespace() {
 as_namespace() {

+ 13 - 0
dtool/src/cppparser/cppNamespace.h

@@ -2,6 +2,19 @@
 // Created by:  drose (16Nov99)
 // Created by:  drose (16Nov99)
 //
 //
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
+//
+// PANDA 3D SOFTWARE
+// Copyright (c) 2001, Disney Enterprises, Inc.  All rights reserved
+//
+// All use of this software is subject to the terms of the Panda 3d
+// Software license.  You should have received a copy of this license
+// along with this source code; you will also find a current copy of
+// the license at http://www.panda3d.org/license.txt .
+//
+// To contact the maintainers of this program write to
+// [email protected] .
+//
+////////////////////////////////////////////////////////////////////
 
 
 #ifndef CPPNAMESPACE_H
 #ifndef CPPNAMESPACE_H
 #define CPPNAMESPACE_H
 #define CPPNAMESPACE_H

+ 20 - 16
dtool/src/cppparser/cppParameterList.cxx

@@ -1,15 +1,19 @@
-// Filename: cppParameterList.C
+// Filename: cppParameterList.cxx
 // Created by:  drose (21Oct99)
 // Created by:  drose (21Oct99)
-// 
+//
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
-// Copyright (C) 1992,93,94,95,96,97  Walt Disney Imagineering, Inc.
-// 
-// These  coded  instructions,  statements,  data   structures   and
-// computer  programs contain unpublished proprietary information of
-// Walt Disney Imagineering and are protected by  Federal  copyright
-// law.  They may  not be  disclosed to third  parties  or copied or
-// duplicated in any form, in whole or in part,  without  the  prior
-// written consent of Walt Disney Imagineering Inc.
+//
+// PANDA 3D SOFTWARE
+// Copyright (c) 2001, Disney Enterprises, Inc.  All rights reserved
+//
+// All use of this software is subject to the terms of the Panda 3d
+// Software license.  You should have received a copy of this license
+// along with this source code; you will also find a current copy of
+// the license at http://www.panda3d.org/license.txt .
+//
+// To contact the maintainers of this program write to
+// [email protected] .
+//
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 
 
 
 
@@ -19,7 +23,7 @@
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 //     Function: CPPParameterList::Constructor
 //     Function: CPPParameterList::Constructor
 //       Access: Public
 //       Access: Public
-//  Description: 
+//  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 CPPParameterList::
 CPPParameterList::
 CPPParameterList() {
 CPPParameterList() {
@@ -53,7 +57,7 @@ is_equivalent(const CPPParameterList &other) const {
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 //     Function: CPPParameterList::Equality Operator
 //     Function: CPPParameterList::Equality Operator
 //       Access: Public
 //       Access: Public
-//  Description: 
+//  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 bool CPPParameterList::
 bool CPPParameterList::
 operator == (const CPPParameterList &other) const {
 operator == (const CPPParameterList &other) const {
@@ -74,7 +78,7 @@ operator == (const CPPParameterList &other) const {
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 //     Function: CPPParameterList::Inequality Operator
 //     Function: CPPParameterList::Inequality Operator
 //       Access: Public
 //       Access: Public
-//  Description: 
+//  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 bool CPPParameterList::
 bool CPPParameterList::
 operator != (const CPPParameterList &other) const {
 operator != (const CPPParameterList &other) const {
@@ -84,7 +88,7 @@ operator != (const CPPParameterList &other) const {
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 //     Function: CPPParameterList::Ordering Operator
 //     Function: CPPParameterList::Ordering Operator
 //       Access: Public
 //       Access: Public
-//  Description: 
+//  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 bool CPPParameterList::
 bool CPPParameterList::
 operator < (const CPPParameterList &other) const {
 operator < (const CPPParameterList &other) const {
@@ -140,7 +144,7 @@ is_fully_specified() const {
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 //     Function: CPPParameterList::substitute_decl
 //     Function: CPPParameterList::substitute_decl
 //       Access: Public
 //       Access: Public
-//  Description: 
+//  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 CPPParameterList *CPPParameterList::
 CPPParameterList *CPPParameterList::
 substitute_decl(CPPDeclaration::SubstDecl &subst,
 substitute_decl(CPPDeclaration::SubstDecl &subst,
@@ -148,7 +152,7 @@ substitute_decl(CPPDeclaration::SubstDecl &subst,
   CPPParameterList *rep = new CPPParameterList;
   CPPParameterList *rep = new CPPParameterList;
   bool any_changed = false;
   bool any_changed = false;
   for (int i = 0; i < (int)_parameters.size(); i++) {
   for (int i = 0; i < (int)_parameters.size(); i++) {
-    CPPInstance *inst = 
+    CPPInstance *inst =
       _parameters[i]->substitute_decl(subst, current_scope, global_scope)
       _parameters[i]->substitute_decl(subst, current_scope, global_scope)
       ->as_instance();
       ->as_instance();
     if (inst != _parameters[i]) {
     if (inst != _parameters[i]) {

+ 13 - 0
dtool/src/cppparser/cppParameterList.h

@@ -2,6 +2,19 @@
 // Created by:  drose (21Oct99)
 // Created by:  drose (21Oct99)
 //
 //
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
+//
+// PANDA 3D SOFTWARE
+// Copyright (c) 2001, Disney Enterprises, Inc.  All rights reserved
+//
+// All use of this software is subject to the terms of the Panda 3d
+// Software license.  You should have received a copy of this license
+// along with this source code; you will also find a current copy of
+// the license at http://www.panda3d.org/license.txt .
+//
+// To contact the maintainers of this program write to
+// [email protected] .
+//
+////////////////////////////////////////////////////////////////////
 
 
 #ifndef CPPPARAMETERLIST_H
 #ifndef CPPPARAMETERLIST_H
 #define CPPPARAMETERLIST_H
 #define CPPPARAMETERLIST_H

+ 19 - 6
dtool/src/cppparser/cppParser.cxx

@@ -1,6 +1,19 @@
-// Filename: cppParser.C
+// Filename: cppParser.cxx
 // Created by:  drose (19Oct99)
 // Created by:  drose (19Oct99)
-// 
+//
+////////////////////////////////////////////////////////////////////
+//
+// PANDA 3D SOFTWARE
+// Copyright (c) 2001, Disney Enterprises, Inc.  All rights reserved
+//
+// All use of this software is subject to the terms of the Panda 3d
+// Software license.  You should have received a copy of this license
+// along with this source code; you will also find a current copy of
+// the license at http://www.panda3d.org/license.txt .
+//
+// To contact the maintainers of this program write to
+// [email protected] .
+//
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 
 
 
 
@@ -17,7 +30,7 @@ bool cppparser_output_class_keyword = true;
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 //     Function: CPPParser::Constructor
 //     Function: CPPParser::Constructor
 //       Access: Public
 //       Access: Public
-//  Description: 
+//  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 CPPParser::
 CPPParser::
 CPPParser() : CPPScope((CPPScope *)NULL, CPPNameComponent(""), V_public) {
 CPPParser() : CPPScope((CPPScope *)NULL, CPPNameComponent(""), V_public) {
@@ -41,7 +54,7 @@ is_fully_specified() const {
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 //     Function: CPPParser::parse_file
 //     Function: CPPParser::parse_file
 //       Access: Public
 //       Access: Public
-//  Description: 
+//  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 bool CPPParser::
 bool CPPParser::
 parse_file(const string &filename) {
 parse_file(const string &filename) {
@@ -53,7 +66,7 @@ parse_file(const string &filename) {
 
 
   return get_error_count() == 0;
   return get_error_count() == 0;
 }
 }
-  
+
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 //     Function: CPPParser::parse_expr
 //     Function: CPPParser::parse_expr
 //       Access: Public
 //       Access: Public
@@ -65,7 +78,7 @@ CPPExpression *CPPParser::
 parse_expr(const string &expr) {
 parse_expr(const string &expr) {
   return CPPPreprocessor::parse_expr(expr, this, this);
   return CPPPreprocessor::parse_expr(expr, this, this);
 }
 }
-  
+
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 //     Function: CPPParser::parse_type
 //     Function: CPPParser::parse_type
 //       Access: Public
 //       Access: Public

+ 14 - 1
dtool/src/cppparser/cppParser.h

@@ -2,6 +2,19 @@
 // Created by:  drose (19Oct99)
 // Created by:  drose (19Oct99)
 //
 //
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
+//
+// PANDA 3D SOFTWARE
+// Copyright (c) 2001, Disney Enterprises, Inc.  All rights reserved
+//
+// All use of this software is subject to the terms of the Panda 3d
+// Software license.  You should have received a copy of this license
+// along with this source code; you will also find a current copy of
+// the license at http://www.panda3d.org/license.txt .
+//
+// To contact the maintainers of this program write to
+// [email protected] .
+//
+////////////////////////////////////////////////////////////////////
 
 
 #ifndef CPPPARSER_H
 #ifndef CPPPARSER_H
 #define CPPPARSER_H
 #define CPPPARSER_H
@@ -42,4 +55,4 @@ extern bool cppparser_output_class_keyword;
 
 
 #endif
 #endif
 
 
- 
+

+ 25 - 12
dtool/src/cppparser/cppPointerType.cxx

@@ -1,6 +1,19 @@
-// Filename: cppPointerType.C
+// Filename: cppPointerType.cxx
 // Created by:  drose (19Oct99)
 // Created by:  drose (19Oct99)
-// 
+//
+////////////////////////////////////////////////////////////////////
+//
+// PANDA 3D SOFTWARE
+// Copyright (c) 2001, Disney Enterprises, Inc.  All rights reserved
+//
+// All use of this software is subject to the terms of the Panda 3d
+// Software license.  You should have received a copy of this license
+// along with this source code; you will also find a current copy of
+// the license at http://www.panda3d.org/license.txt .
+//
+// To contact the maintainers of this program write to
+// [email protected] .
+//
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 
 
 
 
@@ -11,7 +24,7 @@
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 //     Function: CPPPointerType::Constructor
 //     Function: CPPPointerType::Constructor
 //       Access: Public
 //       Access: Public
-//  Description: 
+//  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 CPPPointerType::
 CPPPointerType::
 CPPPointerType(CPPType *pointing_at) :
 CPPPointerType(CPPType *pointing_at) :
@@ -30,14 +43,14 @@ CPPPointerType(CPPType *pointing_at) :
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 bool CPPPointerType::
 bool CPPPointerType::
 is_fully_specified() const {
 is_fully_specified() const {
-  return CPPType::is_fully_specified() && 
+  return CPPType::is_fully_specified() &&
     _pointing_at->is_fully_specified();
     _pointing_at->is_fully_specified();
 }
 }
 
 
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 //     Function: CPPPointerType::substitute_decl
 //     Function: CPPPointerType::substitute_decl
 //       Access: Public, Virtual
 //       Access: Public, Virtual
-//  Description: 
+//  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 CPPDeclaration *CPPPointerType::
 CPPDeclaration *CPPPointerType::
 substitute_decl(CPPDeclaration::SubstDecl &subst,
 substitute_decl(CPPDeclaration::SubstDecl &subst,
@@ -48,7 +61,7 @@ substitute_decl(CPPDeclaration::SubstDecl &subst,
   }
   }
 
 
   CPPPointerType *rep = new CPPPointerType(*this);
   CPPPointerType *rep = new CPPPointerType(*this);
-  rep->_pointing_at = 
+  rep->_pointing_at =
     _pointing_at->substitute_decl(subst, current_scope, global_scope)
     _pointing_at->substitute_decl(subst, current_scope, global_scope)
     ->as_type();
     ->as_type();
 
 
@@ -116,13 +129,13 @@ is_equivalent(const CPPType &other) const {
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 //     Function: CPPPointerType::output
 //     Function: CPPPointerType::output
 //       Access: Public, Virtual
 //       Access: Public, Virtual
-//  Description: 
+//  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 void CPPPointerType::
 void CPPPointerType::
 output(ostream &out, int indent_level, CPPScope *scope, bool complete) const {
 output(ostream &out, int indent_level, CPPScope *scope, bool complete) const {
   _pointing_at->output(out, indent_level, scope, complete);
   _pointing_at->output(out, indent_level, scope, complete);
   CPPFunctionType *ftype = _pointing_at->as_function_type();
   CPPFunctionType *ftype = _pointing_at->as_function_type();
-  if (ftype != NULL && 
+  if (ftype != NULL &&
       ((ftype->_flags & CPPFunctionType::F_method_pointer) != 0)) {
       ((ftype->_flags & CPPFunctionType::F_method_pointer) != 0)) {
     // We have to output pointers-to-method with a scoping before the
     // We have to output pointers-to-method with a scoping before the
     // '*'.
     // '*'.
@@ -147,21 +160,21 @@ output_instance(ostream &out, int indent_level, CPPScope *scope,
   string star = "*";
   string star = "*";
 
 
   CPPFunctionType *ftype = _pointing_at->as_function_type();
   CPPFunctionType *ftype = _pointing_at->as_function_type();
-  if (ftype != NULL && 
+  if (ftype != NULL &&
       ((ftype->_flags & CPPFunctionType::F_method_pointer) != 0)) {
       ((ftype->_flags & CPPFunctionType::F_method_pointer) != 0)) {
     // We have to output pointers-to-method with a scoping before the
     // We have to output pointers-to-method with a scoping before the
     // '*'.
     // '*'.
     star = ftype->_class_owner->get_fully_scoped_name() + "::*";
     star = ftype->_class_owner->get_fully_scoped_name() + "::*";
   }
   }
 
 
-  _pointing_at->output_instance(out, indent_level, scope, complete, 
+  _pointing_at->output_instance(out, indent_level, scope, complete,
                                 star + prename, name);
                                 star + prename, name);
 }
 }
 
 
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 //     Function: CPPPointerType::get_subtype
 //     Function: CPPPointerType::get_subtype
 //       Access: Public, Virtual
 //       Access: Public, Virtual
-//  Description: 
+//  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 CPPDeclaration::SubType CPPPointerType::
 CPPDeclaration::SubType CPPPointerType::
 get_subtype() const {
 get_subtype() const {
@@ -171,7 +184,7 @@ get_subtype() const {
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 //     Function: CPPPointerType::as_pointer_type
 //     Function: CPPPointerType::as_pointer_type
 //       Access: Public, Virtual
 //       Access: Public, Virtual
-//  Description: 
+//  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 CPPPointerType *CPPPointerType::
 CPPPointerType *CPPPointerType::
 as_pointer_type() {
 as_pointer_type() {

+ 11 - 7
dtool/src/cppparser/cppPointerType.h

@@ -2,14 +2,18 @@
 // Created by:  drose (19Oct99)
 // Created by:  drose (19Oct99)
 //
 //
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
-// Copyright (C) 1992,93,94,95,96,97  Walt Disney Imagineering, Inc.
 //
 //
-// These  coded  instructions,  statements,  data   structures   and
-// computer  programs contain unpublished proprietary information of
-// Walt Disney Imagineering and are protected by  Federal  copyright
-// law.  They may  not be  disclosed to third  parties  or copied or
-// duplicated in any form, in whole or in part,  without  the  prior
-// written consent of Walt Disney Imagineering Inc.
+// PANDA 3D SOFTWARE
+// Copyright (c) 2001, Disney Enterprises, Inc.  All rights reserved
+//
+// All use of this software is subject to the terms of the Panda 3d
+// Software license.  You should have received a copy of this license
+// along with this source code; you will also find a current copy of
+// the license at http://www.panda3d.org/license.txt .
+//
+// To contact the maintainers of this program write to
+// [email protected] .
+//
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 
 
 #ifndef CPPPOINTERTYPE_H
 #ifndef CPPPOINTERTYPE_H

+ 118 - 105
dtool/src/cppparser/cppPreprocessor.cxx

@@ -1,6 +1,19 @@
-// Filename: cppPreprocessor.C
+// Filename: cppPreprocessor.cxx
 // Created by:  drose (22Oct99)
 // Created by:  drose (22Oct99)
-// 
+//
+////////////////////////////////////////////////////////////////////
+//
+// PANDA 3D SOFTWARE
+// Copyright (c) 2001, Disney Enterprises, Inc.  All rights reserved
+//
+// All use of this software is subject to the terms of the Panda 3d
+// Software license.  You should have received a copy of this license
+// along with this source code; you will also find a current copy of
+// the license at http://www.panda3d.org/license.txt .
+//
+// To contact the maintainers of this program write to
+// [email protected] .
+//
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 
 
 
 
@@ -66,7 +79,7 @@ trim_blanks(const string &str) {
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 //     Function: CPPPreprocessor::InputFile::Constructor
 //     Function: CPPPreprocessor::InputFile::Constructor
 //       Access: Public
 //       Access: Public
-//  Description: 
+//  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 CPPPreprocessor::InputFile::
 CPPPreprocessor::InputFile::
 InputFile() {
 InputFile() {
@@ -80,7 +93,7 @@ InputFile() {
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 //     Function: CPPPreprocessor::InputFile::Destructor
 //     Function: CPPPreprocessor::InputFile::Destructor
 //       Access: Public
 //       Access: Public
-//  Description: 
+//  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 CPPPreprocessor::InputFile::
 CPPPreprocessor::InputFile::
 ~InputFile() {
 ~InputFile() {
@@ -92,7 +105,7 @@ CPPPreprocessor::InputFile::
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 //     Function: CPPPreprocessor::InputFile::open
 //     Function: CPPPreprocessor::InputFile::open
 //       Access: Public
 //       Access: Public
-//  Description: 
+//  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 bool CPPPreprocessor::InputFile::
 bool CPPPreprocessor::InputFile::
 open(const CPPFile &file) {
 open(const CPPFile &file) {
@@ -101,19 +114,19 @@ open(const CPPFile &file) {
   _file = file;
   _file = file;
   ifstream *in = new ifstream;
   ifstream *in = new ifstream;
   _in = in;
   _in = in;
-  
+
   return _file._filename.open_read(*in);
   return _file._filename.open_read(*in);
 }
 }
 
 
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 //     Function: CPPPreprocessor::InputFile::connect_input
 //     Function: CPPPreprocessor::InputFile::connect_input
 //       Access: Public
 //       Access: Public
-//  Description: 
+//  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 bool CPPPreprocessor::InputFile::
 bool CPPPreprocessor::InputFile::
 connect_input(const string &input) {
 connect_input(const string &input) {
   assert(_in == NULL);
   assert(_in == NULL);
-  
+
   _input = input;
   _input = input;
   _in = new istringstream(_input);
   _in = new istringstream(_input);
   return !_in->fail();
   return !_in->fail();
@@ -122,13 +135,13 @@ connect_input(const string &input) {
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 //     Function: CPPPreprocessor::InputFile::get
 //     Function: CPPPreprocessor::InputFile::get
 //       Access: Public
 //       Access: Public
-//  Description: 
+//  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 int CPPPreprocessor::InputFile::
 int CPPPreprocessor::InputFile::
 get() {
 get() {
   assert(_in != NULL);
   assert(_in != NULL);
   int c = _in->get();
   int c = _in->get();
-  
+
   // Quietly skip over embedded carriage-return characters.  We
   // Quietly skip over embedded carriage-return characters.  We
   // shouldn't see any of these unless there was some DOS-to-Unix file
   // shouldn't see any of these unless there was some DOS-to-Unix file
   // conversion problem.
   // conversion problem.
@@ -146,7 +159,7 @@ get() {
       _col_number = 1;
       _col_number = 1;
     }
     }
     break;
     break;
-  
+
   default:
   default:
     if (!_lock_position) {
     if (!_lock_position) {
       _col_number++;
       _col_number++;
@@ -159,7 +172,7 @@ get() {
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 //     Function: CPPPreprocessor::Constructor
 //     Function: CPPPreprocessor::Constructor
 //       Access: Public
 //       Access: Public
-//  Description: 
+//  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 CPPPreprocessor::
 CPPPreprocessor::
 CPPPreprocessor() {
 CPPPreprocessor() {
@@ -207,7 +220,7 @@ get_verbose() const {
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 //     Function: CPPPreprocessor::copy_filepos
 //     Function: CPPPreprocessor::copy_filepos
 //       Access: Public
 //       Access: Public
-//  Description: 
+//  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 void CPPPreprocessor::
 void CPPPreprocessor::
 copy_filepos(const CPPPreprocessor &other) {
 copy_filepos(const CPPPreprocessor &other) {
@@ -220,7 +233,7 @@ copy_filepos(const CPPPreprocessor &other) {
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 //     Function: CPPPreprocessor::get_file
 //     Function: CPPPreprocessor::get_file
 //       Access: Public
 //       Access: Public
-//  Description: 
+//  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 CPPFile CPPPreprocessor::
 CPPFile CPPPreprocessor::
 get_file() const {
 get_file() const {
@@ -233,7 +246,7 @@ get_file() const {
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 //     Function: CPPPreprocessor::get_line_number
 //     Function: CPPPreprocessor::get_line_number
 //       Access: Public
 //       Access: Public
-//  Description: 
+//  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 int CPPPreprocessor::
 int CPPPreprocessor::
 get_line_number() const {
 get_line_number() const {
@@ -246,7 +259,7 @@ get_line_number() const {
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 //     Function: CPPPreprocessor::get_col_number
 //     Function: CPPPreprocessor::get_col_number
 //       Access: Public
 //       Access: Public
-//  Description: 
+//  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 int CPPPreprocessor::
 int CPPPreprocessor::
 get_col_number() const {
 get_col_number() const {
@@ -259,7 +272,7 @@ get_col_number() const {
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 //     Function: CPPPreprocessor::get_next_token
 //     Function: CPPPreprocessor::get_next_token
 //       Access: Public
 //       Access: Public
-//  Description: 
+//  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 CPPToken CPPPreprocessor::
 CPPToken CPPPreprocessor::
 get_next_token() {
 get_next_token() {
@@ -379,7 +392,7 @@ get_next_token0() {
             return token;
             return token;
           }
           }
           _saved_tokens.push_back(token);
           _saved_tokens.push_back(token);
-          return CPPToken(SCOPING, first_line, first_col, first_file, 
+          return CPPToken(SCOPING, first_line, first_col, first_file,
                           name, result);
                           name, result);
         }
         }
 
 
@@ -394,7 +407,7 @@ get_next_token0() {
         // indentifier wants template instantiation, assume the angle
         // indentifier wants template instantiation, assume the angle
         // bracket begins the instantiation and call yacc recursively to
         // bracket begins the instantiation and call yacc recursively to
         // parse the template parameters.
         // parse the template parameters.
-        CPPDeclaration *decl = 
+        CPPDeclaration *decl =
           ident->find_template(current_scope, global_scope);
           ident->find_template(current_scope, global_scope);
         if (decl != NULL) {
         if (decl != NULL) {
           ident->_names.back().set_templ
           ident->_names.back().set_templ
@@ -409,12 +422,12 @@ get_next_token0() {
 
 
     int token_type = IDENTIFIER;
     int token_type = IDENTIFIER;
     CPPDeclaration *decl = ident->find_symbol(current_scope, global_scope);
     CPPDeclaration *decl = ident->find_symbol(current_scope, global_scope);
-    if (decl != NULL && 
+    if (decl != NULL &&
         (decl->as_typedef() != NULL || decl->as_type() != NULL)) {
         (decl->as_typedef() != NULL || decl->as_type() != NULL)) {
       token_type = TYPENAME_IDENTIFIER;
       token_type = TYPENAME_IDENTIFIER;
     }
     }
 
 
-    return CPPToken(token_type, first_line, first_col, first_file, 
+    return CPPToken(token_type, first_line, first_col, first_file,
                     name, result);
                     name, result);
   }
   }
 
 
@@ -425,7 +438,7 @@ get_next_token0() {
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 //     Function: CPPPreprocessor::warning
 //     Function: CPPPreprocessor::warning
 //       Access: Public
 //       Access: Public
-//  Description: 
+//  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 void CPPPreprocessor::
 void CPPPreprocessor::
 warning(const string &message, int line, int col, CPPFile file) {
 warning(const string &message, int line, int col, CPPFile file) {
@@ -447,7 +460,7 @@ warning(const string &message, int line, int col, CPPFile file) {
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 //     Function: CPPPreprocessor::error
 //     Function: CPPPreprocessor::error
 //       Access: Public
 //       Access: Public
-//  Description: 
+//  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 void CPPPreprocessor::
 void CPPPreprocessor::
 error(const string &message, int line, int col, CPPFile file) {
 error(const string &message, int line, int col, CPPFile file) {
@@ -475,7 +488,7 @@ error(const string &message, int line, int col, CPPFile file) {
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 //     Function: CPPPreprocessor::get_warning_count
 //     Function: CPPPreprocessor::get_warning_count
 //       Access: Public
 //       Access: Public
-//  Description: 
+//  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 int CPPPreprocessor::
 int CPPPreprocessor::
 get_warning_count() const {
 get_warning_count() const {
@@ -485,7 +498,7 @@ get_warning_count() const {
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 //     Function: CPPPreprocessor::get_error_count
 //     Function: CPPPreprocessor::get_error_count
 //       Access: Public
 //       Access: Public
-//  Description: 
+//  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 int CPPPreprocessor::
 int CPPPreprocessor::
 get_error_count() const {
 get_error_count() const {
@@ -532,7 +545,7 @@ get_comment_before(int line, CPPFile file) {
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 //     Function: CPPPreprocessor::init_cpp
 //     Function: CPPPreprocessor::init_cpp
 //       Access: Protected
 //       Access: Protected
-//  Description: 
+//  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 bool CPPPreprocessor::
 bool CPPPreprocessor::
 init_cpp(const CPPFile &file) {
 init_cpp(const CPPFile &file) {
@@ -546,7 +559,7 @@ init_cpp(const CPPFile &file) {
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 //     Function: CPPPreprocessor::init_const_expr
 //     Function: CPPPreprocessor::init_const_expr
 //       Access: Protected
 //       Access: Protected
-//  Description: 
+//  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 bool CPPPreprocessor::
 bool CPPPreprocessor::
 init_const_expr(const string &expr) {
 init_const_expr(const string &expr) {
@@ -559,7 +572,7 @@ init_const_expr(const string &expr) {
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 //     Function: CPPPreprocessor::init_type
 //     Function: CPPPreprocessor::init_type
 //       Access: Protected
 //       Access: Protected
-//  Description: 
+//  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 bool CPPPreprocessor::
 bool CPPPreprocessor::
 init_type(const string &type) {
 init_type(const string &type) {
@@ -572,7 +585,7 @@ init_type(const string &type) {
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 //     Function: CPPPreprocessor::push_file
 //     Function: CPPPreprocessor::push_file
 //       Access: Protected
 //       Access: Protected
-//  Description: 
+//  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 bool CPPPreprocessor::
 bool CPPPreprocessor::
 push_file(const CPPFile &file) {
 push_file(const CPPFile &file) {
@@ -581,7 +594,7 @@ push_file(const CPPFile &file) {
 #endif
 #endif
   _files.push_back(InputFile());
   _files.push_back(InputFile());
   InputFile &infile = _files.back();
   InputFile &infile = _files.back();
-  
+
   if (infile.open(file)) {
   if (infile.open(file)) {
     // Record the fact that we opened the file for the benefit of user
     // Record the fact that we opened the file for the benefit of user
     // code.
     // code.
@@ -602,12 +615,12 @@ push_file(const CPPFile &file) {
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 //     Function: CPPPreprocessor::push_string
 //     Function: CPPPreprocessor::push_string
 //       Access: Protected
 //       Access: Protected
-//  Description: 
+//  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 bool CPPPreprocessor::
 bool CPPPreprocessor::
 push_string(const string &input, bool lock_position) {
 push_string(const string &input, bool lock_position) {
 #ifdef CPP_VERBOSE_LEX
 #ifdef CPP_VERBOSE_LEX
-  cerr << "Pushing to string \"" << input 
+  cerr << "Pushing to string \"" << input
        << "\"\nlock_position = " << lock_position << "\n";
        << "\"\nlock_position = " << lock_position << "\n";
 #endif
 #endif
   CPPFile first_file = get_file();
   CPPFile first_file = get_file();
@@ -616,8 +629,8 @@ push_string(const string &input, bool lock_position) {
 
 
   _files.push_back(InputFile());
   _files.push_back(InputFile());
   InputFile &infile = _files.back();
   InputFile &infile = _files.back();
-  
-  if (infile.connect_input(input)) { 
+
+  if (infile.connect_input(input)) {
     if (lock_position) {
     if (lock_position) {
       infile._file = first_file;
       infile._file = first_file;
       infile._line_number = first_line;
       infile._line_number = first_line;
@@ -637,7 +650,7 @@ push_string(const string &input, bool lock_position) {
   _files.pop_back();
   _files.pop_back();
   return false;
   return false;
 }
 }
-  
+
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 //     Function: CPPPreprocessor::parse_expr
 //     Function: CPPPreprocessor::parse_expr
 //       Access: Protected
 //       Access: Protected
@@ -650,7 +663,7 @@ push_string(const string &input, bool lock_position) {
 //               of this function defined for CPPParser.
 //               of this function defined for CPPParser.
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 CPPExpression *CPPPreprocessor::
 CPPExpression *CPPPreprocessor::
-parse_expr(const string &input_expr, CPPScope *current_scope, 
+parse_expr(const string &input_expr, CPPScope *current_scope,
            CPPScope *global_scope) {
            CPPScope *global_scope) {
   // Get a copy of the expression string we can modify.
   // Get a copy of the expression string we can modify.
   string expr = input_expr;
   string expr = input_expr;
@@ -710,7 +723,7 @@ parse_expr(const string &input_expr, CPPScope *current_scope,
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 //     Function: CPPPreprocessor::internal_get_next_token
 //     Function: CPPPreprocessor::internal_get_next_token
 //       Access: Private
 //       Access: Private
-//  Description: 
+//  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 CPPToken CPPPreprocessor::
 CPPToken CPPPreprocessor::
 internal_get_next_token() {
 internal_get_next_token() {
@@ -889,7 +902,7 @@ internal_get_next_token() {
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 //     Function: CPPPreprocessor::skip_whitespace
 //     Function: CPPPreprocessor::skip_whitespace
 //       Access: Private
 //       Access: Private
-//  Description: 
+//  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 int CPPPreprocessor::
 int CPPPreprocessor::
 skip_whitespace(int c) {
 skip_whitespace(int c) {
@@ -915,7 +928,7 @@ skip_whitespace(int c) {
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 //     Function: CPPPreprocessor::skip_comment
 //     Function: CPPPreprocessor::skip_comment
 //       Access: Private
 //       Access: Private
-//  Description: 
+//  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 int CPPPreprocessor::
 int CPPPreprocessor::
 skip_comment(int c) {
 skip_comment(int c) {
@@ -941,14 +954,14 @@ skip_comment(int c) {
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 //     Function: CPPPreprocessor::skip_c_comment
 //     Function: CPPPreprocessor::skip_c_comment
 //       Access: Private
 //       Access: Private
-//  Description: 
+//  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 int CPPPreprocessor::
 int CPPPreprocessor::
 skip_c_comment(int c) {
 skip_c_comment(int c) {
   if (_save_comments) {
   if (_save_comments) {
     CPPCommentBlock *comment = new CPPCommentBlock;
     CPPCommentBlock *comment = new CPPCommentBlock;
     _comments.push_back(comment);
     _comments.push_back(comment);
-    
+
     comment->_file = get_file();
     comment->_file = get_file();
     comment->_line_number = get_line_number();
     comment->_line_number = get_line_number();
     comment->_last_line = get_line_number();
     comment->_last_line = get_line_number();
@@ -970,16 +983,16 @@ skip_c_comment(int c) {
         c = get();
         c = get();
       }
       }
     }
     }
-    
-    warning("Comment is unterminated", 
-            comment->_line_number, comment->_col_number, 
+
+    warning("Comment is unterminated",
+            comment->_line_number, comment->_col_number,
             comment->_file);
             comment->_file);
 
 
   } else {
   } else {
     CPPFile first_file = get_file();
     CPPFile first_file = get_file();
     int first_line_number = get_line_number();
     int first_line_number = get_line_number();
     int first_col_number = get_col_number() - 2;
     int first_col_number = get_col_number() - 2;
-    
+
     while (c != EOF) {
     while (c != EOF) {
       if (c == '*') {
       if (c == '*') {
         c = get();
         c = get();
@@ -990,19 +1003,19 @@ skip_c_comment(int c) {
         c = get();
         c = get();
       }
       }
     }
     }
-    
-    warning("Comment is unterminated", 
-            first_line_number, first_col_number, 
+
+    warning("Comment is unterminated",
+            first_line_number, first_col_number,
             first_file);
             first_file);
   }
   }
-  
+
   return c;
   return c;
 }
 }
 
 
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 //     Function: CPPPreprocessor::skip_cpp_comment
 //     Function: CPPPreprocessor::skip_cpp_comment
 //       Access: Private
 //       Access: Private
-//  Description: 
+//  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 int CPPPreprocessor::
 int CPPPreprocessor::
 skip_cpp_comment(int c) {
 skip_cpp_comment(int c) {
@@ -1021,7 +1034,7 @@ skip_cpp_comment(int c) {
     } else {
     } else {
       // Otherwise, this begins a new comment block.
       // Otherwise, this begins a new comment block.
       comment = new CPPCommentBlock;
       comment = new CPPCommentBlock;
-      
+
       comment->_file = get_file();
       comment->_file = get_file();
       comment->_line_number = get_line_number();
       comment->_line_number = get_line_number();
       comment->_last_line = get_line_number();
       comment->_last_line = get_line_number();
@@ -1031,12 +1044,12 @@ skip_cpp_comment(int c) {
 
 
       _comments.push_back(comment);
       _comments.push_back(comment);
     }
     }
-    
+
     while (c != EOF && c != '\n') {
     while (c != EOF && c != '\n') {
       comment->_comment += c;
       comment->_comment += c;
       c = get();
       c = get();
     }
     }
-    
+
     comment->_comment += '\n';
     comment->_comment += '\n';
     comment->_last_line = get_line_number();
     comment->_last_line = get_line_number();
 
 
@@ -1054,7 +1067,7 @@ skip_cpp_comment(int c) {
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 //     Function: CPPPreprocessor::process_directive
 //     Function: CPPPreprocessor::process_directive
 //       Access: Private
 //       Access: Private
-//  Description: 
+//  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 int CPPPreprocessor::
 int CPPPreprocessor::
 process_directive(int c) {
 process_directive(int c) {
@@ -1107,7 +1120,7 @@ process_directive(int c) {
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 //     Function: CPPPreprocessor::get_preprocessor_command
 //     Function: CPPPreprocessor::get_preprocessor_command
 //       Access: Private
 //       Access: Private
-//  Description: 
+//  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 int CPPPreprocessor::
 int CPPPreprocessor::
 get_preprocessor_command(int c, string &command) {
 get_preprocessor_command(int c, string &command) {
@@ -1133,7 +1146,7 @@ get_preprocessor_command(int c, string &command) {
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 //     Function: CPPPreprocessor::get_preprocessor_args
 //     Function: CPPPreprocessor::get_preprocessor_args
 //       Access: Private
 //       Access: Private
-//  Description: 
+//  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 int CPPPreprocessor::
 int CPPPreprocessor::
 get_preprocessor_args(int c, string &args) {
 get_preprocessor_args(int c, string &args) {
@@ -1168,10 +1181,10 @@ get_preprocessor_args(int c, string &args) {
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 //     Function: CPPPreprocessor::handle_define_directive
 //     Function: CPPPreprocessor::handle_define_directive
 //       Access: Private
 //       Access: Private
-//  Description: 
+//  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 void CPPPreprocessor::
 void CPPPreprocessor::
-handle_define_directive(const string &args, int first_line, 
+handle_define_directive(const string &args, int first_line,
                         int first_col, const CPPFile &first_file) {
                         int first_col, const CPPFile &first_file) {
   if (args.empty()) {
   if (args.empty()) {
     warning("Ignoring empty #define directive",
     warning("Ignoring empty #define directive",
@@ -1192,10 +1205,10 @@ handle_define_directive(const string &args, int first_line,
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 //     Function: CPPPreprocessor::handle_undef_directive
 //     Function: CPPPreprocessor::handle_undef_directive
 //       Access: Private
 //       Access: Private
-//  Description: 
+//  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 void CPPPreprocessor::
 void CPPPreprocessor::
-handle_undef_directive(const string &args, int first_line, 
+handle_undef_directive(const string &args, int first_line,
                        int first_col, const CPPFile &first_file) {
                        int first_col, const CPPFile &first_file) {
   if (args.empty()) {
   if (args.empty()) {
     warning("Ignoring empty #undef directive",
     warning("Ignoring empty #undef directive",
@@ -1211,7 +1224,7 @@ handle_undef_directive(const string &args, int first_line,
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 //     Function: CPPPreprocessor::handle_ifdef_directive
 //     Function: CPPPreprocessor::handle_ifdef_directive
 //       Access: Private
 //       Access: Private
-//  Description: 
+//  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 void CPPPreprocessor::
 void CPPPreprocessor::
 handle_ifdef_directive(const string &args, int, int, const CPPFile &) {
 handle_ifdef_directive(const string &args, int, int, const CPPFile &) {
@@ -1220,15 +1233,15 @@ handle_ifdef_directive(const string &args, int, int, const CPPFile &) {
     // The macro is defined.  We continue.
     // The macro is defined.  We continue.
     return;
     return;
   }
   }
-  
+
   // The macro is undefined.  Skip stuff.
   // The macro is undefined.  Skip stuff.
   skip_false_if_block(true);
   skip_false_if_block(true);
 }
 }
-  
+
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 //     Function: CPPPreprocessor::handle_ifndef_directive
 //     Function: CPPPreprocessor::handle_ifndef_directive
 //       Access: Private
 //       Access: Private
-//  Description: 
+//  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 void CPPPreprocessor::
 void CPPPreprocessor::
 handle_ifndef_directive(const string &args, int, int, const CPPFile &) {
 handle_ifndef_directive(const string &args, int, int, const CPPFile &) {
@@ -1237,19 +1250,19 @@ handle_ifndef_directive(const string &args, int, int, const CPPFile &) {
     // The macro is undefined.  We continue.
     // The macro is undefined.  We continue.
     return;
     return;
   }
   }
-  
+
   // The macro is defined.  Skip stuff.
   // The macro is defined.  Skip stuff.
   skip_false_if_block(true);
   skip_false_if_block(true);
 }
 }
 
 
-  
+
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 //     Function: CPPPreprocessor::handle_if_directive
 //     Function: CPPPreprocessor::handle_if_directive
 //       Access: Private
 //       Access: Private
-//  Description: 
+//  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 void CPPPreprocessor::
 void CPPPreprocessor::
-handle_if_directive(const string &args, int first_line, 
+handle_if_directive(const string &args, int first_line,
                     int first_col, const CPPFile &first_file) {
                     int first_col, const CPPFile &first_file) {
   CPPExpression *expr = parse_expr(args, global_scope, global_scope);
   CPPExpression *expr = parse_expr(args, global_scope, global_scope);
 
 
@@ -1272,7 +1285,7 @@ handle_if_directive(const string &args, int first_line,
     // The expression result is true.  We continue.
     // The expression result is true.  We continue.
     return;
     return;
   }
   }
-  
+
   // The expression result is false.  Skip stuff.
   // The expression result is false.  Skip stuff.
   skip_false_if_block(true);
   skip_false_if_block(true);
 }
 }
@@ -1280,16 +1293,16 @@ handle_if_directive(const string &args, int first_line,
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 //     Function: CPPPreprocessor::handle_include_directive
 //     Function: CPPPreprocessor::handle_include_directive
 //       Access: Private
 //       Access: Private
-//  Description: 
+//  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 void CPPPreprocessor::
 void CPPPreprocessor::
-handle_include_directive(const string &args, int first_line, 
+handle_include_directive(const string &args, int first_line,
                          int first_col, const CPPFile &first_file) {
                          int first_col, const CPPFile &first_file) {
   bool okflag = false;
   bool okflag = false;
   Filename filename;
   Filename filename;
   Filename filename_as_referenced;
   Filename filename_as_referenced;
   bool angle_quotes = false;
   bool angle_quotes = false;
-  
+
   if (!args.empty()) {
   if (!args.empty()) {
     if (args[0] == '"' && args[args.size() - 1] == '"') {
     if (args[0] == '"' && args[args.size() - 1] == '"') {
       filename = args.substr(1, args.size() - 2);
       filename = args.substr(1, args.size() - 2);
@@ -1321,14 +1334,14 @@ handle_include_directive(const string &args, int first_line,
   // Now look for the filename.  If we didn't use angle quotes, look
   // Now look for the filename.  If we didn't use angle quotes, look
   // first in the current directory.
   // first in the current directory.
   bool found_file = false;
   bool found_file = false;
-  CPPFile::Source source = CPPFile::S_none; 
+  CPPFile::Source source = CPPFile::S_none;
 
 
   if (okflag) {
   if (okflag) {
     if (!angle_quotes) {
     if (!angle_quotes) {
       found_file = filename.exists();
       found_file = filename.exists();
       source = CPPFile::S_local;
       source = CPPFile::S_local;
     }
     }
-    
+
     // Now look for it on the include path.
     // Now look for it on the include path.
     if (!found_file && filename.resolve_filename(_system_include_path)) {
     if (!found_file && filename.resolve_filename(_system_include_path)) {
       found_file = true;
       found_file = true;
@@ -1339,7 +1352,7 @@ handle_include_directive(const string &args, int first_line,
       found_file = true;
       found_file = true;
       source = CPPFile::S_alternate;
       source = CPPFile::S_alternate;
     }
     }
-    
+
     if (!found_file) {
     if (!found_file) {
       warning("Cannot find " + filename.get_fullpath(),
       warning("Cannot find " + filename.get_fullpath(),
               first_line, first_col, first_file);
               first_line, first_col, first_file);
@@ -1355,14 +1368,14 @@ handle_include_directive(const string &args, int first_line,
             first_line, first_col, first_file);
             first_line, first_col, first_file);
   }
   }
 }
 }
-  
+
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 //     Function: CPPPreprocessor::handle_error_directive
 //     Function: CPPPreprocessor::handle_error_directive
 //       Access: Private
 //       Access: Private
-//  Description: 
+//  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 void CPPPreprocessor::
 void CPPPreprocessor::
-handle_error_directive(const string &args, int first_line, 
+handle_error_directive(const string &args, int first_line,
                        int first_col, const CPPFile &first_file) {
                        int first_col, const CPPFile &first_file) {
   error(args, first_line, first_col, first_file);
   error(args, first_line, first_col, first_file);
 }
 }
@@ -1427,7 +1440,7 @@ skip_false_if_block(bool consider_elifs) {
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 //     Function: CPPPreprocessor::get_quoted_char
 //     Function: CPPPreprocessor::get_quoted_char
 //       Access: Private
 //       Access: Private
-//  Description: 
+//  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 CPPToken CPPPreprocessor::
 CPPToken CPPPreprocessor::
 get_quoted_char(int c) {
 get_quoted_char(int c) {
@@ -1448,7 +1461,7 @@ get_quoted_char(int c) {
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 //     Function: CPPPreprocessor::get_quoted_string
 //     Function: CPPPreprocessor::get_quoted_string
 //       Access: Private
 //       Access: Private
-//  Description: 
+//  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 CPPToken CPPPreprocessor::
 CPPToken CPPPreprocessor::
 get_quoted_string(int c) {
 get_quoted_string(int c) {
@@ -1462,7 +1475,7 @@ get_quoted_string(int c) {
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 //     Function: CPPPreprocessor::get_identifier
 //     Function: CPPPreprocessor::get_identifier
 //       Access: Private
 //       Access: Private
-//  Description: 
+//  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 CPPToken CPPPreprocessor::
 CPPToken CPPPreprocessor::
 get_identifier(int c) {
 get_identifier(int c) {
@@ -1470,7 +1483,7 @@ get_identifier(int c) {
   int first_line = get_line_number();
   int first_line = get_line_number();
   int first_col = get_col_number();
   int first_col = get_col_number();
   string name(1, (char)c);
   string name(1, (char)c);
-  
+
   c = get();
   c = get();
   while (c != EOF && (isalnum(c) || c == '_')) {
   while (c != EOF && (isalnum(c) || c == '_')) {
     name += c;
     name += c;
@@ -1512,12 +1525,12 @@ get_identifier(int c) {
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 //     Function: CPPPreprocessor::expand_manifest
 //     Function: CPPPreprocessor::expand_manifest
 //       Access: Private
 //       Access: Private
-//  Description: 
+//  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 CPPToken CPPPreprocessor::
 CPPToken CPPPreprocessor::
 expand_manifest(const CPPManifest *manifest) {
 expand_manifest(const CPPManifest *manifest) {
   vector_string args;
   vector_string args;
-  
+
   if (manifest->_has_parameters) {
   if (manifest->_has_parameters) {
     // Hmm, we're expecting arguments.
     // Hmm, we're expecting arguments.
     extract_manifest_args(manifest->_name, manifest->_num_parameters, args);
     extract_manifest_args(manifest->_name, manifest->_num_parameters, args);
@@ -1542,10 +1555,10 @@ expand_manifest(const CPPManifest *manifest) {
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 //     Function: CPPPreprocessor::extract_manifest_args
 //     Function: CPPPreprocessor::extract_manifest_args
 //       Access: Private
 //       Access: Private
-//  Description: 
+//  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 void CPPPreprocessor::
 void CPPPreprocessor::
-extract_manifest_args(const string &name, int num_args, 
+extract_manifest_args(const string &name, int num_args,
                       vector_string &args) {
                       vector_string &args) {
   CPPFile first_file = get_file();
   CPPFile first_file = get_file();
   int first_line = get_line_number();
   int first_line = get_line_number();
@@ -1610,7 +1623,7 @@ extract_manifest_args(const string &name, int num_args,
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 //     Function: CPPPreprocessor::expand_defined_function
 //     Function: CPPPreprocessor::expand_defined_function
 //       Access: Private
 //       Access: Private
-//  Description: 
+//  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 void CPPPreprocessor::
 void CPPPreprocessor::
 expand_defined_function(string &expr, size_t q, size_t &p) {
 expand_defined_function(string &expr, size_t q, size_t &p) {
@@ -1637,7 +1650,7 @@ expand_defined_function(string &expr, size_t q, size_t &p) {
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 //     Function: CPPPreprocessor::expand_manifest_inline
 //     Function: CPPPreprocessor::expand_manifest_inline
 //       Access: Private
 //       Access: Private
-//  Description: 
+//  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 void CPPPreprocessor::
 void CPPPreprocessor::
 expand_manifest_inline(string &expr, size_t q, size_t &p,
 expand_manifest_inline(string &expr, size_t q, size_t &p,
@@ -1656,10 +1669,10 @@ expand_manifest_inline(string &expr, size_t q, size_t &p,
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 //     Function: CPPPreprocessor::extract_manifest_args_inline
 //     Function: CPPPreprocessor::extract_manifest_args_inline
 //       Access: Private
 //       Access: Private
-//  Description: 
+//  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 void CPPPreprocessor::
 void CPPPreprocessor::
-extract_manifest_args_inline(const string &name, int num_args, 
+extract_manifest_args_inline(const string &name, int num_args,
                              vector_string &args,
                              vector_string &args,
                              const string &expr, size_t &p) {
                              const string &expr, size_t &p) {
   // Skip whitespace till paren.
   // Skip whitespace till paren.
@@ -1711,14 +1724,14 @@ extract_manifest_args_inline(const string &name, int num_args,
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 //     Function: CPPPreprocessor::get_number
 //     Function: CPPPreprocessor::get_number
 //       Access: Private
 //       Access: Private
-//  Description: 
+//  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 CPPToken CPPPreprocessor::
 CPPToken CPPPreprocessor::
 get_number(int c, int c2) {
 get_number(int c, int c2) {
   CPPFile first_file = get_file();
   CPPFile first_file = get_file();
   int first_line = get_line_number();
   int first_line = get_line_number();
   int first_col = get_col_number();
   int first_col = get_col_number();
-  
+
   string num(1, (char)c);
   string num(1, (char)c);
   bool leading_zero = (c == '0');
   bool leading_zero = (c == '0');
   bool decimal_point = (c == '.');
   bool decimal_point = (c == '.');
@@ -1820,7 +1833,7 @@ get_number(int c, int c2) {
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 //     Function: CPPPreprocessor::check_keyword
 //     Function: CPPPreprocessor::check_keyword
 //       Access: Private, Static
 //       Access: Private, Static
-//  Description: 
+//  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 int CPPPreprocessor::
 int CPPPreprocessor::
 check_keyword(const string &name) {
 check_keyword(const string &name) {
@@ -1828,14 +1841,14 @@ check_keyword(const string &name) {
   if (name == "bool") return KW_BOOL;
   if (name == "bool") return KW_BOOL;
   if (name == "catch") return KW_CATCH;
   if (name == "catch") return KW_CATCH;
   if (name == "char") return KW_CHAR;
   if (name == "char") return KW_CHAR;
-  if (name == "class") return KW_CLASS; 
-  if (name == "const") return KW_CONST; 
+  if (name == "class") return KW_CLASS;
+  if (name == "const") return KW_CONST;
   if (name == "delete") return KW_DELETE;
   if (name == "delete") return KW_DELETE;
   if (name == "double") return KW_DOUBLE;
   if (name == "double") return KW_DOUBLE;
   if (name == "dynamic_cast") return KW_DYNAMIC_CAST;
   if (name == "dynamic_cast") return KW_DYNAMIC_CAST;
   if (name == "else") return KW_ELSE;
   if (name == "else") return KW_ELSE;
   if (name == "__end_publish") return KW_END_PUBLISH;
   if (name == "__end_publish") return KW_END_PUBLISH;
-  if (name == "enum") return KW_ENUM; 
+  if (name == "enum") return KW_ENUM;
   if (name == "extern") return KW_EXTERN;
   if (name == "extern") return KW_EXTERN;
   if (name == "explicit") return KW_EXPLICIT;
   if (name == "explicit") return KW_EXPLICIT;
   if (name == "__published") return KW_PUBLISHED;
   if (name == "__published") return KW_PUBLISHED;
@@ -1862,16 +1875,16 @@ check_keyword(const string &name) {
   if (name == "sizeof") return KW_SIZEOF;
   if (name == "sizeof") return KW_SIZEOF;
   if (name == "static") return KW_STATIC;
   if (name == "static") return KW_STATIC;
   if (name == "static_cast") return KW_STATIC_CAST;
   if (name == "static_cast") return KW_STATIC_CAST;
-  if (name == "struct") return KW_STRUCT; 
+  if (name == "struct") return KW_STRUCT;
   if (name == "template") return KW_TEMPLATE;
   if (name == "template") return KW_TEMPLATE;
   if (name == "throw") return KW_THROW;
   if (name == "throw") return KW_THROW;
   if (name == "true") return KW_TRUE;
   if (name == "true") return KW_TRUE;
   if (name == "try") return KW_TRY;
   if (name == "try") return KW_TRY;
-  if (name == "typedef") return KW_TYPEDEF; 
+  if (name == "typedef") return KW_TYPEDEF;
   if (name == "typename") return KW_TYPENAME;
   if (name == "typename") return KW_TYPENAME;
-  if (name == "union") return KW_UNION; 
+  if (name == "union") return KW_UNION;
   if (name == "unsigned") return KW_UNSIGNED;
   if (name == "unsigned") return KW_UNSIGNED;
-  if (name == "using") return KW_USING; 
+  if (name == "using") return KW_USING;
   if (name == "virtual") return KW_VIRTUAL;
   if (name == "virtual") return KW_VIRTUAL;
   if (name == "void") return KW_VOID;
   if (name == "void") return KW_VOID;
   if (name == "volatile") return KW_VOLATILE;
   if (name == "volatile") return KW_VOLATILE;
@@ -1887,7 +1900,7 @@ check_keyword(const string &name) {
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 //     Function: CPPPreprocessor::scan_quoted
 //     Function: CPPPreprocessor::scan_quoted
 //       Access: Private
 //       Access: Private
-//  Description: 
+//  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 string CPPPreprocessor::
 string CPPPreprocessor::
 scan_quoted(int c) {
 scan_quoted(int c) {
@@ -2008,7 +2021,7 @@ should_ignore_preprocessor() const {
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 //     Function: CPPPreprocessor::get
 //     Function: CPPPreprocessor::get
 //       Access: Private
 //       Access: Private
-//  Description: 
+//  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 int CPPPreprocessor::
 int CPPPreprocessor::
 get() {
 get() {
@@ -2023,7 +2036,7 @@ get() {
   }
   }
 
 
   int c = _files.back().get();
   int c = _files.back().get();
-  
+
   while (c == EOF && !_files.empty()) {
   while (c == EOF && !_files.empty()) {
 #ifdef CPP_VERBOSE_LEX
 #ifdef CPP_VERBOSE_LEX
     cerr << "End of input stream, restoring to previous input\n";
     cerr << "End of input stream, restoring to previous input\n";
@@ -2050,7 +2063,7 @@ get() {
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 //     Function: CPPPreprocessor::unget
 //     Function: CPPPreprocessor::unget
 //       Access: Private
 //       Access: Private
-//  Description: 
+//  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 void CPPPreprocessor::
 void CPPPreprocessor::
 unget(int c) {
 unget(int c) {
@@ -2090,7 +2103,7 @@ nested_parse_template_instantiation(CPPTemplateScope *scope) {
   }
   }
 
 
   CPPTemplateParameterList *actual_params = new CPPTemplateParameterList;
   CPPTemplateParameterList *actual_params = new CPPTemplateParameterList;
-  
+
   for (pi = formal_params._parameters.begin();
   for (pi = formal_params._parameters.begin();
        pi != formal_params._parameters.end() && !_angle_bracket_found;
        pi != formal_params._parameters.end() && !_angle_bracket_found;
        ++pi) {
        ++pi) {

+ 14 - 1
dtool/src/cppparser/cppPreprocessor.h

@@ -2,6 +2,19 @@
 // Created by:  drose (22Oct99)
 // Created by:  drose (22Oct99)
 //
 //
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
+//
+// PANDA 3D SOFTWARE
+// Copyright (c) 2001, Disney Enterprises, Inc.  All rights reserved
+//
+// All use of this software is subject to the terms of the Panda 3d
+// Software license.  You should have received a copy of this license
+// along with this source code; you will also find a current copy of
+// the license at http://www.panda3d.org/license.txt .
+//
+// To contact the maintainers of this program write to
+// [email protected] .
+//
+////////////////////////////////////////////////////////////////////
 
 
 #ifndef CPPPREPROCESSOR_H
 #ifndef CPPPREPROCESSOR_H
 #define CPPPREPROCESSOR_H
 #define CPPPREPROCESSOR_H
@@ -144,7 +157,7 @@ private:
 
 
   bool should_ignore_manifest(const CPPManifest *manifest) const;
   bool should_ignore_manifest(const CPPManifest *manifest) const;
   bool should_ignore_preprocessor() const;
   bool should_ignore_preprocessor() const;
- 
+
   int get();
   int get();
   void unget(int c);
   void unget(int c);
 
 

+ 23 - 10
dtool/src/cppparser/cppReferenceType.cxx

@@ -1,6 +1,19 @@
-// Filename: cppReferenceType.C
+// Filename: cppReferenceType.cxx
 // Created by:  drose (19Oct99)
 // Created by:  drose (19Oct99)
-// 
+//
+////////////////////////////////////////////////////////////////////
+//
+// PANDA 3D SOFTWARE
+// Copyright (c) 2001, Disney Enterprises, Inc.  All rights reserved
+//
+// All use of this software is subject to the terms of the Panda 3d
+// Software license.  You should have received a copy of this license
+// along with this source code; you will also find a current copy of
+// the license at http://www.panda3d.org/license.txt .
+//
+// To contact the maintainers of this program write to
+// [email protected] .
+//
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 
 
 
 
@@ -9,7 +22,7 @@
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 //     Function: CPPReferenceType::Constructor
 //     Function: CPPReferenceType::Constructor
 //       Access: Public
 //       Access: Public
-//  Description: 
+//  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 CPPReferenceType::
 CPPReferenceType::
 CPPReferenceType(CPPType *pointing_at) :
 CPPReferenceType(CPPType *pointing_at) :
@@ -28,14 +41,14 @@ CPPReferenceType(CPPType *pointing_at) :
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 bool CPPReferenceType::
 bool CPPReferenceType::
 is_fully_specified() const {
 is_fully_specified() const {
-  return CPPType::is_fully_specified() && 
+  return CPPType::is_fully_specified() &&
     _pointing_at->is_fully_specified();
     _pointing_at->is_fully_specified();
 }
 }
 
 
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 //     Function: CPPReferenceType::substitute_decl
 //     Function: CPPReferenceType::substitute_decl
 //       Access: Public, Virtual
 //       Access: Public, Virtual
-//  Description: 
+//  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 CPPDeclaration *CPPReferenceType::
 CPPDeclaration *CPPReferenceType::
 substitute_decl(CPPDeclaration::SubstDecl &subst,
 substitute_decl(CPPDeclaration::SubstDecl &subst,
@@ -46,7 +59,7 @@ substitute_decl(CPPDeclaration::SubstDecl &subst,
   }
   }
 
 
   CPPReferenceType *rep = new CPPReferenceType(*this);
   CPPReferenceType *rep = new CPPReferenceType(*this);
-  rep->_pointing_at = 
+  rep->_pointing_at =
     _pointing_at->substitute_decl(subst, current_scope, global_scope)
     _pointing_at->substitute_decl(subst, current_scope, global_scope)
     ->as_type();
     ->as_type();
 
 
@@ -114,7 +127,7 @@ is_equivalent(const CPPType &other) const {
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 //     Function: CPPReferenceType::output
 //     Function: CPPReferenceType::output
 //       Access: Public, Virtual
 //       Access: Public, Virtual
-//  Description: 
+//  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 void CPPReferenceType::
 void CPPReferenceType::
 output(ostream &out, int indent_level, CPPScope *scope, bool complete) const {
 output(ostream &out, int indent_level, CPPScope *scope, bool complete) const {
@@ -134,14 +147,14 @@ void CPPReferenceType::
 output_instance(ostream &out, int indent_level, CPPScope *scope,
 output_instance(ostream &out, int indent_level, CPPScope *scope,
                 bool complete, const string &prename,
                 bool complete, const string &prename,
                 const string &name) const {
                 const string &name) const {
-  _pointing_at->output_instance(out, indent_level, scope, complete, 
+  _pointing_at->output_instance(out, indent_level, scope, complete,
                                 "&" + prename, name);
                                 "&" + prename, name);
 }
 }
 
 
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 //     Function: CPPReferenceType::get_subtype
 //     Function: CPPReferenceType::get_subtype
 //       Access: Public, Virtual
 //       Access: Public, Virtual
-//  Description: 
+//  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 CPPDeclaration::SubType CPPReferenceType::
 CPPDeclaration::SubType CPPReferenceType::
 get_subtype() const {
 get_subtype() const {
@@ -151,7 +164,7 @@ get_subtype() const {
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 //     Function: CPPReferenceType::as_reference_type
 //     Function: CPPReferenceType::as_reference_type
 //       Access: Public, Virtual
 //       Access: Public, Virtual
-//  Description: 
+//  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 CPPReferenceType *CPPReferenceType::
 CPPReferenceType *CPPReferenceType::
 as_reference_type() {
 as_reference_type() {

+ 13 - 0
dtool/src/cppparser/cppReferenceType.h

@@ -2,6 +2,19 @@
 // Created by:  drose (19Oct99)
 // Created by:  drose (19Oct99)
 //
 //
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
+//
+// PANDA 3D SOFTWARE
+// Copyright (c) 2001, Disney Enterprises, Inc.  All rights reserved
+//
+// All use of this software is subject to the terms of the Panda 3d
+// Software license.  You should have received a copy of this license
+// along with this source code; you will also find a current copy of
+// the license at http://www.panda3d.org/license.txt .
+//
+// To contact the maintainers of this program write to
+// [email protected] .
+//
+////////////////////////////////////////////////////////////////////
 
 
 #ifndef CPPREFERENCETYPE_H
 #ifndef CPPREFERENCETYPE_H
 #define CPPREFERENCETYPE_H
 #define CPPREFERENCETYPE_H

+ 78 - 65
dtool/src/cppparser/cppScope.cxx

@@ -1,6 +1,19 @@
-// Filename: cppScope.C
+// Filename: cppScope.cxx
 // Created by:  drose (21Oct99)
 // Created by:  drose (21Oct99)
-// 
+//
+////////////////////////////////////////////////////////////////////
+//
+// PANDA 3D SOFTWARE
+// Copyright (c) 2001, Disney Enterprises, Inc.  All rights reserved
+//
+// All use of this software is subject to the terms of the Panda 3d
+// Software license.  You should have received a copy of this license
+// along with this source code; you will also find a current copy of
+// the license at http://www.panda3d.org/license.txt .
+//
+// To contact the maintainers of this program write to
+// [email protected] .
+//
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 
 
 
 
@@ -26,7 +39,7 @@
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 //     Function: CPPScope::Constructor
 //     Function: CPPScope::Constructor
 //       Access: Public
 //       Access: Public
-//  Description: 
+//  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 CPPScope::
 CPPScope::
 CPPScope(CPPScope *parent_scope,
 CPPScope(CPPScope *parent_scope,
@@ -45,7 +58,7 @@ CPPScope(CPPScope *parent_scope,
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 //     Function: CPPScope::Destructor
 //     Function: CPPScope::Destructor
 //       Access: Public, Virtual
 //       Access: Public, Virtual
-//  Description: 
+//  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 CPPScope::
 CPPScope::
 ~CPPScope() {
 ~CPPScope() {
@@ -89,7 +102,7 @@ get_parent_scope() const {
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 //     Function: CPPScope::set_current_vis
 //     Function: CPPScope::set_current_vis
 //       Access: Public
 //       Access: Public
-//  Description: 
+//  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 void CPPScope::
 void CPPScope::
 set_current_vis(CPPVisibility current_vis) {
 set_current_vis(CPPVisibility current_vis) {
@@ -99,7 +112,7 @@ set_current_vis(CPPVisibility current_vis) {
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 //     Function: CPPScope::get_current_vis
 //     Function: CPPScope::get_current_vis
 //       Access: Public
 //       Access: Public
-//  Description: 
+//  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 CPPVisibility CPPScope::
 CPPVisibility CPPScope::
 get_current_vis() const {
 get_current_vis() const {
@@ -109,7 +122,7 @@ get_current_vis() const {
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 //     Function: CPPScope::add_declaration
 //     Function: CPPScope::add_declaration
 //       Access: Public, Virtual
 //       Access: Public, Virtual
-//  Description: 
+//  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 void CPPScope::
 void CPPScope::
 add_declaration(CPPDeclaration *decl, CPPScope *global_scope,
 add_declaration(CPPDeclaration *decl, CPPScope *global_scope,
@@ -133,7 +146,7 @@ add_declaration(CPPDeclaration *decl, CPPScope *global_scope,
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 //     Function: CPPScope::add_enum_value
 //     Function: CPPScope::add_enum_value
 //       Access: Public, Virtual
 //       Access: Public, Virtual
-//  Description: 
+//  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 void CPPScope::
 void CPPScope::
 add_enum_value(CPPInstance *inst) {
 add_enum_value(CPPInstance *inst) {
@@ -148,7 +161,7 @@ add_enum_value(CPPInstance *inst) {
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 //     Function: CPPScope::define_extension_type
 //     Function: CPPScope::define_extension_type
 //       Access: Public, Virtual
 //       Access: Public, Virtual
-//  Description: 
+//  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 void CPPScope::
 void CPPScope::
 define_extension_type(CPPExtensionType *type) {
 define_extension_type(CPPExtensionType *type) {
@@ -199,7 +212,7 @@ define_extension_type(CPPExtensionType *type) {
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 //     Function: CPPScope::define_namespace
 //     Function: CPPScope::define_namespace
 //       Access: Public, Virtual
 //       Access: Public, Virtual
-//  Description: 
+//  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 void CPPScope::
 void CPPScope::
 define_namespace(CPPNamespace *scope) {
 define_namespace(CPPNamespace *scope) {
@@ -211,13 +224,13 @@ define_namespace(CPPNamespace *scope) {
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 //     Function: CPPScope::add_using
 //     Function: CPPScope::add_using
 //       Access: Public, Virtual
 //       Access: Public, Virtual
-//  Description: 
+//  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 void CPPScope::
 void CPPScope::
 add_using(CPPUsing *using_decl, CPPScope *global_scope,
 add_using(CPPUsing *using_decl, CPPScope *global_scope,
           CPPPreprocessor *error_sink) {
           CPPPreprocessor *error_sink) {
   if (using_decl->_full_namespace) {
   if (using_decl->_full_namespace) {
-    CPPScope *scope = 
+    CPPScope *scope =
       using_decl->_ident->find_scope(this, global_scope);
       using_decl->_ident->find_scope(this, global_scope);
     if (scope != NULL) {
     if (scope != NULL) {
       _using.insert(scope);
       _using.insert(scope);
@@ -265,8 +278,8 @@ is_fully_specified() const {
   }
   }
 
 
   Declarations::const_iterator di;
   Declarations::const_iterator di;
-  for (di = _declarations.begin(); 
-       di != _declarations.end() && specified; 
+  for (di = _declarations.begin();
+       di != _declarations.end() && specified;
        ++di) {
        ++di) {
     if (!(*di)->is_fully_specified()) {
     if (!(*di)->is_fully_specified()) {
       specified = false;
       specified = false;
@@ -283,7 +296,7 @@ is_fully_specified() const {
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 //     Function: CPPScope::instantiate
 //     Function: CPPScope::instantiate
 //       Access: Public
 //       Access: Public
-//  Description: 
+//  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 CPPScope *CPPScope::
 CPPScope *CPPScope::
 instantiate(const CPPTemplateParameterList *actual_params,
 instantiate(const CPPTemplateParameterList *actual_params,
@@ -291,10 +304,10 @@ instantiate(const CPPTemplateParameterList *actual_params,
             CPPPreprocessor *error_sink) const {
             CPPPreprocessor *error_sink) const {
   CPPScope *this_scope = (CPPScope *)this;
   CPPScope *this_scope = (CPPScope *)this;
 
 
-  if (_parent_scope == NULL || 
+  if (_parent_scope == NULL ||
       _parent_scope->as_template_scope() == NULL) {
       _parent_scope->as_template_scope() == NULL) {
     if (error_sink != NULL) {
     if (error_sink != NULL) {
-      error_sink->warning("Ignoring template parameters for scope " + 
+      error_sink->warning("Ignoring template parameters for scope " +
                           get_local_name());
                           get_local_name());
     }
     }
     return this_scope;
     return this_scope;
@@ -333,7 +346,7 @@ instantiate(const CPPTemplateParameterList *actual_params,
     //    scope = new CPPScope(current_scope, name, V_public);
     //    scope = new CPPScope(current_scope, name, V_public);
     scope = new CPPScope(_parent_scope, name, V_public);
     scope = new CPPScope(_parent_scope, name, V_public);
     copy_substitute_decl(scope, subst, global_scope);
     copy_substitute_decl(scope, subst, global_scope);
-    
+
     // Also define any new template parameter types, in case we
     // Also define any new template parameter types, in case we
     // "instantiated" this scope with another template parameter.
     // "instantiated" this scope with another template parameter.
     CPPTemplateParameterList::Parameters::const_iterator pi;
     CPPTemplateParameterList::Parameters::const_iterator pi;
@@ -351,7 +364,7 @@ instantiate(const CPPTemplateParameterList *actual_params,
       }
       }
     }
     }
   }
   }
-    
+
   // Finally, record this particular instantiation for future
   // Finally, record this particular instantiation for future
   // reference, so we don't have to do this again.
   // reference, so we don't have to do this again.
   ((CPPScope *)this)->_instantiations.insert(Instantiations::value_type(actual_params, scope));
   ((CPPScope *)this)->_instantiations.insert(Instantiations::value_type(actual_params, scope));
@@ -362,7 +375,7 @@ instantiate(const CPPTemplateParameterList *actual_params,
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 //     Function: CPPScope::substitute_decl
 //     Function: CPPScope::substitute_decl
 //       Access: Public, Virtual
 //       Access: Public, Virtual
-//  Description: 
+//  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 CPPScope *CPPScope::
 CPPScope *CPPScope::
 substitute_decl(CPPDeclaration::SubstDecl &subst,
 substitute_decl(CPPDeclaration::SubstDecl &subst,
@@ -388,7 +401,7 @@ substitute_decl(CPPDeclaration::SubstDecl &subst,
     // scope has template parameters--then we must first remove any of
     // scope has template parameters--then we must first remove any of
     // the template parameters from the subst list.  These will later
     // the template parameters from the subst list.  These will later
     // get substituted properly during instantiation.
     // get substituted properly during instantiation.
-    const CPPTemplateParameterList &p = 
+    const CPPTemplateParameterList &p =
       _parent_scope->as_template_scope()->_parameters;
       _parent_scope->as_template_scope()->_parameters;
 
 
     CPPDeclaration::SubstDecl new_subst = subst;
     CPPDeclaration::SubstDecl new_subst = subst;
@@ -413,7 +426,7 @@ substitute_decl(CPPDeclaration::SubstDecl &subst,
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 //     Function: CPPScope::find_type
 //     Function: CPPScope::find_type
 //       Access: Public
 //       Access: Public
-//  Description: 
+//  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 CPPType *CPPScope::
 CPPType *CPPScope::
 find_type(const string &name, bool recurse) const {
 find_type(const string &name, bool recurse) const {
@@ -433,8 +446,8 @@ find_type(const string &name, bool recurse) const {
 
 
   if (_struct_type != NULL) {
   if (_struct_type != NULL) {
     CPPStructType::Derivation::const_iterator di;
     CPPStructType::Derivation::const_iterator di;
-    for (di = _struct_type->_derivation.begin(); 
-         di != _struct_type->_derivation.end(); 
+    for (di = _struct_type->_derivation.begin();
+         di != _struct_type->_derivation.end();
          ++di) {
          ++di) {
       CPPStructType *st = (*di)._base->as_struct_type();
       CPPStructType *st = (*di)._base->as_struct_type();
       if (st != NULL) {
       if (st != NULL) {
@@ -456,7 +469,7 @@ find_type(const string &name, bool recurse) const {
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 //     Function: CPPScope::find_type
 //     Function: CPPScope::find_type
 //       Access: Public
 //       Access: Public
-//  Description: 
+//  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 CPPType *CPPScope::
 CPPType *CPPScope::
 find_type(const string &name, CPPDeclaration::SubstDecl &subst,
 find_type(const string &name, CPPDeclaration::SubstDecl &subst,
@@ -479,12 +492,12 @@ find_type(const string &name, CPPDeclaration::SubstDecl &subst,
 
 
   if (_struct_type != NULL) {
   if (_struct_type != NULL) {
     CPPStructType::Derivation::const_iterator di;
     CPPStructType::Derivation::const_iterator di;
-    for (di = _struct_type->_derivation.begin(); 
-         di != _struct_type->_derivation.end(); 
+    for (di = _struct_type->_derivation.begin();
+         di != _struct_type->_derivation.end();
          ++di) {
          ++di) {
       CPPStructType *st = (*di)._base->as_struct_type();
       CPPStructType *st = (*di)._base->as_struct_type();
       if (st != NULL) {
       if (st != NULL) {
-        CPPType *type = st->_scope->find_type(name, subst, global_scope, 
+        CPPType *type = st->_scope->find_type(name, subst, global_scope,
                                               false);
                                               false);
         if (type != NULL) {
         if (type != NULL) {
           return type;
           return type;
@@ -503,7 +516,7 @@ find_type(const string &name, CPPDeclaration::SubstDecl &subst,
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 //     Function: CPPScope::find_scope
 //     Function: CPPScope::find_scope
 //       Access: Public
 //       Access: Public
-//  Description: 
+//  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 CPPScope *CPPScope::
 CPPScope *CPPScope::
 find_scope(const string &name, bool recurse) const {
 find_scope(const string &name, bool recurse) const {
@@ -521,8 +534,8 @@ find_scope(const string &name, bool recurse) const {
 
 
   } else if (_struct_type != NULL) {
   } else if (_struct_type != NULL) {
     CPPStructType::Derivation::const_iterator di;
     CPPStructType::Derivation::const_iterator di;
-    for (di = _struct_type->_derivation.begin(); 
-         di != _struct_type->_derivation.end(); 
+    for (di = _struct_type->_derivation.begin();
+         di != _struct_type->_derivation.end();
          ++di) {
          ++di) {
       CPPStructType *st = (*di)._base->as_struct_type();
       CPPStructType *st = (*di)._base->as_struct_type();
       if (st != NULL) {
       if (st != NULL) {
@@ -556,7 +569,7 @@ find_scope(const string &name, bool recurse) const {
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 //     Function: CPPScope::find_scope
 //     Function: CPPScope::find_scope
 //       Access: Public
 //       Access: Public
-//  Description: 
+//  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 CPPScope *CPPScope::
 CPPScope *CPPScope::
 find_scope(const string &name, CPPDeclaration::SubstDecl &subst,
 find_scope(const string &name, CPPDeclaration::SubstDecl &subst,
@@ -575,7 +588,7 @@ find_scope(const string &name, CPPDeclaration::SubstDecl &subst,
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 //     Function: CPPScope::find_symbol
 //     Function: CPPScope::find_symbol
 //       Access: Public
 //       Access: Public
-//  Description: 
+//  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 CPPDeclaration *CPPScope::
 CPPDeclaration *CPPScope::
 find_symbol(const string &name, bool recurse) const {
 find_symbol(const string &name, bool recurse) const {
@@ -616,8 +629,8 @@ find_symbol(const string &name, bool recurse) const {
 
 
   if (_struct_type != NULL) {
   if (_struct_type != NULL) {
     CPPStructType::Derivation::const_iterator di;
     CPPStructType::Derivation::const_iterator di;
-    for (di = _struct_type->_derivation.begin(); 
-         di != _struct_type->_derivation.end(); 
+    for (di = _struct_type->_derivation.begin();
+         di != _struct_type->_derivation.end();
          ++di) {
          ++di) {
       CPPStructType *st = (*di)._base->as_struct_type();
       CPPStructType *st = (*di)._base->as_struct_type();
       if (st != NULL) {
       if (st != NULL) {
@@ -639,7 +652,7 @@ find_symbol(const string &name, bool recurse) const {
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 //     Function: CPPScope::find_template
 //     Function: CPPScope::find_template
 //       Access: Public
 //       Access: Public
-//  Description: 
+//  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 CPPDeclaration *CPPScope::
 CPPDeclaration *CPPScope::
 find_template(const string &name, bool recurse) const {
 find_template(const string &name, bool recurse) const {
@@ -659,8 +672,8 @@ find_template(const string &name, bool recurse) const {
 
 
   if (_struct_type != NULL) {
   if (_struct_type != NULL) {
     CPPStructType::Derivation::const_iterator di;
     CPPStructType::Derivation::const_iterator di;
-    for (di = _struct_type->_derivation.begin(); 
-         di != _struct_type->_derivation.end(); 
+    for (di = _struct_type->_derivation.begin();
+         di != _struct_type->_derivation.end();
          ++di) {
          ++di) {
       CPPStructType *st = (*di)._base->as_struct_type();
       CPPStructType *st = (*di)._base->as_struct_type();
       if (st != NULL) {
       if (st != NULL) {
@@ -682,7 +695,7 @@ find_template(const string &name, bool recurse) const {
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 //     Function: CPPScope::get_simple_name
 //     Function: CPPScope::get_simple_name
 //       Access: Public, Virtual
 //       Access: Public, Virtual
-//  Description: 
+//  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 string CPPScope::
 string CPPScope::
 get_simple_name() const {
 get_simple_name() const {
@@ -697,7 +710,7 @@ get_simple_name() const {
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 //     Function: CPPScope::get_local_name
 //     Function: CPPScope::get_local_name
 //       Access: Public, Virtual
 //       Access: Public, Virtual
-//  Description: 
+//  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 string CPPScope::
 string CPPScope::
 get_local_name(CPPScope *scope) const {
 get_local_name(CPPScope *scope) const {
@@ -708,7 +721,7 @@ get_local_name(CPPScope *scope) const {
   */
   */
 
 
   if (scope != NULL && _parent_scope != NULL && _parent_scope != scope) {
   if (scope != NULL && _parent_scope != NULL && _parent_scope != scope) {
-    return _parent_scope->get_local_name(scope) + "::" + 
+    return _parent_scope->get_local_name(scope) + "::" +
       _name.get_name_with_templ();
       _name.get_name_with_templ();
   } else {
   } else {
     return _name.get_name_with_templ();
     return _name.get_name_with_templ();
@@ -718,7 +731,7 @@ get_local_name(CPPScope *scope) const {
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 //     Function: CPPScope::get_fully_scoped_name
 //     Function: CPPScope::get_fully_scoped_name
 //       Access: Public, Virtual
 //       Access: Public, Virtual
-//  Description: 
+//  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 string CPPScope::
 string CPPScope::
 get_fully_scoped_name() const {
 get_fully_scoped_name() const {
@@ -729,7 +742,7 @@ get_fully_scoped_name() const {
   */
   */
 
 
   if (_parent_scope != NULL) {
   if (_parent_scope != NULL) {
-    return _parent_scope->get_fully_scoped_name() + "::" + 
+    return _parent_scope->get_fully_scoped_name() + "::" +
       _name.get_name_with_templ();
       _name.get_name_with_templ();
   } else {
   } else {
     return _name.get_name_with_templ();
     return _name.get_name_with_templ();
@@ -739,7 +752,7 @@ get_fully_scoped_name() const {
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 //     Function: CPPScope::output
 //     Function: CPPScope::output
 //       Access: Public, Virtual
 //       Access: Public, Virtual
-//  Description: 
+//  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 void CPPScope::
 void CPPScope::
 output(ostream &out, CPPScope *scope) const {
 output(ostream &out, CPPScope *scope) const {
@@ -754,7 +767,7 @@ output(ostream &out, CPPScope *scope) const {
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 //     Function: CPPScope::write
 //     Function: CPPScope::write
 //       Access: Public
 //       Access: Public
-//  Description: 
+//  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 void CPPScope::
 void CPPScope::
 write(ostream &out, int indent_level, CPPScope *scope) const {
 write(ostream &out, int indent_level, CPPScope *scope) const {
@@ -800,7 +813,7 @@ get_template_scope() {
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 //     Function: CPPScope::as_template_scope
 //     Function: CPPScope::as_template_scope
 //       Access: Public, Virtual
 //       Access: Public, Virtual
-//  Description: 
+//  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 CPPTemplateScope *CPPScope::
 CPPTemplateScope *CPPScope::
 as_template_scope() {
 as_template_scope() {
@@ -830,8 +843,8 @@ copy_substitute_decl(CPPScope *to_scope, CPPDeclaration::SubstDecl &subst,
     if (_struct_type->_ident != (CPPIdentifier *)NULL) {
     if (_struct_type->_ident != (CPPIdentifier *)NULL) {
       native_scope = _struct_type->_ident->_native_scope;
       native_scope = _struct_type->_ident->_native_scope;
     }
     }
-    to_scope->_struct_type = 
-      new CPPStructType(_struct_type->_type, 
+    to_scope->_struct_type =
+      new CPPStructType(_struct_type->_type,
                         new CPPIdentifier(to_scope->_name),
                         new CPPIdentifier(to_scope->_name),
                         native_scope, to_scope, _struct_type->_file);
                         native_scope, to_scope, _struct_type->_file);
     to_scope->_struct_type->_incomplete = false;
     to_scope->_struct_type->_incomplete = false;
@@ -842,7 +855,7 @@ copy_substitute_decl(CPPScope *to_scope, CPPDeclaration::SubstDecl &subst,
          di != _struct_type->_derivation.end();
          di != _struct_type->_derivation.end();
          ++di) {
          ++di) {
       CPPStructType::Base b = (*di);
       CPPStructType::Base b = (*di);
-      b._base = 
+      b._base =
         (*di)._base->substitute_decl(subst, to_scope, global_scope)->as_type();
         (*di)._base->substitute_decl(subst, to_scope, global_scope)->as_type();
       to_scope->_struct_type->_derivation.push_back(b);
       to_scope->_struct_type->_derivation.push_back(b);
       if (b._base != (*di)._base) {
       if (b._base != (*di)._base) {
@@ -850,10 +863,10 @@ copy_substitute_decl(CPPScope *to_scope, CPPDeclaration::SubstDecl &subst,
       }
       }
     }
     }
   }
   }
-  
+
   Declarations::const_iterator di;
   Declarations::const_iterator di;
   for (di = _declarations.begin(); di != _declarations.end(); ++di) {
   for (di = _declarations.begin(); di != _declarations.end(); ++di) {
-    CPPDeclaration *decl = 
+    CPPDeclaration *decl =
       (*di)->substitute_decl(subst, to_scope, global_scope);
       (*di)->substitute_decl(subst, to_scope, global_scope);
     to_scope->_declarations.push_back(decl);
     to_scope->_declarations.push_back(decl);
     if (decl != (*di)) {
     if (decl != (*di)) {
@@ -865,7 +878,7 @@ copy_substitute_decl(CPPScope *to_scope, CPPDeclaration::SubstDecl &subst,
   for (ei = _structs.begin(); ei != _structs.end(); ++ei) {
   for (ei = _structs.begin(); ei != _structs.end(); ++ei) {
     string name = (*ei).first;
     string name = (*ei).first;
     CPPType *source_type = (*ei).second;
     CPPType *source_type = (*ei).second;
-    CPPDeclaration *decl = 
+    CPPDeclaration *decl =
       source_type->substitute_decl(subst, to_scope, global_scope);
       source_type->substitute_decl(subst, to_scope, global_scope);
     assert(decl != NULL);
     assert(decl != NULL);
     CPPType *new_type = decl->as_type();
     CPPType *new_type = decl->as_type();
@@ -878,7 +891,7 @@ copy_substitute_decl(CPPScope *to_scope, CPPDeclaration::SubstDecl &subst,
   for (ei = _classes.begin(); ei != _classes.end(); ++ei) {
   for (ei = _classes.begin(); ei != _classes.end(); ++ei) {
     string name = (*ei).first;
     string name = (*ei).first;
     CPPType *source_type = (*ei).second;
     CPPType *source_type = (*ei).second;
-    CPPDeclaration *decl = 
+    CPPDeclaration *decl =
       source_type->substitute_decl(subst, to_scope, global_scope);
       source_type->substitute_decl(subst, to_scope, global_scope);
     assert(decl != NULL);
     assert(decl != NULL);
     CPPType *new_type = decl->as_type();
     CPPType *new_type = decl->as_type();
@@ -887,11 +900,11 @@ copy_substitute_decl(CPPScope *to_scope, CPPDeclaration::SubstDecl &subst,
     if (new_type != source_type) {
     if (new_type != source_type) {
       anything_changed = true;
       anything_changed = true;
     }
     }
-  } 
+  }
   for (ei = _unions.begin(); ei != _unions.end(); ++ei) {
   for (ei = _unions.begin(); ei != _unions.end(); ++ei) {
     string name = (*ei).first;
     string name = (*ei).first;
     CPPType *source_type = (*ei).second;
     CPPType *source_type = (*ei).second;
-    CPPDeclaration *decl = 
+    CPPDeclaration *decl =
       source_type->substitute_decl(subst, to_scope, global_scope);
       source_type->substitute_decl(subst, to_scope, global_scope);
     assert(decl != NULL);
     assert(decl != NULL);
     CPPType *new_type = decl->as_type();
     CPPType *new_type = decl->as_type();
@@ -904,7 +917,7 @@ copy_substitute_decl(CPPScope *to_scope, CPPDeclaration::SubstDecl &subst,
   for (ei = _enums.begin(); ei != _enums.end(); ++ei) {
   for (ei = _enums.begin(); ei != _enums.end(); ++ei) {
     string name = (*ei).first;
     string name = (*ei).first;
     CPPType *source_type = (*ei).second;
     CPPType *source_type = (*ei).second;
-    CPPDeclaration *decl = 
+    CPPDeclaration *decl =
       source_type->substitute_decl(subst, to_scope, global_scope);
       source_type->substitute_decl(subst, to_scope, global_scope);
     assert(decl != NULL);
     assert(decl != NULL);
     CPPType *new_type = decl->as_type();
     CPPType *new_type = decl->as_type();
@@ -925,10 +938,10 @@ copy_substitute_decl(CPPScope *to_scope, CPPDeclaration::SubstDecl &subst,
     }
     }
 
 
     CPPFunctionGroup::Instances::const_iterator ii;
     CPPFunctionGroup::Instances::const_iterator ii;
-    for (ii = fgroup->_instances.begin(); 
+    for (ii = fgroup->_instances.begin();
          ii != fgroup->_instances.end();
          ii != fgroup->_instances.end();
          ++ii) {
          ++ii) {
-      CPPInstance *inst = 
+      CPPInstance *inst =
         (*ii)->substitute_decl(subst, to_scope, global_scope)->as_instance();
         (*ii)->substitute_decl(subst, to_scope, global_scope)->as_instance();
       to_fgroup->_instances.push_back(inst);
       to_fgroup->_instances.push_back(inst);
       if (inst != (*ii)) {
       if (inst != (*ii)) {
@@ -936,10 +949,10 @@ copy_substitute_decl(CPPScope *to_scope, CPPDeclaration::SubstDecl &subst,
       }
       }
     }
     }
   }
   }
-    
+
   Typedefs::const_iterator ti;
   Typedefs::const_iterator ti;
   for (ti = _typedefs.begin(); ti != _typedefs.end(); ++ti) {
   for (ti = _typedefs.begin(); ti != _typedefs.end(); ++ti) {
-    CPPTypedef *td = 
+    CPPTypedef *td =
       (*ti).second->substitute_decl(subst, to_scope, global_scope)->as_typedef();
       (*ti).second->substitute_decl(subst, to_scope, global_scope)->as_typedef();
     to_scope->_typedefs.insert(Typedefs::value_type((*ti).first, td));
     to_scope->_typedefs.insert(Typedefs::value_type((*ti).first, td));
     if (td != (*ti).second) {
     if (td != (*ti).second) {
@@ -948,14 +961,14 @@ copy_substitute_decl(CPPScope *to_scope, CPPDeclaration::SubstDecl &subst,
   }
   }
   Variables::const_iterator vi;
   Variables::const_iterator vi;
   for (vi = _variables.begin(); vi != _variables.end(); ++vi) {
   for (vi = _variables.begin(); vi != _variables.end(); ++vi) {
-    CPPInstance *inst = 
+    CPPInstance *inst =
       (*vi).second->substitute_decl(subst, to_scope, global_scope)->as_instance();
       (*vi).second->substitute_decl(subst, to_scope, global_scope)->as_instance();
     to_scope->_variables.insert(Variables::value_type((*vi).first, inst));
     to_scope->_variables.insert(Variables::value_type((*vi).first, inst));
     if (inst != (*vi).second) {
     if (inst != (*vi).second) {
       anything_changed = true;
       anything_changed = true;
     }
     }
   }
   }
-  
+
   Templates::const_iterator tmi;
   Templates::const_iterator tmi;
   for (tmi = _templates.begin(); tmi != _templates.end(); ++tmi) {
   for (tmi = _templates.begin(); tmi != _templates.end(); ++tmi) {
     CPPDeclaration *decl =
     CPPDeclaration *decl =
@@ -992,7 +1005,7 @@ handle_declaration(CPPDeclaration *decl, CPPScope *global_scope) {
     if (!name.empty() && def->get_scope(this, global_scope) == this) {
     if (!name.empty() && def->get_scope(this, global_scope) == this) {
       // Don't add a new template definition if we already had one
       // Don't add a new template definition if we already had one
       // by the same name in another scope.
       // by the same name in another scope.
-      
+
       if (find_template(name) == NULL) {
       if (find_template(name) == NULL) {
         _templates.insert(Templates::value_type(name, def));
         _templates.insert(Templates::value_type(name, def));
       }
       }
@@ -1036,7 +1049,7 @@ handle_declaration(CPPDeclaration *decl, CPPScope *global_scope) {
         // to the _variables member.
         // to the _variables member.
         _variables[name] = inst;
         _variables[name] = inst;
       }
       }
-    
+
       if (inst->is_template()) {
       if (inst->is_template()) {
         // Don't add a new template definition if we already had one
         // Don't add a new template definition if we already had one
         // by the same name in another scope.
         // by the same name in another scope.
@@ -1047,7 +1060,7 @@ handle_declaration(CPPDeclaration *decl, CPPScope *global_scope) {
 
 
         /*
         /*
         if (inst->_type->as_function_type() == NULL ||
         if (inst->_type->as_function_type() == NULL ||
-            (inst->_type->as_function_type()->_flags & 
+            (inst->_type->as_function_type()->_flags &
              CPPFunctionType::F_constructor) == 0) {
              CPPFunctionType::F_constructor) == 0) {
           _templates.insert(Templates::value_type(name, inst));
           _templates.insert(Templates::value_type(name, inst));
         }
         }

+ 14 - 1
dtool/src/cppparser/cppScope.h

@@ -2,6 +2,19 @@
 // Created by:  drose (21Oct99)
 // Created by:  drose (21Oct99)
 //
 //
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
+//
+// PANDA 3D SOFTWARE
+// Copyright (c) 2001, Disney Enterprises, Inc.  All rights reserved
+//
+// All use of this software is subject to the terms of the Panda 3d
+// Software license.  You should have received a copy of this license
+// along with this source code; you will also find a current copy of
+// the license at http://www.panda3d.org/license.txt .
+//
+// To contact the maintainers of this program write to
+// [email protected] .
+//
+////////////////////////////////////////////////////////////////////
 
 
 #ifndef CPPSCOPE_H
 #ifndef CPPSCOPE_H
 #define CPPSCOPE_H
 #define CPPSCOPE_H
@@ -52,7 +65,7 @@ public:
   CPPScope *get_parent_scope() const;
   CPPScope *get_parent_scope() const;
 
 
   virtual void add_declaration(CPPDeclaration *decl, CPPScope *global_scope,
   virtual void add_declaration(CPPDeclaration *decl, CPPScope *global_scope,
-                               CPPPreprocessor *preprocessor, 
+                               CPPPreprocessor *preprocessor,
                                const cppyyltype &pos);
                                const cppyyltype &pos);
   virtual void add_enum_value(CPPInstance *inst);
   virtual void add_enum_value(CPPInstance *inst);
   virtual void define_extension_type(CPPExtensionType *type);
   virtual void define_extension_type(CPPExtensionType *type);

+ 20 - 7
dtool/src/cppparser/cppSimpleType.cxx

@@ -1,6 +1,19 @@
-// Filename: cppSimpleType.C
+// Filename: cppSimpleType.cxx
 // Created by:  drose (19Oct99)
 // Created by:  drose (19Oct99)
-// 
+//
+////////////////////////////////////////////////////////////////////
+//
+// PANDA 3D SOFTWARE
+// Copyright (c) 2001, Disney Enterprises, Inc.  All rights reserved
+//
+// All use of this software is subject to the terms of the Panda 3d
+// Software license.  You should have received a copy of this license
+// along with this source code; you will also find a current copy of
+// the license at http://www.panda3d.org/license.txt .
+//
+// To contact the maintainers of this program write to
+// [email protected] .
+//
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 
 
 #include "cppSimpleType.h"
 #include "cppSimpleType.h"
@@ -9,7 +22,7 @@
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 //     Function: CPPSimpleType::Constructor
 //     Function: CPPSimpleType::Constructor
 //       Access: Public
 //       Access: Public
-//  Description: 
+//  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 CPPSimpleType::
 CPPSimpleType::
 CPPSimpleType(CPPSimpleType::Type type, int flags) :
 CPPSimpleType(CPPSimpleType::Type type, int flags) :
@@ -34,7 +47,7 @@ is_tbd() const {
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 //     Function: CPPSimpleType::get_preferred_name
 //     Function: CPPSimpleType::get_preferred_name
 //       Access: Public, Virtual
 //       Access: Public, Virtual
-//  Description: 
+//  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 string CPPSimpleType::
 string CPPSimpleType::
 get_preferred_name() const {
 get_preferred_name() const {
@@ -45,7 +58,7 @@ get_preferred_name() const {
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 //     Function: CPPSimpleType::output
 //     Function: CPPSimpleType::output
 //       Access: Public, Virtual
 //       Access: Public, Virtual
-//  Description: 
+//  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 void CPPSimpleType::
 void CPPSimpleType::
 output(ostream &out, int, CPPScope *, bool) const {
 output(ostream &out, int, CPPScope *, bool) const {
@@ -111,7 +124,7 @@ output(ostream &out, int, CPPScope *, bool) const {
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 //     Function: CPPSimpleType::get_subtype
 //     Function: CPPSimpleType::get_subtype
 //       Access: Public, Virtual
 //       Access: Public, Virtual
-//  Description: 
+//  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 CPPDeclaration::SubType CPPSimpleType::
 CPPDeclaration::SubType CPPSimpleType::
 get_subtype() const {
 get_subtype() const {
@@ -121,7 +134,7 @@ get_subtype() const {
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 //     Function: CPPSimpleType::as_simple_type
 //     Function: CPPSimpleType::as_simple_type
 //       Access: Public, Virtual
 //       Access: Public, Virtual
-//  Description: 
+//  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 CPPSimpleType *CPPSimpleType::
 CPPSimpleType *CPPSimpleType::
 as_simple_type() {
 as_simple_type() {

+ 13 - 0
dtool/src/cppparser/cppSimpleType.h

@@ -2,6 +2,19 @@
 // Created by:  drose (19Oct99)
 // Created by:  drose (19Oct99)
 //
 //
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
+//
+// PANDA 3D SOFTWARE
+// Copyright (c) 2001, Disney Enterprises, Inc.  All rights reserved
+//
+// All use of this software is subject to the terms of the Panda 3d
+// Software license.  You should have received a copy of this license
+// along with this source code; you will also find a current copy of
+// the license at http://www.panda3d.org/license.txt .
+//
+// To contact the maintainers of this program write to
+// [email protected] .
+//
+////////////////////////////////////////////////////////////////////
 
 
 #ifndef CPPSIMPLETYPE_H
 #ifndef CPPSIMPLETYPE_H
 #define CPPSIMPLETYPE_H
 #define CPPSIMPLETYPE_H

+ 42 - 29
dtool/src/cppparser/cppStructType.cxx

@@ -1,6 +1,19 @@
-// Filename: cppStructType.C
+// Filename: cppStructType.cxx
 // Created by:  drose (19Oct99)
 // Created by:  drose (19Oct99)
-// 
+//
+////////////////////////////////////////////////////////////////////
+//
+// PANDA 3D SOFTWARE
+// Copyright (c) 2001, Disney Enterprises, Inc.  All rights reserved
+//
+// All use of this software is subject to the terms of the Panda 3d
+// Software license.  You should have received a copy of this license
+// along with this source code; you will also find a current copy of
+// the license at http://www.panda3d.org/license.txt .
+//
+// To contact the maintainers of this program write to
+// [email protected] .
+//
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 
 
 
 
@@ -18,7 +31,7 @@
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 //     Function: CPPStructType::Base::output
 //     Function: CPPStructType::Base::output
 //       Access: Public
 //       Access: Public
-//  Description: 
+//  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 void CPPStructType::Base::
 void CPPStructType::Base::
 output(ostream &out) const {
 output(ostream &out) const {
@@ -31,11 +44,11 @@ output(ostream &out) const {
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 //     Function: CPPStructType::Constructor
 //     Function: CPPStructType::Constructor
 //       Access: Public
 //       Access: Public
-//  Description: 
+//  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 CPPStructType::
 CPPStructType::
-CPPStructType(CPPStructType::Type type, CPPIdentifier *ident, 
-              CPPScope *current_scope, CPPScope *scope, 
+CPPStructType(CPPStructType::Type type, CPPIdentifier *ident,
+              CPPScope *current_scope, CPPScope *scope,
               const CPPFile &file) :
               const CPPFile &file) :
   CPPExtensionType(type, ident, current_scope, file),
   CPPExtensionType(type, ident, current_scope, file),
   _scope(scope)
   _scope(scope)
@@ -47,7 +60,7 @@ CPPStructType(CPPStructType::Type type, CPPIdentifier *ident,
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 //     Function: CPPStructType::Copy Constructor
 //     Function: CPPStructType::Copy Constructor
 //       Access: Public
 //       Access: Public
-//  Description: 
+//  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 CPPStructType::
 CPPStructType::
 CPPStructType(const CPPStructType &copy) :
 CPPStructType(const CPPStructType &copy) :
@@ -62,7 +75,7 @@ CPPStructType(const CPPStructType &copy) :
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 //     Function: CPPStructType::Copy Assignment Operator
 //     Function: CPPStructType::Copy Assignment Operator
 //       Access: Public
 //       Access: Public
-//  Description: 
+//  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 void CPPStructType::
 void CPPStructType::
 operator = (const CPPStructType &copy) {
 operator = (const CPPStructType &copy) {
@@ -86,7 +99,7 @@ append_derivation(CPPType *base, CPPVisibility vis, bool is_virtual) {
     b._base = base;
     b._base = base;
     b._vis = vis;
     b._vis = vis;
     b._is_virtual = is_virtual;
     b._is_virtual = is_virtual;
-    
+
     _derivation.push_back(b);
     _derivation.push_back(b);
   }
   }
 }
 }
@@ -94,7 +107,7 @@ append_derivation(CPPType *base, CPPVisibility vis, bool is_virtual) {
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 //     Function: CPPStructType::get_scope
 //     Function: CPPStructType::get_scope
 //       Access: Public
 //       Access: Public
-//  Description: 
+//  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 CPPScope *CPPStructType::
 CPPScope *CPPStructType::
 get_scope() const {
 get_scope() const {
@@ -188,10 +201,10 @@ get_destructor() const {
          ++ii) {
          ++ii) {
       CPPInstance *inst = (*ii);
       CPPInstance *inst = (*ii);
       assert(inst->_type != (CPPType *)NULL);
       assert(inst->_type != (CPPType *)NULL);
-      
+
       CPPFunctionType *ftype = inst->_type->as_function_type();
       CPPFunctionType *ftype = inst->_type->as_function_type();
       assert(ftype != (CPPFunctionType *)NULL);
       assert(ftype != (CPPFunctionType *)NULL);
-      
+
       if ((ftype->_flags & CPPFunctionType::F_destructor) != 0) {
       if ((ftype->_flags & CPPFunctionType::F_destructor) != 0) {
         return inst;
         return inst;
       }
       }
@@ -205,7 +218,7 @@ get_destructor() const {
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 //     Function: CPPStructType::instantiate
 //     Function: CPPStructType::instantiate
 //       Access: Public, Virtual
 //       Access: Public, Virtual
-//  Description: 
+//  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 CPPDeclaration *CPPStructType::
 CPPDeclaration *CPPStructType::
 instantiate(const CPPTemplateParameterList *actual_params,
 instantiate(const CPPTemplateParameterList *actual_params,
@@ -217,13 +230,13 @@ instantiate(const CPPTemplateParameterList *actual_params,
 
 
   if (_scope == NULL) {
   if (_scope == NULL) {
     if (error_sink != NULL) {
     if (error_sink != NULL) {
-      error_sink->warning("Ignoring template parameters for class " + 
+      error_sink->warning("Ignoring template parameters for class " +
                           get_local_name());
                           get_local_name());
     }
     }
     return (CPPDeclaration *)this;
     return (CPPDeclaration *)this;
   }
   }
 
 
-  CPPScope *scope = 
+  CPPScope *scope =
     _scope->instantiate(actual_params, current_scope, global_scope, error_sink);
     _scope->instantiate(actual_params, current_scope, global_scope, error_sink);
 
 
   if (scope->get_struct_type()->get_scope() != scope) {
   if (scope->get_struct_type()->get_scope() != scope) {
@@ -251,7 +264,7 @@ instantiate(const CPPTemplateParameterList *actual_params,
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 //     Function: CPPStructType::substitute_decl
 //     Function: CPPStructType::substitute_decl
 //       Access: Public, Virtual
 //       Access: Public, Virtual
-//  Description: 
+//  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 CPPDeclaration *CPPStructType::
 CPPDeclaration *CPPStructType::
 substitute_decl(CPPDeclaration::SubstDecl &subst,
 substitute_decl(CPPDeclaration::SubstDecl &subst,
@@ -280,7 +293,7 @@ substitute_decl(CPPDeclaration::SubstDecl &subst,
   CPPStructType *rep = new CPPStructType(*this);
   CPPStructType *rep = new CPPStructType(*this);
 
 
   if (_ident != NULL) {
   if (_ident != NULL) {
-    rep->_ident = 
+    rep->_ident =
       _ident->substitute_decl(subst, current_scope, global_scope);
       _ident->substitute_decl(subst, current_scope, global_scope);
   }
   }
 
 
@@ -294,7 +307,7 @@ substitute_decl(CPPDeclaration::SubstDecl &subst,
       // parameters into our identifier.
       // parameters into our identifier.
       CPPScope *pscope = rep->_scope->get_parent_scope();
       CPPScope *pscope = rep->_scope->get_parent_scope();
 
 
-      if (pscope != (CPPScope *)NULL && 
+      if (pscope != (CPPScope *)NULL &&
           pscope->_name.has_templ()) {
           pscope->_name.has_templ()) {
 
 
         // If the struct name didn't have an explicit template
         // If the struct name didn't have an explicit template
@@ -311,11 +324,11 @@ substitute_decl(CPPDeclaration::SubstDecl &subst,
     }
     }
   }
   }
 
 
-  bool unchanged = 
+  bool unchanged =
     (rep->_ident == _ident && rep->_scope == _scope);
     (rep->_ident == _ident && rep->_scope == _scope);
 
 
   for (int i = 0; i < (int)_derivation.size(); i++) {
   for (int i = 0; i < (int)_derivation.size(); i++) {
-    rep->_derivation[i]._base = 
+    rep->_derivation[i]._base =
       _derivation[i]._base->substitute_decl(subst, current_scope, global_scope)->as_type();
       _derivation[i]._base->substitute_decl(subst, current_scope, global_scope)->as_type();
     if (rep->_derivation[i]._base != _derivation[i]._base) {
     if (rep->_derivation[i]._base != _derivation[i]._base) {
       unchanged = false;
       unchanged = false;
@@ -350,7 +363,7 @@ substitute_decl(CPPDeclaration::SubstDecl &subst,
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 //     Function: CPPStructType::output
 //     Function: CPPStructType::output
 //       Access: Public, Virtual
 //       Access: Public, Virtual
-//  Description: 
+//  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 void CPPStructType::
 void CPPStructType::
 output(ostream &out, int indent_level, CPPScope *scope, bool complete) const {
 output(ostream &out, int indent_level, CPPScope *scope, bool complete) const {
@@ -382,7 +395,7 @@ output(ostream &out, int indent_level, CPPScope *scope, bool complete) const {
     } else {
     } else {
       out << _type;
       out << _type;
     }
     }
-    
+
     // Show any derivation we may have
     // Show any derivation we may have
     if (!_derivation.empty()) {
     if (!_derivation.empty()) {
       Derivation::const_iterator di = _derivation.begin();
       Derivation::const_iterator di = _derivation.begin();
@@ -403,7 +416,7 @@ output(ostream &out, int indent_level, CPPScope *scope, bool complete) const {
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 //     Function: CPPStructType::get_subtype
 //     Function: CPPStructType::get_subtype
 //       Access: Public, Virtual
 //       Access: Public, Virtual
-//  Description: 
+//  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 CPPDeclaration::SubType CPPStructType::
 CPPDeclaration::SubType CPPStructType::
 get_subtype() const {
 get_subtype() const {
@@ -413,7 +426,7 @@ get_subtype() const {
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 //     Function: CPPStructType::as_struct_type
 //     Function: CPPStructType::as_struct_type
 //       Access: Public, Virtual
 //       Access: Public, Virtual
-//  Description: 
+//  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 CPPStructType *CPPStructType::
 CPPStructType *CPPStructType::
 as_struct_type() {
 as_struct_type() {
@@ -466,7 +479,7 @@ get_virtual_funcs(VFunctions &funcs) const {
       if (destructor != (CPPInstance *)NULL) {
       if (destructor != (CPPInstance *)NULL) {
         // It's a match!  This destructor is virtual.
         // It's a match!  This destructor is virtual.
         funcs.erase(vfi);
         funcs.erase(vfi);
-        destructor->_storage_class |= 
+        destructor->_storage_class |=
           (CPPInstance::SC_virtual | CPPInstance::SC_inherited_virtual);
           (CPPInstance::SC_virtual | CPPInstance::SC_inherited_virtual);
       }
       }
 
 
@@ -501,7 +514,7 @@ get_virtual_funcs(VFunctions &funcs) const {
             // *inherited* virtual, which means only that the
             // *inherited* virtual, which means only that the
             // interface is defined in some parent class.  Sometimes
             // interface is defined in some parent class.  Sometimes
             // this is useful to know.
             // this is useful to know.
-            new_inst->_storage_class |= 
+            new_inst->_storage_class |=
               (CPPInstance::SC_virtual | CPPInstance::SC_inherited_virtual);
               (CPPInstance::SC_virtual | CPPInstance::SC_inherited_virtual);
           }
           }
         }
         }
@@ -518,7 +531,7 @@ get_virtual_funcs(VFunctions &funcs) const {
     CPPFunctionGroup *fgroup = (*fi).second;
     CPPFunctionGroup *fgroup = (*fi).second;
     CPPFunctionGroup::Instances::const_iterator ii;
     CPPFunctionGroup::Instances::const_iterator ii;
     for (ii = fgroup->_instances.begin();
     for (ii = fgroup->_instances.begin();
-         ii != fgroup->_instances.end();  
+         ii != fgroup->_instances.end();
          ++ii) {
          ++ii) {
       CPPInstance *inst = (*ii);
       CPPInstance *inst = (*ii);
       if ((inst->_storage_class & CPPInstance::SC_virtual) != 0) {
       if ((inst->_storage_class & CPPInstance::SC_virtual) != 0) {
@@ -566,7 +579,7 @@ is_equal(const CPPDeclaration *other) const {
   const CPPStructType *ot = ((CPPDeclaration *)other)->as_struct_type();
   const CPPStructType *ot = ((CPPDeclaration *)other)->as_struct_type();
   assert(ot != NULL);
   assert(ot != NULL);
 
 
-  return this == ot || 
+  return this == ot ||
     (get_fully_scoped_name() == ot->get_fully_scoped_name());
     (get_fully_scoped_name() == ot->get_fully_scoped_name());
   */
   */
 }
 }
@@ -589,7 +602,7 @@ is_less(const CPPDeclaration *other) const {
     return false;
     return false;
   }
   }
 
 
-  return 
+  return
     (get_fully_scoped_name() < ot->get_fully_scoped_name());
     (get_fully_scoped_name() < ot->get_fully_scoped_name());
   */
   */
 }
 }

+ 14 - 1
dtool/src/cppparser/cppStructType.h

@@ -2,6 +2,19 @@
 // Created by:  drose (19Oct99)
 // Created by:  drose (19Oct99)
 //
 //
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
+//
+// PANDA 3D SOFTWARE
+// Copyright (c) 2001, Disney Enterprises, Inc.  All rights reserved
+//
+// All use of this software is subject to the terms of the Panda 3d
+// Software license.  You should have received a copy of this license
+// along with this source code; you will also find a current copy of
+// the license at http://www.panda3d.org/license.txt .
+//
+// To contact the maintainers of this program write to
+// [email protected] .
+//
+////////////////////////////////////////////////////////////////////
 
 
 #ifndef CPPSTRUCTTYPE_H
 #ifndef CPPSTRUCTTYPE_H
 #define CPPSTRUCTTYPE_H
 #define CPPSTRUCTTYPE_H
@@ -58,7 +71,7 @@ public:
 
 
   CPPScope *_scope;
   CPPScope *_scope;
   bool _incomplete;
   bool _incomplete;
- 
+
   class Base {
   class Base {
   public:
   public:
     void output(ostream &out) const;
     void output(ostream &out) const;

+ 23 - 10
dtool/src/cppparser/cppTBDType.cxx

@@ -1,6 +1,19 @@
-// Filename: cppTBDType.C
+// Filename: cppTBDType.cxx
 // Created by:  drose (05Nov99)
 // Created by:  drose (05Nov99)
-// 
+//
+////////////////////////////////////////////////////////////////////
+//
+// PANDA 3D SOFTWARE
+// Copyright (c) 2001, Disney Enterprises, Inc.  All rights reserved
+//
+// All use of this software is subject to the terms of the Panda 3d
+// Software license.  You should have received a copy of this license
+// along with this source code; you will also find a current copy of
+// the license at http://www.panda3d.org/license.txt .
+//
+// To contact the maintainers of this program write to
+// [email protected] .
+//
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 
 
 
 
@@ -12,7 +25,7 @@
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 //     Function: CPPTBDType::Constructor
 //     Function: CPPTBDType::Constructor
 //       Access: Public
 //       Access: Public
-//  Description: 
+//  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 CPPTBDType::
 CPPTBDType::
 CPPTBDType(CPPIdentifier *ident) :
 CPPTBDType(CPPIdentifier *ident) :
@@ -91,12 +104,12 @@ get_fully_scoped_name() const {
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 //     Function: CPPTBDType::substitute_decl
 //     Function: CPPTBDType::substitute_decl
 //       Access: Public, Virtual
 //       Access: Public, Virtual
-//  Description: 
+//  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 CPPDeclaration *CPPTBDType::
 CPPDeclaration *CPPTBDType::
 substitute_decl(CPPDeclaration::SubstDecl &subst,
 substitute_decl(CPPDeclaration::SubstDecl &subst,
                 CPPScope *current_scope, CPPScope *global_scope) {
                 CPPScope *current_scope, CPPScope *global_scope) {
-  CPPDeclaration *top = 
+  CPPDeclaration *top =
     CPPDeclaration::substitute_decl(subst, current_scope, global_scope);
     CPPDeclaration::substitute_decl(subst, current_scope, global_scope);
   if (top != this) {
   if (top != this) {
     return top;
     return top;
@@ -138,7 +151,7 @@ substitute_decl(CPPDeclaration::SubstDecl &subst,
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 //     Function: CPPTBDType::output
 //     Function: CPPTBDType::output
 //       Access: Public, Virtual
 //       Access: Public, Virtual
-//  Description: 
+//  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 void CPPTBDType::
 void CPPTBDType::
 output(ostream &out, int, CPPScope *, bool) const {
 output(ostream &out, int, CPPScope *, bool) const {
@@ -148,7 +161,7 @@ output(ostream &out, int, CPPScope *, bool) const {
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 //     Function: CPPTBDType::get_subtype
 //     Function: CPPTBDType::get_subtype
 //       Access: Public, Virtual
 //       Access: Public, Virtual
-//  Description: 
+//  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 CPPDeclaration::SubType CPPTBDType::
 CPPDeclaration::SubType CPPTBDType::
 get_subtype() const {
 get_subtype() const {
@@ -158,7 +171,7 @@ get_subtype() const {
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 //     Function: CPPTBDType::as_tbd_type
 //     Function: CPPTBDType::as_tbd_type
 //       Access: Public, Virtual
 //       Access: Public, Virtual
-//  Description: 
+//  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 CPPTBDType *CPPTBDType::
 CPPTBDType *CPPTBDType::
 as_tbd_type() {
 as_tbd_type() {
@@ -176,7 +189,7 @@ bool CPPTBDType::
 is_equal(const CPPDeclaration *other) const {
 is_equal(const CPPDeclaration *other) const {
   const CPPTBDType *ot = ((CPPDeclaration *)other)->as_tbd_type();
   const CPPTBDType *ot = ((CPPDeclaration *)other)->as_tbd_type();
   assert(ot != NULL);
   assert(ot != NULL);
-  
+
   return (*_ident) == (*ot->_ident);
   return (*_ident) == (*ot->_ident);
 }
 }
 
 
@@ -192,6 +205,6 @@ bool CPPTBDType::
 is_less(const CPPDeclaration *other) const {
 is_less(const CPPDeclaration *other) const {
   const CPPTBDType *ot = ((CPPDeclaration *)other)->as_tbd_type();
   const CPPTBDType *ot = ((CPPDeclaration *)other)->as_tbd_type();
   assert(ot != NULL);
   assert(ot != NULL);
-  
+
   return (*_ident) < (*ot->_ident);
   return (*_ident) < (*ot->_ident);
 }
 }

+ 13 - 0
dtool/src/cppparser/cppTBDType.h

@@ -2,6 +2,19 @@
 // Created by:  drose (05Nov99)
 // Created by:  drose (05Nov99)
 //
 //
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
+//
+// PANDA 3D SOFTWARE
+// Copyright (c) 2001, Disney Enterprises, Inc.  All rights reserved
+//
+// All use of this software is subject to the terms of the Panda 3d
+// Software license.  You should have received a copy of this license
+// along with this source code; you will also find a current copy of
+// the license at http://www.panda3d.org/license.txt .
+//
+// To contact the maintainers of this program write to
+// [email protected] .
+//
+////////////////////////////////////////////////////////////////////
 
 
 #ifndef CPPTBDTYPE_H
 #ifndef CPPTBDTYPE_H
 #define CPPTBDTYPE_H
 #define CPPTBDTYPE_H

+ 26 - 13
dtool/src/cppparser/cppTemplateParameterList.cxx

@@ -1,6 +1,19 @@
-// Filename: cppTemplateParameterList.C
+// Filename: cppTemplateParameterList.cxx
 // Created by:  drose (28Oct99)
 // Created by:  drose (28Oct99)
-// 
+//
+////////////////////////////////////////////////////////////////////
+//
+// PANDA 3D SOFTWARE
+// Copyright (c) 2001, Disney Enterprises, Inc.  All rights reserved
+//
+// All use of this software is subject to the terms of the Panda 3d
+// Software license.  You should have received a copy of this license
+// along with this source code; you will also find a current copy of
+// the license at http://www.panda3d.org/license.txt .
+//
+// To contact the maintainers of this program write to
+// [email protected] .
+//
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 
 
 
 
@@ -12,7 +25,7 @@
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 //     Function: CPPTemplateParameterList::Constructor
 //     Function: CPPTemplateParameterList::Constructor
 //       Access: Public
 //       Access: Public
-//  Description: 
+//  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 CPPTemplateParameterList::
 CPPTemplateParameterList::
 CPPTemplateParameterList() {
 CPPTemplateParameterList() {
@@ -21,7 +34,7 @@ CPPTemplateParameterList() {
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 //     Function: CPPTemplateParameterList::Constructor
 //     Function: CPPTemplateParameterList::Constructor
 //       Access: Public
 //       Access: Public
-//  Description: 
+//  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 string CPPTemplateParameterList::
 string CPPTemplateParameterList::
 get_string() const {
 get_string() const {
@@ -49,7 +62,7 @@ build_subst_decl(const CPPTemplateParameterList &formal_params,
        ++pfi, ++pai) {
        ++pfi, ++pai) {
     CPPDeclaration *formal = *pfi;
     CPPDeclaration *formal = *pfi;
     CPPDeclaration *actual = *pai;
     CPPDeclaration *actual = *pai;
-    
+
     if (actual->as_type()) {
     if (actual->as_type()) {
       actual = actual->as_type()->resolve_type(current_scope, global_scope);
       actual = actual->as_type()->resolve_type(current_scope, global_scope);
     }
     }
@@ -66,7 +79,7 @@ build_subst_decl(const CPPTemplateParameterList &formal_params,
       // A value template parameter.  Its default is an expression.
       // A value template parameter.  Its default is an expression.
       CPPInstance *inst = decl->as_instance();
       CPPInstance *inst = decl->as_instance();
       if (inst->_initializer != NULL) {
       if (inst->_initializer != NULL) {
-        CPPDeclaration *decl = 
+        CPPDeclaration *decl =
           inst->_initializer->substitute_decl(subst, current_scope,
           inst->_initializer->substitute_decl(subst, current_scope,
                                               global_scope);
                                               global_scope);
         if (!(*decl == *inst)) {
         if (!(*decl == *inst)) {
@@ -123,7 +136,7 @@ bool CPPTemplateParameterList::
 is_tbd() const {
 is_tbd() const {
   for (int i = 0; i < (int)_parameters.size(); i++) {
   for (int i = 0; i < (int)_parameters.size(); i++) {
     CPPType *type = _parameters[i]->as_type();
     CPPType *type = _parameters[i]->as_type();
-    if (type != (CPPType *)NULL && 
+    if (type != (CPPType *)NULL &&
         (type->is_tbd() || type->as_class_template_parameter() != NULL)) {
         (type->is_tbd() || type->as_class_template_parameter() != NULL)) {
       return true;
       return true;
     }
     }
@@ -138,7 +151,7 @@ is_tbd() const {
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 //     Function: CPPTemplateParameterList::Equivalence Operator
 //     Function: CPPTemplateParameterList::Equivalence Operator
 //       Access: Public
 //       Access: Public
-//  Description: 
+//  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 bool CPPTemplateParameterList::
 bool CPPTemplateParameterList::
 operator == (const CPPTemplateParameterList &other) const {
 operator == (const CPPTemplateParameterList &other) const {
@@ -156,7 +169,7 @@ operator == (const CPPTemplateParameterList &other) const {
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 //     Function: CPPTemplateParameterList::Nonequivalence Operator
 //     Function: CPPTemplateParameterList::Nonequivalence Operator
 //       Access: Public
 //       Access: Public
-//  Description: 
+//  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 bool CPPTemplateParameterList::
 bool CPPTemplateParameterList::
 operator != (const CPPTemplateParameterList &other) const {
 operator != (const CPPTemplateParameterList &other) const {
@@ -166,7 +179,7 @@ operator != (const CPPTemplateParameterList &other) const {
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 //     Function: CPPTemplateParameterList::Ordering Operator
 //     Function: CPPTemplateParameterList::Ordering Operator
 //       Access: Public
 //       Access: Public
-//  Description: 
+//  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 bool CPPTemplateParameterList::
 bool CPPTemplateParameterList::
 operator < (const CPPTemplateParameterList &other) const {
 operator < (const CPPTemplateParameterList &other) const {
@@ -184,7 +197,7 @@ operator < (const CPPTemplateParameterList &other) const {
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 //     Function: CPPTemplateParameterList::substitute_decl
 //     Function: CPPTemplateParameterList::substitute_decl
 //       Access: Public
 //       Access: Public
-//  Description: 
+//  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 CPPTemplateParameterList *CPPTemplateParameterList::
 CPPTemplateParameterList *CPPTemplateParameterList::
 substitute_decl(CPPDeclaration::SubstDecl &subst,
 substitute_decl(CPPDeclaration::SubstDecl &subst,
@@ -193,7 +206,7 @@ substitute_decl(CPPDeclaration::SubstDecl &subst,
 
 
   bool anything_changed = false;
   bool anything_changed = false;
   for (int i = 0; i < (int)rep->_parameters.size(); i++) {
   for (int i = 0; i < (int)rep->_parameters.size(); i++) {
-    rep->_parameters[i] = 
+    rep->_parameters[i] =
       _parameters[i]->substitute_decl(subst, current_scope, global_scope);
       _parameters[i]->substitute_decl(subst, current_scope, global_scope);
     if (rep->_parameters[i] != _parameters[i]) {
     if (rep->_parameters[i] != _parameters[i]) {
       anything_changed = true;
       anything_changed = true;
@@ -211,7 +224,7 @@ substitute_decl(CPPDeclaration::SubstDecl &subst,
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 //     Function: CPPTemplateParameterList::output
 //     Function: CPPTemplateParameterList::output
 //       Access: Public
 //       Access: Public
-//  Description: 
+//  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 void CPPTemplateParameterList::
 void CPPTemplateParameterList::
 output(ostream &out, CPPScope *scope) const {
 output(ostream &out, CPPScope *scope) const {

+ 13 - 0
dtool/src/cppparser/cppTemplateParameterList.h

@@ -2,6 +2,19 @@
 // Created by:  drose (28Oct99)
 // Created by:  drose (28Oct99)
 //
 //
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
+//
+// PANDA 3D SOFTWARE
+// Copyright (c) 2001, Disney Enterprises, Inc.  All rights reserved
+//
+// All use of this software is subject to the terms of the Panda 3d
+// Software license.  You should have received a copy of this license
+// along with this source code; you will also find a current copy of
+// the license at http://www.panda3d.org/license.txt .
+//
+// To contact the maintainers of this program write to
+// [email protected] .
+//
+////////////////////////////////////////////////////////////////////
 
 
 #ifndef CPPTEMPLATEPARAMETERLIST_H
 #ifndef CPPTEMPLATEPARAMETERLIST_H
 #define CPPTEMPLATEPARAMETERLIST_H
 #define CPPTEMPLATEPARAMETERLIST_H

+ 27 - 14
dtool/src/cppparser/cppTemplateScope.cxx

@@ -1,6 +1,19 @@
-// Filename: cppTemplateScope.C
+// Filename: cppTemplateScope.cxx
 // Created by:  drose (28Oct99)
 // Created by:  drose (28Oct99)
-// 
+//
+////////////////////////////////////////////////////////////////////
+//
+// PANDA 3D SOFTWARE
+// Copyright (c) 2001, Disney Enterprises, Inc.  All rights reserved
+//
+// All use of this software is subject to the terms of the Panda 3d
+// Software license.  You should have received a copy of this license
+// along with this source code; you will also find a current copy of
+// the license at http://www.panda3d.org/license.txt .
+//
+// To contact the maintainers of this program write to
+// [email protected] .
+//
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 
 
 
 
@@ -13,7 +26,7 @@
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 //     Function: CPPTemplateScope::Constructor
 //     Function: CPPTemplateScope::Constructor
 //       Access: Public
 //       Access: Public
-//  Description: 
+//  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 CPPTemplateScope::
 CPPTemplateScope::
 CPPTemplateScope(CPPScope *parent_scope) :
 CPPTemplateScope(CPPScope *parent_scope) :
@@ -25,7 +38,7 @@ CPPTemplateScope(CPPScope *parent_scope) :
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 //     Function: CPPTemplateScope::add_declaration
 //     Function: CPPTemplateScope::add_declaration
 //       Access: Public, Virtual
 //       Access: Public, Virtual
-//  Description: 
+//  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 void CPPTemplateScope::
 void CPPTemplateScope::
 add_declaration(CPPDeclaration *decl, CPPScope *global_scope,
 add_declaration(CPPDeclaration *decl, CPPScope *global_scope,
@@ -39,7 +52,7 @@ add_declaration(CPPDeclaration *decl, CPPScope *global_scope,
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 //     Function: CPPTemplateScope::add_enum_value
 //     Function: CPPTemplateScope::add_enum_value
 //       Access: Public, Virtual
 //       Access: Public, Virtual
-//  Description: 
+//  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 void CPPTemplateScope::
 void CPPTemplateScope::
 add_enum_value(CPPInstance *inst) {
 add_enum_value(CPPInstance *inst) {
@@ -51,7 +64,7 @@ add_enum_value(CPPInstance *inst) {
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 //     Function: CPPTemplateScope::define_extension_type
 //     Function: CPPTemplateScope::define_extension_type
 //       Access: Public, Virtual
 //       Access: Public, Virtual
-//  Description: 
+//  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 void CPPTemplateScope::
 void CPPTemplateScope::
 define_extension_type(CPPExtensionType *type) {
 define_extension_type(CPPExtensionType *type) {
@@ -63,7 +76,7 @@ define_extension_type(CPPExtensionType *type) {
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 //     Function: CPPTemplateScope::define_namespace
 //     Function: CPPTemplateScope::define_namespace
 //       Access: Public, Virtual
 //       Access: Public, Virtual
-//  Description: 
+//  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 void CPPTemplateScope::
 void CPPTemplateScope::
 define_namespace(CPPNamespace *scope) {
 define_namespace(CPPNamespace *scope) {
@@ -74,7 +87,7 @@ define_namespace(CPPNamespace *scope) {
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 //     Function: CPPTemplateScope::add_using
 //     Function: CPPTemplateScope::add_using
 //       Access: Public, Virtual
 //       Access: Public, Virtual
-//  Description: 
+//  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 void CPPTemplateScope::
 void CPPTemplateScope::
 add_using(CPPUsing *using_decl, CPPScope *global_scope,
 add_using(CPPUsing *using_decl, CPPScope *global_scope,
@@ -86,7 +99,7 @@ add_using(CPPUsing *using_decl, CPPScope *global_scope,
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 //     Function: CPPTemplateScope::add_template_parameter
 //     Function: CPPTemplateScope::add_template_parameter
 //       Access: Public
 //       Access: Public
-//  Description: 
+//  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 void CPPTemplateScope::
 void CPPTemplateScope::
 add_template_parameter(CPPDeclaration *param) {
 add_template_parameter(CPPDeclaration *param) {
@@ -123,7 +136,7 @@ is_fully_specified() const {
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 //     Function: CPPTemplateScope::get_simple_name
 //     Function: CPPTemplateScope::get_simple_name
 //       Access: Public, Virtual
 //       Access: Public, Virtual
-//  Description: 
+//  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 string CPPTemplateScope::
 string CPPTemplateScope::
 get_simple_name() const {
 get_simple_name() const {
@@ -134,7 +147,7 @@ get_simple_name() const {
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 //     Function: CPPTemplateScope::get_local_name
 //     Function: CPPTemplateScope::get_local_name
 //       Access: Public, Virtual
 //       Access: Public, Virtual
-//  Description: 
+//  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 string CPPTemplateScope::
 string CPPTemplateScope::
 get_local_name(CPPScope *scope) const {
 get_local_name(CPPScope *scope) const {
@@ -145,7 +158,7 @@ get_local_name(CPPScope *scope) const {
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 //     Function: CPPTemplateScope::get_fully_scoped_name
 //     Function: CPPTemplateScope::get_fully_scoped_name
 //       Access: Public, Virtual
 //       Access: Public, Virtual
-//  Description: 
+//  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 string CPPTemplateScope::
 string CPPTemplateScope::
 get_fully_scoped_name() const {
 get_fully_scoped_name() const {
@@ -156,7 +169,7 @@ get_fully_scoped_name() const {
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 //     Function: CPPTemplateScope::output
 //     Function: CPPTemplateScope::output
 //       Access: Public, Virtual
 //       Access: Public, Virtual
-//  Description: 
+//  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 void CPPTemplateScope::
 void CPPTemplateScope::
 output(ostream &out, CPPScope *scope) const {
 output(ostream &out, CPPScope *scope) const {
@@ -169,7 +182,7 @@ output(ostream &out, CPPScope *scope) const {
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 //     Function: CPPTemplateScope::as_template_scope
 //     Function: CPPTemplateScope::as_template_scope
 //       Access: Public, Virtual
 //       Access: Public, Virtual
-//  Description: 
+//  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 CPPTemplateScope *CPPTemplateScope::
 CPPTemplateScope *CPPTemplateScope::
 as_template_scope() {
 as_template_scope() {

+ 14 - 1
dtool/src/cppparser/cppTemplateScope.h

@@ -2,6 +2,19 @@
 // Created by:  drose (28Oct99)
 // Created by:  drose (28Oct99)
 //
 //
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
+//
+// PANDA 3D SOFTWARE
+// Copyright (c) 2001, Disney Enterprises, Inc.  All rights reserved
+//
+// All use of this software is subject to the terms of the Panda 3d
+// Software license.  You should have received a copy of this license
+// along with this source code; you will also find a current copy of
+// the license at http://www.panda3d.org/license.txt .
+//
+// To contact the maintainers of this program write to
+// [email protected] .
+//
+////////////////////////////////////////////////////////////////////
 
 
 #ifndef CPPTEMPLATESCOPE_H
 #ifndef CPPTEMPLATESCOPE_H
 #define CPPTEMPLATESCOPE_H
 #define CPPTEMPLATESCOPE_H
@@ -23,7 +36,7 @@ public:
   CPPTemplateScope(CPPScope *parent_scope);
   CPPTemplateScope(CPPScope *parent_scope);
 
 
   void add_template_parameter(CPPDeclaration *param);
   void add_template_parameter(CPPDeclaration *param);
- 
+
   virtual void add_declaration(CPPDeclaration *decl, CPPScope *global_scope,
   virtual void add_declaration(CPPDeclaration *decl, CPPScope *global_scope,
                                CPPPreprocessor *preprocessor,
                                CPPPreprocessor *preprocessor,
                                const cppyyltype &pos);
                                const cppyyltype &pos);

+ 21 - 8
dtool/src/cppparser/cppToken.cxx

@@ -1,6 +1,19 @@
-// Filename: cppToken.C
+// Filename: cppToken.cxx
 // Created by:  drose (22Oct99)
 // Created by:  drose (22Oct99)
-// 
+//
+////////////////////////////////////////////////////////////////////
+//
+// PANDA 3D SOFTWARE
+// Copyright (c) 2001, Disney Enterprises, Inc.  All rights reserved
+//
+// All use of this software is subject to the terms of the Panda 3d
+// Software license.  You should have received a copy of this license
+// along with this source code; you will also find a current copy of
+// the license at http://www.panda3d.org/license.txt .
+//
+// To contact the maintainers of this program write to
+// [email protected] .
+//
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 
 
 
 
@@ -13,13 +26,13 @@
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 //     Function: CPPToken::Constructor
 //     Function: CPPToken::Constructor
 //       Access: Public
 //       Access: Public
-//  Description: 
+//  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 CPPToken::
 CPPToken::
 CPPToken(int token, int line_number, int col_number,
 CPPToken(int token, int line_number, int col_number,
          const CPPFile &file, const string &str,
          const CPPFile &file, const string &str,
          const YYSTYPE &lval) :
          const YYSTYPE &lval) :
-  _token(token), _lval(lval) 
+  _token(token), _lval(lval)
 {
 {
   _lval.str = str;
   _lval.str = str;
   _lloc.timestamp = 0;
   _lloc.timestamp = 0;
@@ -34,11 +47,11 @@ CPPToken(int token, int line_number, int col_number,
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 //     Function: CPPToken::Copy Constructor
 //     Function: CPPToken::Copy Constructor
 //       Access: Public
 //       Access: Public
-//  Description: 
+//  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 CPPToken::
 CPPToken::
 CPPToken(const CPPToken &copy) :
 CPPToken(const CPPToken &copy) :
-  _token(copy._token), 
+  _token(copy._token),
   _lloc(copy._lloc)
   _lloc(copy._lloc)
 {
 {
   _lval.str = copy._lval.str;
   _lval.str = copy._lval.str;
@@ -48,7 +61,7 @@ CPPToken(const CPPToken &copy) :
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 //     Function: CPPToken::Copy Assignment Operator
 //     Function: CPPToken::Copy Assignment Operator
 //       Access: Public
 //       Access: Public
-//  Description: 
+//  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 void CPPToken::
 void CPPToken::
 operator = (const CPPToken &copy) {
 operator = (const CPPToken &copy) {
@@ -83,7 +96,7 @@ is_eof() const {
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 //     Function: CPPToken::output
 //     Function: CPPToken::output
 //       Access: Public
 //       Access: Public
-//  Description: 
+//  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 void CPPToken::
 void CPPToken::
 output(ostream &out) const {
 output(ostream &out) const {

+ 13 - 0
dtool/src/cppparser/cppToken.h

@@ -2,6 +2,19 @@
 // Created by:  drose (22Oct99)
 // Created by:  drose (22Oct99)
 //
 //
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
+//
+// PANDA 3D SOFTWARE
+// Copyright (c) 2001, Disney Enterprises, Inc.  All rights reserved
+//
+// All use of this software is subject to the terms of the Panda 3d
+// Software license.  You should have received a copy of this license
+// along with this source code; you will also find a current copy of
+// the license at http://www.panda3d.org/license.txt .
+//
+// To contact the maintainers of this program write to
+// [email protected] .
+//
+////////////////////////////////////////////////////////////////////
 
 
 #ifndef CPPTOKEN_H
 #ifndef CPPTOKEN_H
 #define CPPTOKEN_H
 #define CPPTOKEN_H

+ 17 - 4
dtool/src/cppparser/cppType.cxx

@@ -1,6 +1,19 @@
-// Filename: cppType.C
+// Filename: cppType.cxx
 // Created by:  drose (19Oct99)
 // Created by:  drose (19Oct99)
-// 
+//
+////////////////////////////////////////////////////////////////////
+//
+// PANDA 3D SOFTWARE
+// Copyright (c) 2001, Disney Enterprises, Inc.  All rights reserved
+//
+// All use of this software is subject to the terms of the Panda 3d
+// Software license.  You should have received a copy of this license
+// along with this source code; you will also find a current copy of
+// the license at http://www.panda3d.org/license.txt .
+//
+// To contact the maintainers of this program write to
+// [email protected] .
+//
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 
 
 
 
@@ -18,7 +31,7 @@ operator () (CPPType *a, CPPType *b) const {
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 //     Function: CPPType::Constructor
 //     Function: CPPType::Constructor
 //       Access: Public
 //       Access: Public
-//  Description: 
+//  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 CPPType::
 CPPType::
 CPPType(const CPPFile &file) :
 CPPType(const CPPFile &file) :
@@ -202,7 +215,7 @@ output_instance(ostream &out, int indent_level, CPPScope *scope,
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 //     Function: CPPType::as_type
 //     Function: CPPType::as_type
 //       Access: Public, Virtual
 //       Access: Public, Virtual
-//  Description: 
+//  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 CPPType *CPPType::
 CPPType *CPPType::
 as_type() {
 as_type() {

+ 14 - 1
dtool/src/cppparser/cppType.h

@@ -2,6 +2,19 @@
 // Created by:  drose (19Oct99)
 // Created by:  drose (19Oct99)
 //
 //
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
+//
+// PANDA 3D SOFTWARE
+// Copyright (c) 2001, Disney Enterprises, Inc.  All rights reserved
+//
+// All use of this software is subject to the terms of the Panda 3d
+// Software license.  You should have received a copy of this license
+// along with this source code; you will also find a current copy of
+// the license at http://www.panda3d.org/license.txt .
+//
+// To contact the maintainers of this program write to
+// [email protected] .
+//
+////////////////////////////////////////////////////////////////////
 
 
 #ifndef CPPTYPE_H
 #ifndef CPPTYPE_H
 #define CPPTYPE_H
 #define CPPTYPE_H
@@ -51,7 +64,7 @@ public:
   virtual bool is_incomplete() const;
   virtual bool is_incomplete() const;
   virtual bool is_equivalent(const CPPType &other) const;
   virtual bool is_equivalent(const CPPType &other) const;
 
 
-  void output_instance(ostream &out, const string &name, 
+  void output_instance(ostream &out, const string &name,
                        CPPScope *scope) const;
                        CPPScope *scope) const;
   virtual void output_instance(ostream &out, int indent_level,
   virtual void output_instance(ostream &out, int indent_level,
                                CPPScope *scope,
                                CPPScope *scope,

+ 20 - 7
dtool/src/cppparser/cppTypeDeclaration.cxx

@@ -1,6 +1,19 @@
-// Filename: cppTypeDeclaration.C
+// Filename: cppTypeDeclaration.cxx
 // Created by:  drose (14Aug00)
 // Created by:  drose (14Aug00)
-// 
+//
+////////////////////////////////////////////////////////////////////
+//
+// PANDA 3D SOFTWARE
+// Copyright (c) 2001, Disney Enterprises, Inc.  All rights reserved
+//
+// All use of this software is subject to the terms of the Panda 3d
+// Software license.  You should have received a copy of this license
+// along with this source code; you will also find a current copy of
+// the license at http://www.panda3d.org/license.txt .
+//
+// To contact the maintainers of this program write to
+// [email protected] .
+//
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 
 
 
 
@@ -25,12 +38,12 @@ CPPTypeDeclaration(CPPType *type) :
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 //     Function: CPPTypeDeclaration::substitute_decl
 //     Function: CPPTypeDeclaration::substitute_decl
 //       Access: Public, Virtual
 //       Access: Public, Virtual
-//  Description: 
+//  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 CPPDeclaration *CPPTypeDeclaration::
 CPPDeclaration *CPPTypeDeclaration::
 substitute_decl(CPPDeclaration::SubstDecl &subst,
 substitute_decl(CPPDeclaration::SubstDecl &subst,
                 CPPScope *current_scope, CPPScope *global_scope) {
                 CPPScope *current_scope, CPPScope *global_scope) {
-  CPPDeclaration *decl = 
+  CPPDeclaration *decl =
     CPPInstance::substitute_decl(subst, current_scope, global_scope);
     CPPInstance::substitute_decl(subst, current_scope, global_scope);
   assert(decl != NULL);
   assert(decl != NULL);
   if (decl->as_type_declaration()) {
   if (decl->as_type_declaration()) {
@@ -43,7 +56,7 @@ substitute_decl(CPPDeclaration::SubstDecl &subst,
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 //     Function: CPPTypeDeclaration::output
 //     Function: CPPTypeDeclaration::output
 //       Access: Public, Virtual
 //       Access: Public, Virtual
-//  Description: 
+//  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 void CPPTypeDeclaration::
 void CPPTypeDeclaration::
 output(ostream &out, int indent_level, CPPScope *scope, bool) const {
 output(ostream &out, int indent_level, CPPScope *scope, bool) const {
@@ -53,7 +66,7 @@ output(ostream &out, int indent_level, CPPScope *scope, bool) const {
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 //     Function: CPPTypeDeclaration::get_subtype
 //     Function: CPPTypeDeclaration::get_subtype
 //       Access: Public, Virtual
 //       Access: Public, Virtual
-//  Description: 
+//  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 CPPDeclaration::SubType CPPTypeDeclaration::
 CPPDeclaration::SubType CPPTypeDeclaration::
 get_subtype() const {
 get_subtype() const {
@@ -63,7 +76,7 @@ get_subtype() const {
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 //     Function: CPPTypeDeclaration::as_type_declaration
 //     Function: CPPTypeDeclaration::as_type_declaration
 //       Access: Public, Virtual
 //       Access: Public, Virtual
-//  Description: 
+//  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 CPPTypeDeclaration *CPPTypeDeclaration::
 CPPTypeDeclaration *CPPTypeDeclaration::
 as_type_declaration() {
 as_type_declaration() {

+ 14 - 1
dtool/src/cppparser/cppTypeDeclaration.h

@@ -1,6 +1,19 @@
 // Filename: cppTypeDeclaration.h
 // Filename: cppTypeDeclaration.h
 // Created by:  drose (14Aug00)
 // Created by:  drose (14Aug00)
-// 
+//
+////////////////////////////////////////////////////////////////////
+//
+// PANDA 3D SOFTWARE
+// Copyright (c) 2001, Disney Enterprises, Inc.  All rights reserved
+//
+// All use of this software is subject to the terms of the Panda 3d
+// Software license.  You should have received a copy of this license
+// along with this source code; you will also find a current copy of
+// the license at http://www.panda3d.org/license.txt .
+//
+// To contact the maintainers of this program write to
+// [email protected] .
+//
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 
 
 #ifndef CPPTYPEDECLARATION_H
 #ifndef CPPTYPEDECLARATION_H

+ 20 - 7
dtool/src/cppparser/cppTypeParser.cxx

@@ -1,6 +1,19 @@
-// Filename: cppTypeParser.C
+// Filename: cppTypeParser.cxx
 // Created by:  drose (14Dec99)
 // Created by:  drose (14Dec99)
-// 
+//
+////////////////////////////////////////////////////////////////////
+//
+// PANDA 3D SOFTWARE
+// Copyright (c) 2001, Disney Enterprises, Inc.  All rights reserved
+//
+// All use of this software is subject to the terms of the Panda 3d
+// Software license.  You should have received a copy of this license
+// along with this source code; you will also find a current copy of
+// the license at http://www.panda3d.org/license.txt .
+//
+// To contact the maintainers of this program write to
+// [email protected] .
+//
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 
 
 
 
@@ -10,7 +23,7 @@
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 //     Function: CPPTypeParser::Constructor
 //     Function: CPPTypeParser::Constructor
 //       Access: Public
 //       Access: Public
-//  Description: 
+//  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 CPPTypeParser::
 CPPTypeParser::
 CPPTypeParser(CPPScope *current_scope, CPPScope *global_scope) :
 CPPTypeParser(CPPScope *current_scope, CPPScope *global_scope) :
@@ -23,7 +36,7 @@ CPPTypeParser(CPPScope *current_scope, CPPScope *global_scope) :
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 //     Function: CPPTypeParser::Destructor
 //     Function: CPPTypeParser::Destructor
 //       Access: Public
 //       Access: Public
-//  Description: 
+//  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 CPPTypeParser::
 CPPTypeParser::
 ~CPPTypeParser() {
 ~CPPTypeParser() {
@@ -32,7 +45,7 @@ CPPTypeParser::
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 //     Function: CPPTypeParser::parse_type
 //     Function: CPPTypeParser::parse_type
 //       Access: Public
 //       Access: Public
-//  Description: 
+//  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 bool CPPTypeParser::
 bool CPPTypeParser::
 parse_type(const string &type) {
 parse_type(const string &type) {
@@ -49,7 +62,7 @@ parse_type(const string &type) {
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 //     Function: CPPTypeParser::parse_type
 //     Function: CPPTypeParser::parse_type
 //       Access: Public
 //       Access: Public
-//  Description: 
+//  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 bool CPPTypeParser::
 bool CPPTypeParser::
 parse_type(const string &type, const CPPPreprocessor &filepos) {
 parse_type(const string &type, const CPPPreprocessor &filepos) {
@@ -68,7 +81,7 @@ parse_type(const string &type, const CPPPreprocessor &filepos) {
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 //     Function: CPPTypeParser::output
 //     Function: CPPTypeParser::output
 //       Access: Public
 //       Access: Public
-//  Description: 
+//  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 void CPPTypeParser::
 void CPPTypeParser::
 output(ostream &out) const {
 output(ostream &out) const {

+ 14 - 1
dtool/src/cppparser/cppTypeParser.h

@@ -2,6 +2,19 @@
 // Created by:  drose (14Dec99)
 // Created by:  drose (14Dec99)
 //
 //
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
+//
+// PANDA 3D SOFTWARE
+// Copyright (c) 2001, Disney Enterprises, Inc.  All rights reserved
+//
+// All use of this software is subject to the terms of the Panda 3d
+// Software license.  You should have received a copy of this license
+// along with this source code; you will also find a current copy of
+// the license at http://www.panda3d.org/license.txt .
+//
+// To contact the maintainers of this program write to
+// [email protected] .
+//
+////////////////////////////////////////////////////////////////////
 
 
 #ifndef CPPTYPEPARSER_H
 #ifndef CPPTYPEPARSER_H
 #define CPPTYPEPARSER_H
 #define CPPTYPEPARSER_H
@@ -40,4 +53,4 @@ operator << (ostream &out, const CPPTypeParser &ep) {
 
 
 #endif
 #endif
 
 
- 
+

+ 30 - 17
dtool/src/cppparser/cppTypeProxy.cxx

@@ -1,6 +1,19 @@
-// Filename: cppTypeProxy.C
+// Filename: cppTypeProxy.cxx
 // Created by:  drose (07Dec99)
 // Created by:  drose (07Dec99)
-// 
+//
+////////////////////////////////////////////////////////////////////
+//
+// PANDA 3D SOFTWARE
+// Copyright (c) 2001, Disney Enterprises, Inc.  All rights reserved
+//
+// All use of this software is subject to the terms of the Panda 3d
+// Software license.  You should have received a copy of this license
+// along with this source code; you will also find a current copy of
+// the license at http://www.panda3d.org/license.txt .
+//
+// To contact the maintainers of this program write to
+// [email protected] .
+//
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 
 
 
 
@@ -10,7 +23,7 @@
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 //     Function: CPPTypeProxy::Constructor
 //     Function: CPPTypeProxy::Constructor
 //       Access: Public
 //       Access: Public
-//  Description: 
+//  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 CPPTypeProxy::
 CPPTypeProxy::
 CPPTypeProxy() :
 CPPTypeProxy() :
@@ -183,7 +196,7 @@ output_instance(ostream &out, int indent_level, CPPScope *scope,
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 //     Function: CPPTypeProxy::output
 //     Function: CPPTypeProxy::output
 //       Access: Public, Virtual
 //       Access: Public, Virtual
-//  Description: 
+//  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 void CPPTypeProxy::
 void CPPTypeProxy::
 output(ostream &out, int indent_level, CPPScope *scope, bool complete) const {
 output(ostream &out, int indent_level, CPPScope *scope, bool complete) const {
@@ -198,7 +211,7 @@ output(ostream &out, int indent_level, CPPScope *scope, bool complete) const {
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 //     Function: CPPTypeProxy::get_subtype
 //     Function: CPPTypeProxy::get_subtype
 //       Access: Public, Virtual
 //       Access: Public, Virtual
-//  Description: 
+//  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 CPPDeclaration::SubType CPPTypeProxy::
 CPPDeclaration::SubType CPPTypeProxy::
 get_subtype() const {
 get_subtype() const {
@@ -208,7 +221,7 @@ get_subtype() const {
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 //     Function: CPPTypeProxy::as_type
 //     Function: CPPTypeProxy::as_type
 //       Access: Public, Virtual
 //       Access: Public, Virtual
-//  Description: 
+//  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 CPPType *CPPTypeProxy::
 CPPType *CPPTypeProxy::
 as_type() {
 as_type() {
@@ -221,7 +234,7 @@ as_type() {
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 //     Function: CPPTypeProxy::as_simple_type
 //     Function: CPPTypeProxy::as_simple_type
 //       Access: Public, Virtual
 //       Access: Public, Virtual
-//  Description: 
+//  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 CPPSimpleType *CPPTypeProxy::
 CPPSimpleType *CPPTypeProxy::
 as_simple_type() {
 as_simple_type() {
@@ -234,7 +247,7 @@ as_simple_type() {
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 //     Function: CPPTypeProxy::as_pointer_type
 //     Function: CPPTypeProxy::as_pointer_type
 //       Access: Public, Virtual
 //       Access: Public, Virtual
-//  Description: 
+//  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 CPPPointerType *CPPTypeProxy::
 CPPPointerType *CPPTypeProxy::
 as_pointer_type() {
 as_pointer_type() {
@@ -247,7 +260,7 @@ as_pointer_type() {
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 //     Function: CPPTypeProxy::as_reference_type
 //     Function: CPPTypeProxy::as_reference_type
 //       Access: Public, Virtual
 //       Access: Public, Virtual
-//  Description: 
+//  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 CPPReferenceType *CPPTypeProxy::
 CPPReferenceType *CPPTypeProxy::
 as_reference_type() {
 as_reference_type() {
@@ -260,7 +273,7 @@ as_reference_type() {
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 //     Function: CPPTypeProxy::as_array_type
 //     Function: CPPTypeProxy::as_array_type
 //       Access: Public, Virtual
 //       Access: Public, Virtual
-//  Description: 
+//  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 CPPArrayType *CPPTypeProxy::
 CPPArrayType *CPPTypeProxy::
 as_array_type() {
 as_array_type() {
@@ -273,7 +286,7 @@ as_array_type() {
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 //     Function: CPPTypeProxy::as_const_type
 //     Function: CPPTypeProxy::as_const_type
 //       Access: Public, Virtual
 //       Access: Public, Virtual
-//  Description: 
+//  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 CPPConstType *CPPTypeProxy::
 CPPConstType *CPPTypeProxy::
 as_const_type() {
 as_const_type() {
@@ -286,7 +299,7 @@ as_const_type() {
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 //     Function: CPPTypeProxy::as_function_type
 //     Function: CPPTypeProxy::as_function_type
 //       Access: Public, Virtual
 //       Access: Public, Virtual
-//  Description: 
+//  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 CPPFunctionType *CPPTypeProxy::
 CPPFunctionType *CPPTypeProxy::
 as_function_type() {
 as_function_type() {
@@ -299,7 +312,7 @@ as_function_type() {
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 //     Function: CPPTypeProxy::as_extension_type
 //     Function: CPPTypeProxy::as_extension_type
 //       Access: Public, Virtual
 //       Access: Public, Virtual
-//  Description: 
+//  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 CPPExtensionType *CPPTypeProxy::
 CPPExtensionType *CPPTypeProxy::
 as_extension_type() {
 as_extension_type() {
@@ -312,7 +325,7 @@ as_extension_type() {
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 //     Function: CPPTypeProxy::as_struct_type
 //     Function: CPPTypeProxy::as_struct_type
 //       Access: Public, Virtual
 //       Access: Public, Virtual
-//  Description: 
+//  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 CPPStructType *CPPTypeProxy::
 CPPStructType *CPPTypeProxy::
 as_struct_type() {
 as_struct_type() {
@@ -325,7 +338,7 @@ as_struct_type() {
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 //     Function: CPPTypeProxy::as_enum_type
 //     Function: CPPTypeProxy::as_enum_type
 //       Access: Public, Virtual
 //       Access: Public, Virtual
-//  Description: 
+//  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 CPPEnumType *CPPTypeProxy::
 CPPEnumType *CPPTypeProxy::
 as_enum_type() {
 as_enum_type() {
@@ -338,7 +351,7 @@ as_enum_type() {
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 //     Function: CPPTypeProxy::as_tbd_type
 //     Function: CPPTypeProxy::as_tbd_type
 //       Access: Public, Virtual
 //       Access: Public, Virtual
-//  Description: 
+//  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 CPPTBDType *CPPTypeProxy::
 CPPTBDType *CPPTypeProxy::
 as_tbd_type() {
 as_tbd_type() {
@@ -351,7 +364,7 @@ as_tbd_type() {
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 //     Function: CPPTypeProxy::as_type_proxy
 //     Function: CPPTypeProxy::as_type_proxy
 //       Access: Public, Virtual
 //       Access: Public, Virtual
-//  Description: 
+//  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 CPPTypeProxy *CPPTypeProxy::
 CPPTypeProxy *CPPTypeProxy::
 as_type_proxy() {
 as_type_proxy() {

+ 13 - 0
dtool/src/cppparser/cppTypeProxy.h

@@ -2,6 +2,19 @@
 // Created by:  drose (07Dec99)
 // Created by:  drose (07Dec99)
 //
 //
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
+//
+// PANDA 3D SOFTWARE
+// Copyright (c) 2001, Disney Enterprises, Inc.  All rights reserved
+//
+// All use of this software is subject to the terms of the Panda 3d
+// Software license.  You should have received a copy of this license
+// along with this source code; you will also find a current copy of
+// the license at http://www.panda3d.org/license.txt .
+//
+// To contact the maintainers of this program write to
+// [email protected] .
+//
+////////////////////////////////////////////////////////////////////
 
 
 #ifndef CPPTYPEPROXY_H
 #ifndef CPPTYPEPROXY_H
 #define CPPTYPEPROXY_H
 #define CPPTYPEPROXY_H

+ 21 - 8
dtool/src/cppparser/cppTypedef.cxx

@@ -1,6 +1,19 @@
-// Filename: cppTypedef.C
+// Filename: cppTypedef.cxx
 // Created by:  drose (19Oct99)
 // Created by:  drose (19Oct99)
-// 
+//
+////////////////////////////////////////////////////////////////////
+//
+// PANDA 3D SOFTWARE
+// Copyright (c) 2001, Disney Enterprises, Inc.  All rights reserved
+//
+// All use of this software is subject to the terms of the Panda 3d
+// Software license.  You should have received a copy of this license
+// along with this source code; you will also find a current copy of
+// the license at http://www.panda3d.org/license.txt .
+//
+// To contact the maintainers of this program write to
+// [email protected] .
+//
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 
 
 
 
@@ -19,7 +32,7 @@
 //               typedef.
 //               typedef.
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 CPPTypedef::
 CPPTypedef::
-CPPTypedef(CPPInstance *inst, bool global) : CPPInstance(*inst) 
+CPPTypedef(CPPInstance *inst, bool global) : CPPInstance(*inst)
 {
 {
   // Actually, we'll avoid deleting this for now.  It causes problems
   // Actually, we'll avoid deleting this for now.  It causes problems
   // for some reason to be determined later.
   // for some reason to be determined later.
@@ -35,12 +48,12 @@ CPPTypedef(CPPInstance *inst, bool global) : CPPInstance(*inst)
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 //     Function: CPPTypedef::substitute_decl
 //     Function: CPPTypedef::substitute_decl
 //       Access: Public, Virtual
 //       Access: Public, Virtual
-//  Description: 
+//  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 CPPDeclaration *CPPTypedef::
 CPPDeclaration *CPPTypedef::
 substitute_decl(CPPDeclaration::SubstDecl &subst,
 substitute_decl(CPPDeclaration::SubstDecl &subst,
                 CPPScope *current_scope, CPPScope *global_scope) {
                 CPPScope *current_scope, CPPScope *global_scope) {
-  CPPDeclaration *decl = 
+  CPPDeclaration *decl =
     CPPInstance::substitute_decl(subst, current_scope, global_scope);
     CPPInstance::substitute_decl(subst, current_scope, global_scope);
   assert(decl != NULL);
   assert(decl != NULL);
   if (decl->as_typedef()) {
   if (decl->as_typedef()) {
@@ -53,7 +66,7 @@ substitute_decl(CPPDeclaration::SubstDecl &subst,
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 //     Function: CPPTypedef::output
 //     Function: CPPTypedef::output
 //       Access: Public, Virtual
 //       Access: Public, Virtual
-//  Description: 
+//  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 void CPPTypedef::
 void CPPTypedef::
 output(ostream &out, int indent_level, CPPScope *scope, bool) const {
 output(ostream &out, int indent_level, CPPScope *scope, bool) const {
@@ -64,7 +77,7 @@ output(ostream &out, int indent_level, CPPScope *scope, bool) const {
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 //     Function: CPPTypedef::get_subtype
 //     Function: CPPTypedef::get_subtype
 //       Access: Public, Virtual
 //       Access: Public, Virtual
-//  Description: 
+//  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 CPPDeclaration::SubType CPPTypedef::
 CPPDeclaration::SubType CPPTypedef::
 get_subtype() const {
 get_subtype() const {
@@ -74,7 +87,7 @@ get_subtype() const {
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 //     Function: CPPTypedef::as_typedef
 //     Function: CPPTypedef::as_typedef
 //       Access: Public, Virtual
 //       Access: Public, Virtual
-//  Description: 
+//  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 CPPTypedef *CPPTypedef::
 CPPTypedef *CPPTypedef::
 as_typedef() {
 as_typedef() {

+ 13 - 0
dtool/src/cppparser/cppTypedef.h

@@ -2,6 +2,19 @@
 // Created by:  drose (19Oct99)
 // Created by:  drose (19Oct99)
 //
 //
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
+//
+// PANDA 3D SOFTWARE
+// Copyright (c) 2001, Disney Enterprises, Inc.  All rights reserved
+//
+// All use of this software is subject to the terms of the Panda 3d
+// Software license.  You should have received a copy of this license
+// along with this source code; you will also find a current copy of
+// the license at http://www.panda3d.org/license.txt .
+//
+// To contact the maintainers of this program write to
+// [email protected] .
+//
+////////////////////////////////////////////////////////////////////
 
 
 #ifndef CPPTYPEDEF_H
 #ifndef CPPTYPEDEF_H
 #define CPPTYPEDEF_H
 #define CPPTYPEDEF_H

+ 19 - 6
dtool/src/cppparser/cppUsing.cxx

@@ -1,6 +1,19 @@
-// Filename: cppUsing.C
+// Filename: cppUsing.cxx
 // Created by:  drose (16Nov99)
 // Created by:  drose (16Nov99)
-// 
+//
+////////////////////////////////////////////////////////////////////
+//
+// PANDA 3D SOFTWARE
+// Copyright (c) 2001, Disney Enterprises, Inc.  All rights reserved
+//
+// All use of this software is subject to the terms of the Panda 3d
+// Software license.  You should have received a copy of this license
+// along with this source code; you will also find a current copy of
+// the license at http://www.panda3d.org/license.txt .
+//
+// To contact the maintainers of this program write to
+// [email protected] .
+//
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 
 
 
 
@@ -10,7 +23,7 @@
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 //     Function: CPPUsing::Constructor
 //     Function: CPPUsing::Constructor
 //       Access: Public
 //       Access: Public
-//  Description: 
+//  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 CPPUsing::
 CPPUsing::
 CPPUsing(CPPIdentifier *ident, bool full_namespace, const CPPFile &file) :
 CPPUsing(CPPIdentifier *ident, bool full_namespace, const CPPFile &file) :
@@ -22,7 +35,7 @@ CPPUsing(CPPIdentifier *ident, bool full_namespace, const CPPFile &file) :
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 //     Function: CPPUsing::output
 //     Function: CPPUsing::output
 //       Access: Public, Virtual
 //       Access: Public, Virtual
-//  Description: 
+//  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 void CPPUsing::
 void CPPUsing::
 output(ostream &out, int, CPPScope *, bool) const {
 output(ostream &out, int, CPPScope *, bool) const {
@@ -36,7 +49,7 @@ output(ostream &out, int, CPPScope *, bool) const {
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 //     Function: CPPUsing::get_subtype
 //     Function: CPPUsing::get_subtype
 //       Access: Public, Virtual
 //       Access: Public, Virtual
-//  Description: 
+//  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 CPPDeclaration::SubType CPPUsing::
 CPPDeclaration::SubType CPPUsing::
 get_subtype() const {
 get_subtype() const {
@@ -46,7 +59,7 @@ get_subtype() const {
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 //     Function: CPPUsing::as_using
 //     Function: CPPUsing::as_using
 //       Access: Public, Virtual
 //       Access: Public, Virtual
-//  Description: 
+//  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 CPPUsing *CPPUsing::
 CPPUsing *CPPUsing::
 as_using() {
 as_using() {

+ 13 - 0
dtool/src/cppparser/cppUsing.h

@@ -2,6 +2,19 @@
 // Created by:  drose (16Nov99)
 // Created by:  drose (16Nov99)
 //
 //
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
+//
+// PANDA 3D SOFTWARE
+// Copyright (c) 2001, Disney Enterprises, Inc.  All rights reserved
+//
+// All use of this software is subject to the terms of the Panda 3d
+// Software license.  You should have received a copy of this license
+// along with this source code; you will also find a current copy of
+// the license at http://www.panda3d.org/license.txt .
+//
+// To contact the maintainers of this program write to
+// [email protected] .
+//
+////////////////////////////////////////////////////////////////////
 
 
 #ifndef CPPUSING_H
 #ifndef CPPUSING_H
 #define CPPUSING_H
 #define CPPUSING_H

+ 17 - 4
dtool/src/cppparser/cppVisibility.cxx

@@ -1,6 +1,19 @@
-// Filename: cppVisibility.C
+// Filename: cppVisibility.cxx
 // Created by:  drose (22Oct99)
 // Created by:  drose (22Oct99)
-// 
+//
+////////////////////////////////////////////////////////////////////
+//
+// PANDA 3D SOFTWARE
+// Copyright (c) 2001, Disney Enterprises, Inc.  All rights reserved
+//
+// All use of this software is subject to the terms of the Panda 3d
+// Software license.  You should have received a copy of this license
+// along with this source code; you will also find a current copy of
+// the license at http://www.panda3d.org/license.txt .
+//
+// To contact the maintainers of this program write to
+// [email protected] .
+//
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 
 
 
 
@@ -17,10 +30,10 @@ operator << (ostream &out, CPPVisibility vis) {
 
 
   case V_protected:
   case V_protected:
     return out << "protected";
     return out << "protected";
- 
+
   case V_private:
   case V_private:
     return out << "private";
     return out << "private";
- 
+
   case V_unknown:
   case V_unknown:
     return out << "unknown";
     return out << "unknown";
   }
   }

+ 13 - 0
dtool/src/cppparser/cppVisibility.h

@@ -2,6 +2,19 @@
 // Created by:  drose (22Oct99)
 // Created by:  drose (22Oct99)
 //
 //
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
+//
+// PANDA 3D SOFTWARE
+// Copyright (c) 2001, Disney Enterprises, Inc.  All rights reserved
+//
+// All use of this software is subject to the terms of the Panda 3d
+// Software license.  You should have received a copy of this license
+// along with this source code; you will also find a current copy of
+// the license at http://www.panda3d.org/license.txt .
+//
+// To contact the maintainers of this program write to
+// [email protected] .
+//
+////////////////////////////////////////////////////////////////////
 
 
 #ifndef CPPVISIBILITY_H
 #ifndef CPPVISIBILITY_H
 #define CPPVISIBILITY_H
 #define CPPVISIBILITY_H

+ 15 - 2
dtool/src/cppparser/indent.cxx

@@ -1,6 +1,19 @@
-// Filename: indent.C
+// Filename: indent.cxx
 // Created by:  drose (16Jan99)
 // Created by:  drose (16Jan99)
-// 
+//
+////////////////////////////////////////////////////////////////////
+//
+// PANDA 3D SOFTWARE
+// Copyright (c) 2001, Disney Enterprises, Inc.  All rights reserved
+//
+// All use of this software is subject to the terms of the Panda 3d
+// Software license.  You should have received a copy of this license
+// along with this source code; you will also find a current copy of
+// the license at http://www.panda3d.org/license.txt .
+//
+// To contact the maintainers of this program write to
+// [email protected] .
+//
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 
 
 
 

+ 14 - 1
dtool/src/cppparser/indent.h

@@ -2,6 +2,19 @@
 // Created by:  drose (16Jan99)
 // Created by:  drose (16Jan99)
 //
 //
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
+//
+// PANDA 3D SOFTWARE
+// Copyright (c) 2001, Disney Enterprises, Inc.  All rights reserved
+//
+// All use of this software is subject to the terms of the Panda 3d
+// Software license.  You should have received a copy of this license
+// along with this source code; you will also find a current copy of
+// the license at http://www.panda3d.org/license.txt .
+//
+// To contact the maintainers of this program write to
+// [email protected] .
+//
+////////////////////////////////////////////////////////////////////
 
 
 #ifndef INDENT_H
 #ifndef INDENT_H
 #define INDENT_H
 #define INDENT_H
@@ -21,4 +34,4 @@ indent(ostream &out, int indent_level);
 
 
 #endif
 #endif
 
 
- 
+

+ 14 - 1
dtool/src/dconfig/configTable.I

@@ -1,6 +1,19 @@
 // Filename: configTable.I
 // Filename: configTable.I
 // Created by:  drose (15May00)
 // Created by:  drose (15May00)
-// 
+//
+////////////////////////////////////////////////////////////////////
+//
+// PANDA 3D SOFTWARE
+// Copyright (c) 2001, Disney Enterprises, Inc.  All rights reserved
+//
+// All use of this software is subject to the terms of the Panda 3d
+// Software license.  You should have received a copy of this license
+// along with this source code; you will also find a current copy of
+// the license at http://www.panda3d.org/license.txt .
+//
+// To contact the maintainers of this program write to
+// [email protected] .
+//
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 
 
 
 

+ 17 - 4
dtool/src/dconfig/configTable.cxx

@@ -1,6 +1,19 @@
-// Filename: configTable.C
+// Filename: configTable.cxx
 // Created by:  drose (15May00)
 // Created by:  drose (15May00)
-// 
+//
+////////////////////////////////////////////////////////////////////
+//
+// PANDA 3D SOFTWARE
+// Copyright (c) 2001, Disney Enterprises, Inc.  All rights reserved
+//
+// All use of this software is subject to the terms of the Panda 3d
+// Software license.  You should have received a copy of this license
+// along with this source code; you will also find a current copy of
+// the license at http://www.panda3d.org/license.txt .
+//
+// To contact the maintainers of this program write to
+// [email protected] .
+//
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 
 
 #include "dconfig.h"
 #include "dconfig.h"
@@ -116,7 +129,7 @@ void ConfigTable::ReadConfigFile(void) {
     // this is currently done in makefile.config.so...
     // this is currently done in makefile.config.so...
 
 
     // CSN.
     // CSN.
-      
+
 #ifndef CONFIG_PATH
 #ifndef CONFIG_PATH
 #define CONFIG_PATH "."
 #define CONFIG_PATH "."
 #endif
 #endif
@@ -144,7 +157,7 @@ void ConfigTable::ReadConfigFile(void) {
   if (microconfig_cat->is_spam())
   if (microconfig_cat->is_spam())
     microconfig_cat->spam() << "evaluated value of configpath '"
     microconfig_cat->spam() << "evaluated value of configpath '"
                             << configpath << "'" << endl;
                             << configpath << "'" << endl;
-  
+
   DSearchPath config_search(configpath);
   DSearchPath config_search(configpath);
   DSearchPath::Results config_files;
   DSearchPath::Results config_files;
 
 

+ 14 - 1
dtool/src/dconfig/configTable.h

@@ -1,6 +1,19 @@
 // Filename: configTable.h
 // Filename: configTable.h
 // Created by:  drose (15May00)
 // Created by:  drose (15May00)
-// 
+//
+////////////////////////////////////////////////////////////////////
+//
+// PANDA 3D SOFTWARE
+// Copyright (c) 2001, Disney Enterprises, Inc.  All rights reserved
+//
+// All use of this software is subject to the terms of the Panda 3d
+// Software license.  You should have received a copy of this license
+// along with this source code; you will also find a current copy of
+// the license at http://www.panda3d.org/license.txt .
+//
+// To contact the maintainers of this program write to
+// [email protected] .
+//
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 
 
 #ifndef CONFIGTABLE_H
 #ifndef CONFIGTABLE_H

+ 15 - 2
dtool/src/dconfig/config_dconfig.cxx

@@ -1,6 +1,19 @@
-// Filename: config_dconfig.C
+// Filename: config_dconfig.cxx
 // Created by:  drose (15May00)
 // Created by:  drose (15May00)
-// 
+//
+////////////////////////////////////////////////////////////////////
+//
+// PANDA 3D SOFTWARE
+// Copyright (c) 2001, Disney Enterprises, Inc.  All rights reserved
+//
+// All use of this software is subject to the terms of the Panda 3d
+// Software license.  You should have received a copy of this license
+// along with this source code; you will also find a current copy of
+// the license at http://www.panda3d.org/license.txt .
+//
+// To contact the maintainers of this program write to
+// [email protected] .
+//
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 
 
 #include "config_dconfig.h"
 #include "config_dconfig.h"

+ 14 - 1
dtool/src/dconfig/config_dconfig.h

@@ -1,6 +1,19 @@
 // Filename: config_dconfig.h
 // Filename: config_dconfig.h
 // Created by:  drose (15May00)
 // Created by:  drose (15May00)
-// 
+//
+////////////////////////////////////////////////////////////////////
+//
+// PANDA 3D SOFTWARE
+// Copyright (c) 2001, Disney Enterprises, Inc.  All rights reserved
+//
+// All use of this software is subject to the terms of the Panda 3d
+// Software license.  You should have received a copy of this license
+// along with this source code; you will also find a current copy of
+// the license at http://www.panda3d.org/license.txt .
+//
+// To contact the maintainers of this program write to
+// [email protected] .
+//
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 
 
 #ifndef CONFIG_DCONFIG_H
 #ifndef CONFIG_DCONFIG_H

+ 15 - 2
dtool/src/dconfig/config_notify.cxx

@@ -1,6 +1,19 @@
-// Filename: config_notify.C
+// Filename: config_notify.cxx
 // Created by:  drose (29Feb00)
 // Created by:  drose (29Feb00)
-// 
+//
+////////////////////////////////////////////////////////////////////
+//
+// PANDA 3D SOFTWARE
+// Copyright (c) 2001, Disney Enterprises, Inc.  All rights reserved
+//
+// All use of this software is subject to the terms of the Panda 3d
+// Software license.  You should have received a copy of this license
+// along with this source code; you will also find a current copy of
+// the license at http://www.panda3d.org/license.txt .
+//
+// To contact the maintainers of this program write to
+// [email protected] .
+//
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 
 
 #include "config_notify.h"
 #include "config_notify.h"

+ 14 - 1
dtool/src/dconfig/config_notify.h

@@ -1,6 +1,19 @@
 // Filename: config_notify.h
 // Filename: config_notify.h
 // Created by:  drose (29Feb00)
 // Created by:  drose (29Feb00)
-// 
+//
+////////////////////////////////////////////////////////////////////
+//
+// PANDA 3D SOFTWARE
+// Copyright (c) 2001, Disney Enterprises, Inc.  All rights reserved
+//
+// All use of this software is subject to the terms of the Panda 3d
+// Software license.  You should have received a copy of this license
+// along with this source code; you will also find a current copy of
+// the license at http://www.panda3d.org/license.txt .
+//
+// To contact the maintainers of this program write to
+// [email protected] .
+//
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 
 
 #ifndef CONFIG_NOTIFY_H
 #ifndef CONFIG_NOTIFY_H

+ 14 - 1
dtool/src/dconfig/config_setup.h

@@ -1,7 +1,20 @@
 // Filename: config_setup.h
 // Filename: config_setup.h
 // Created by:  cary (20Mar00)
 // Created by:  cary (20Mar00)
 //
 //
-///////////////////////////////////////////////////////////////////////
+////////////////////////////////////////////////////////////////////
+//
+// PANDA 3D SOFTWARE
+// Copyright (c) 2001, Disney Enterprises, Inc.  All rights reserved
+//
+// All use of this software is subject to the terms of the Panda 3d
+// Software license.  You should have received a copy of this license
+// along with this source code; you will also find a current copy of
+// the license at http://www.panda3d.org/license.txt .
+//
+// To contact the maintainers of this program write to
+// [email protected] .
+//
+////////////////////////////////////////////////////////////////////
 
 
 #ifndef __CONFIG_SETUP_H__
 #ifndef __CONFIG_SETUP_H__
 #define __CONFIG_SETUP_H__
 #define __CONFIG_SETUP_H__

+ 15 - 2
dtool/src/dconfig/dconfig.I

@@ -1,7 +1,20 @@
-// Filename: config.I
+// Filename: dconfig.I
 // Created by:  cary (20Mar00)
 // Created by:  cary (20Mar00)
 //
 //
-///////////////////////////////////////////////////////////////////////
+////////////////////////////////////////////////////////////////////
+//
+// PANDA 3D SOFTWARE
+// Copyright (c) 2001, Disney Enterprises, Inc.  All rights reserved
+//
+// All use of this software is subject to the terms of the Panda 3d
+// Software license.  You should have received a copy of this license
+// along with this source code; you will also find a current copy of
+// the license at http://www.panda3d.org/license.txt .
+//
+// To contact the maintainers of this program write to
+// [email protected] .
+//
+////////////////////////////////////////////////////////////////////
 
 
 
 
 INLINE double get_total_time_config_init() {
 INLINE double get_total_time_config_init() {

+ 15 - 2
dtool/src/dconfig/dconfig.cxx

@@ -1,6 +1,19 @@
-// Filename: dconfig.C
+// Filename: dconfig.cxx
 // Created by:  drose (08Feb99)
 // Created by:  drose (08Feb99)
-// 
+//
+////////////////////////////////////////////////////////////////////
+//
+// PANDA 3D SOFTWARE
+// Copyright (c) 2001, Disney Enterprises, Inc.  All rights reserved
+//
+// All use of this software is subject to the terms of the Panda 3d
+// Software license.  You should have received a copy of this license
+// along with this source code; you will also find a current copy of
+// the license at http://www.panda3d.org/license.txt .
+//
+// To contact the maintainers of this program write to
+// [email protected] .
+//
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 
 
 #include "dconfig.h"
 #include "dconfig.h"

+ 14 - 1
dtool/src/dconfig/dconfig.h

@@ -1,7 +1,20 @@
 // Filename: dconfig.h
 // Filename: dconfig.h
 // Created by:  cary (14Jul98)
 // Created by:  cary (14Jul98)
 //
 //
-///////////////////////////////////////////////////////////////////////
+////////////////////////////////////////////////////////////////////
+//
+// PANDA 3D SOFTWARE
+// Copyright (c) 2001, Disney Enterprises, Inc.  All rights reserved
+//
+// All use of this software is subject to the terms of the Panda 3d
+// Software license.  You should have received a copy of this license
+// along with this source code; you will also find a current copy of
+// the license at http://www.panda3d.org/license.txt .
+//
+// To contact the maintainers of this program write to
+// [email protected] .
+//
+////////////////////////////////////////////////////////////////////
 
 
 #ifndef DCONFIG_H
 #ifndef DCONFIG_H
 #define DCONFIG_H
 #define DCONFIG_H

+ 13 - 0
dtool/src/dconfig/expand.I

@@ -2,6 +2,19 @@
 // Created by:  cary (20Mar00)
 // Created by:  cary (20Mar00)
 //
 //
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
+//
+// PANDA 3D SOFTWARE
+// Copyright (c) 2001, Disney Enterprises, Inc.  All rights reserved
+//
+// All use of this software is subject to the terms of the Panda 3d
+// Software license.  You should have received a copy of this license
+// along with this source code; you will also find a current copy of
+// the license at http://www.panda3d.org/license.txt .
+//
+// To contact the maintainers of this program write to
+// [email protected] .
+//
+////////////////////////////////////////////////////////////////////
 
 
 INLINE bool Base_Expander::isEnv(ConfigString S) {
 INLINE bool Base_Expander::isEnv(ConfigString S) {
   return (getenv(S.c_str()) != (TYPENAME ConfigString::value_type *)0L);
   return (getenv(S.c_str()) != (TYPENAME ConfigString::value_type *)0L);

+ 13 - 0
dtool/src/dconfig/expand.h

@@ -2,6 +2,19 @@
 // Created by:  cary (26Aug98)
 // Created by:  cary (26Aug98)
 //
 //
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
+//
+// PANDA 3D SOFTWARE
+// Copyright (c) 2001, Disney Enterprises, Inc.  All rights reserved
+//
+// All use of this software is subject to the terms of the Panda 3d
+// Software license.  You should have received a copy of this license
+// along with this source code; you will also find a current copy of
+// the license at http://www.panda3d.org/license.txt .
+//
+// To contact the maintainers of this program write to
+// [email protected] .
+//
+////////////////////////////////////////////////////////////////////
 
 
 #ifndef __EXPAND_H__
 #ifndef __EXPAND_H__
 #define __EXPAND_H__
 #define __EXPAND_H__

+ 14 - 1
dtool/src/dconfig/notify.I

@@ -1,5 +1,18 @@
 // Filename: notify.I
 // Filename: notify.I
 // Created by:  drose (28Feb00)
 // Created by:  drose (28Feb00)
-// 
+//
+////////////////////////////////////////////////////////////////////
+//
+// PANDA 3D SOFTWARE
+// Copyright (c) 2001, Disney Enterprises, Inc.  All rights reserved
+//
+// All use of this software is subject to the terms of the Panda 3d
+// Software license.  You should have received a copy of this license
+// along with this source code; you will also find a current copy of
+// the license at http://www.panda3d.org/license.txt .
+//
+// To contact the maintainers of this program write to
+// [email protected] .
+//
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 
 

+ 20 - 7
dtool/src/dconfig/notify.cxx

@@ -1,6 +1,19 @@
-// Filename: notify.C
+// Filename: notify.cxx
 // Created by:  drose (28Feb00)
 // Created by:  drose (28Feb00)
-// 
+//
+////////////////////////////////////////////////////////////////////
+//
+// PANDA 3D SOFTWARE
+// Copyright (c) 2001, Disney Enterprises, Inc.  All rights reserved
+//
+// All use of this software is subject to the terms of the Panda 3d
+// Software license.  You should have received a copy of this license
+// along with this source code; you will also find a current copy of
+// the license at http://www.panda3d.org/license.txt .
+//
+// To contact the maintainers of this program write to
+// [email protected] .
+//
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 
 
 #include "notify.h"
 #include "notify.h"
@@ -18,7 +31,7 @@ Notify *Notify::_global_ptr = (Notify *)NULL;
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 //     Function: Notify::Constructor
 //     Function: Notify::Constructor
 //       Access: Public
 //       Access: Public
-//  Description: 
+//  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 Notify::
 Notify::
 Notify() {
 Notify() {
@@ -33,7 +46,7 @@ Notify() {
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 //     Function: Notify::Destructor
 //     Function: Notify::Destructor
 //       Access: Public
 //       Access: Public
-//  Description: 
+//  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 Notify::
 Notify::
 ~Notify() {
 ~Notify() {
@@ -252,7 +265,7 @@ get_category(const string &basename, NotifyCategory *parent_category) {
     }
     }
   }
   }
 
 
-  NotifyCategory *category = 
+  NotifyCategory *category =
     new NotifyCategory(fullname, basename, parent_category);
     new NotifyCategory(fullname, basename, parent_category);
   _categories.insert(Categories::value_type(fullname, category));
   _categories.insert(Categories::value_type(fullname, category));
   return category;
   return category;
@@ -380,7 +393,7 @@ bool Notify::
 assert_failure(const char *expression, int line,
 assert_failure(const char *expression, int line,
                const char *source_file) {
                const char *source_file) {
   ostringstream message_str;
   ostringstream message_str;
-  message_str 
+  message_str
     << expression << " at line " << line << " of " << source_file;
     << expression << " at line " << line << " of " << source_file;
   string message = message_str.str();
   string message = message_str.str();
 
 
@@ -421,7 +434,7 @@ string_severity(const string &str) {
   // comparison.
   // comparison.
   string lstring;
   string lstring;
   for (string::const_iterator si = str.begin();
   for (string::const_iterator si = str.begin();
-       si != str.end(); 
+       si != str.end();
        ++si) {
        ++si) {
     lstring += tolower(*si);
     lstring += tolower(*si);
   }
   }

+ 18 - 5
dtool/src/dconfig/notify.h

@@ -1,6 +1,19 @@
 // Filename: notify.h
 // Filename: notify.h
 // Created by:  drose (28Feb00)
 // Created by:  drose (28Feb00)
-// 
+//
+////////////////////////////////////////////////////////////////////
+//
+// PANDA 3D SOFTWARE
+// Copyright (c) 2001, Disney Enterprises, Inc.  All rights reserved
+//
+// All use of this software is subject to the terms of the Panda 3d
+// Software license.  You should have received a copy of this license
+// along with this source code; you will also find a current copy of
+// the license at http://www.panda3d.org/license.txt .
+//
+// To contact the maintainers of this program write to
+// [email protected] .
+//
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 
 
 #ifndef NOTIFY_H
 #ifndef NOTIFY_H
@@ -39,7 +52,7 @@ PUBLISHED:
 
 
   typedef bool AssertHandler(const char *expression, int line,
   typedef bool AssertHandler(const char *expression, int line,
                              const char *source_file);
                              const char *source_file);
-  
+
   void set_assert_handler(AssertHandler *assert_handler);
   void set_assert_handler(AssertHandler *assert_handler);
   void clear_assert_handler();
   void clear_assert_handler();
   bool has_assert_handler() const;
   bool has_assert_handler() const;
@@ -50,9 +63,9 @@ PUBLISHED:
   void clear_assert_failed();
   void clear_assert_failed();
 
 
   NotifyCategory *get_top_category();
   NotifyCategory *get_top_category();
-  NotifyCategory *get_category(const string &basename, 
+  NotifyCategory *get_category(const string &basename,
                                NotifyCategory *parent_category);
                                NotifyCategory *parent_category);
-  NotifyCategory *get_category(const string &basename, 
+  NotifyCategory *get_category(const string &basename,
                                const string &parent_fullname);
                                const string &parent_fullname);
   NotifyCategory *get_category(const string &fullname);
   NotifyCategory *get_category(const string &fullname);
 
 
@@ -119,7 +132,7 @@ private:
 
 
 #ifdef NDEBUG
 #ifdef NDEBUG
 
 
-#define nassertr(condition, return_value)  
+#define nassertr(condition, return_value)
 #define nassertv(condition)
 #define nassertv(condition)
 #define nassertd(condition) if (false)
 #define nassertd(condition) if (false)
 // We trust the compiler to optimize the above out.
 // We trust the compiler to optimize the above out.

+ 17 - 4
dtool/src/dconfig/notifyCategory.I

@@ -1,13 +1,26 @@
 // Filename: notifyCategory.I
 // Filename: notifyCategory.I
 // Created by:  drose (29Feb00)
 // Created by:  drose (29Feb00)
-// 
+//
+////////////////////////////////////////////////////////////////////
+//
+// PANDA 3D SOFTWARE
+// Copyright (c) 2001, Disney Enterprises, Inc.  All rights reserved
+//
+// All use of this software is subject to the terms of the Panda 3d
+// Software license.  You should have received a copy of this license
+// along with this source code; you will also find a current copy of
+// the license at http://www.panda3d.org/license.txt .
+//
+// To contact the maintainers of this program write to
+// [email protected] .
+//
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 
 
 
 
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 //     Function: NotifyCategory::get_fullname
 //     Function: NotifyCategory::get_fullname
 //       Access: Public
 //       Access: Public
-//  Description: 
+//  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 INLINE string NotifyCategory::
 INLINE string NotifyCategory::
 get_fullname() const {
 get_fullname() const {
@@ -17,7 +30,7 @@ get_fullname() const {
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 //     Function: NotifyCategory::get_basename
 //     Function: NotifyCategory::get_basename
 //       Access: Public
 //       Access: Public
-//  Description: 
+//  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 INLINE string NotifyCategory::
 INLINE string NotifyCategory::
 get_basename() const {
 get_basename() const {
@@ -27,7 +40,7 @@ get_basename() const {
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 //     Function: NotifyCategory::get_severity
 //     Function: NotifyCategory::get_severity
 //       Access: Public
 //       Access: Public
-//  Description: 
+//  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 INLINE NotifySeverity NotifyCategory::
 INLINE NotifySeverity NotifyCategory::
 get_severity() const {
 get_severity() const {

+ 21 - 8
dtool/src/dconfig/notifyCategory.cxx

@@ -1,6 +1,19 @@
-// Filename: notifyCategory.C
+// Filename: notifyCategory.cxx
 // Created by:  drose (29Feb00)
 // Created by:  drose (29Feb00)
-// 
+//
+////////////////////////////////////////////////////////////////////
+//
+// PANDA 3D SOFTWARE
+// Copyright (c) 2001, Disney Enterprises, Inc.  All rights reserved
+//
+// All use of this software is subject to the terms of the Panda 3d
+// Software license.  You should have received a copy of this license
+// along with this source code; you will also find a current copy of
+// the license at http://www.panda3d.org/license.txt .
+//
+// To contact the maintainers of this program write to
+// [email protected] .
+//
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 
 
 #include "notifyCategory.h"
 #include "notifyCategory.h"
@@ -12,13 +25,13 @@
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 //     Function: NotifyCategory::Constructor
 //     Function: NotifyCategory::Constructor
 //       Access: Public
 //       Access: Public
-//  Description: 
+//  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 NotifyCategory::
 NotifyCategory::
-NotifyCategory(const string &fullname, const string &basename, 
-               NotifyCategory *parent) : 
-  _fullname(fullname), 
-  _basename(basename), 
+NotifyCategory(const string &fullname, const string &basename,
+               NotifyCategory *parent) :
+  _fullname(fullname),
+  _basename(basename),
   _parent(parent)
   _parent(parent)
 {
 {
   if (_parent != (NotifyCategory *)NULL) {
   if (_parent != (NotifyCategory *)NULL) {
@@ -47,7 +60,7 @@ NotifyCategory(const string &fullname, const string &basename,
       // The user specified a particular severity for this category at
       // The user specified a particular severity for this category at
       // config time.  Use it.
       // config time.  Use it.
       _severity = Notify::string_severity(severity_name);
       _severity = Notify::string_severity(severity_name);
-      
+
       if (_severity == NS_unspecified) {
       if (_severity == NS_unspecified) {
         nout << "Invalid severity name for " << config_name << ": "
         nout << "Invalid severity name for " << config_name << ": "
              << severity_name << "\n";
              << severity_name << "\n";

+ 21 - 8
dtool/src/dconfig/notifyCategory.h

@@ -1,6 +1,19 @@
 // Filename: notifyCategory.h
 // Filename: notifyCategory.h
 // Created by:  drose (29Feb00)
 // Created by:  drose (29Feb00)
-// 
+//
+////////////////////////////////////////////////////////////////////
+//
+// PANDA 3D SOFTWARE
+// Copyright (c) 2001, Disney Enterprises, Inc.  All rights reserved
+//
+// All use of this software is subject to the terms of the Panda 3d
+// Software license.  You should have received a copy of this license
+// along with this source code; you will also find a current copy of
+// the license at http://www.panda3d.org/license.txt .
+//
+// To contact the maintainers of this program write to
+// [email protected] .
+//
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 
 
 #ifndef NOTIFYCATEGORY_H
 #ifndef NOTIFYCATEGORY_H
@@ -24,15 +37,15 @@
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 class EXPCL_DTOOLCONFIG NotifyCategory {
 class EXPCL_DTOOLCONFIG NotifyCategory {
 private:
 private:
-  NotifyCategory(const string &fullname, const string &basename, 
+  NotifyCategory(const string &fullname, const string &basename,
                  NotifyCategory *parent);
                  NotifyCategory *parent);
-  
+
 PUBLISHED:
 PUBLISHED:
   INLINE string get_fullname() const;
   INLINE string get_fullname() const;
   INLINE string get_basename() const;
   INLINE string get_basename() const;
   INLINE NotifySeverity get_severity() const;
   INLINE NotifySeverity get_severity() const;
   INLINE void set_severity(NotifySeverity severity);
   INLINE void set_severity(NotifySeverity severity);
-  
+
   INLINE bool is_on(NotifySeverity severity) const;
   INLINE bool is_on(NotifySeverity severity) const;
 
 
   // When NOTIFY_DEBUG is not defined, the categories will never be
   // When NOTIFY_DEBUG is not defined, the categories will never be
@@ -52,7 +65,7 @@ PUBLISHED:
   INLINE bool is_warning() const;
   INLINE bool is_warning() const;
   INLINE bool is_error() const;
   INLINE bool is_error() const;
   INLINE bool is_fatal() const;
   INLINE bool is_fatal() const;
-  
+
   ostream &out(NotifySeverity severity, bool prefix = true) const;
   ostream &out(NotifySeverity severity, bool prefix = true) const;
   INLINE ostream &spam(bool prefix = true) const;
   INLINE ostream &spam(bool prefix = true) const;
   INLINE ostream &debug(bool prefix = true) const;
   INLINE ostream &debug(bool prefix = true) const;
@@ -60,10 +73,10 @@ PUBLISHED:
   INLINE ostream &warning(bool prefix = true) const;
   INLINE ostream &warning(bool prefix = true) const;
   INLINE ostream &error(bool prefix = true) const;
   INLINE ostream &error(bool prefix = true) const;
   INLINE ostream &fatal(bool prefix = true) const;
   INLINE ostream &fatal(bool prefix = true) const;
-  
+
   int get_num_children() const;
   int get_num_children() const;
   NotifyCategory *get_child(int i) const;
   NotifyCategory *get_child(int i) const;
-  
+
 private:
 private:
   string _fullname;
   string _fullname;
   string _basename;
   string _basename;
@@ -71,7 +84,7 @@ private:
   NotifySeverity _severity;
   NotifySeverity _severity;
   typedef vector<NotifyCategory *> Children;
   typedef vector<NotifyCategory *> Children;
   Children _children;
   Children _children;
-  
+
   friend class Notify;
   friend class Notify;
 };
 };
 
 

+ 28 - 15
dtool/src/dconfig/notifyCategoryProxy.I

@@ -1,6 +1,19 @@
 // Filename: notifyCategoryProxy.I
 // Filename: notifyCategoryProxy.I
 // Created by:  drose (04Mar00)
 // Created by:  drose (04Mar00)
-// 
+//
+////////////////////////////////////////////////////////////////////
+//
+// PANDA 3D SOFTWARE
+// Copyright (c) 2001, Disney Enterprises, Inc.  All rights reserved
+//
+// All use of this software is subject to the terms of the Panda 3d
+// Software license.  You should have received a copy of this license
+// along with this source code; you will also find a current copy of
+// the license at http://www.panda3d.org/license.txt .
+//
+// To contact the maintainers of this program write to
+// [email protected] .
+//
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 
 
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
@@ -55,7 +68,7 @@ get_safe_ptr() {
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 //     Function: NotifyCategoryProxy::is_on
 //     Function: NotifyCategoryProxy::is_on
 //       Access: Public
 //       Access: Public
-//  Description: 
+//  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 template<class GetCategory>
 template<class GetCategory>
 INLINE bool NotifyCategoryProxy<GetCategory>::
 INLINE bool NotifyCategoryProxy<GetCategory>::
@@ -66,7 +79,7 @@ is_on(NotifySeverity severity) {
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 //     Function: NotifyCategoryProxy::is_spam
 //     Function: NotifyCategoryProxy::is_spam
 //       Access: Public
 //       Access: Public
-//  Description: 
+//  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 template<class GetCategory>
 template<class GetCategory>
 INLINE bool NotifyCategoryProxy<GetCategory>::
 INLINE bool NotifyCategoryProxy<GetCategory>::
@@ -81,7 +94,7 @@ is_spam() {
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 //     Function: NotifyCategoryProxy::is_debug
 //     Function: NotifyCategoryProxy::is_debug
 //       Access: Public
 //       Access: Public
-//  Description: 
+//  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 template<class GetCategory>
 template<class GetCategory>
 INLINE bool NotifyCategoryProxy<GetCategory>::
 INLINE bool NotifyCategoryProxy<GetCategory>::
@@ -96,7 +109,7 @@ is_debug() {
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 //     Function: NotifyCategoryProxy::is_info
 //     Function: NotifyCategoryProxy::is_info
 //       Access: Public
 //       Access: Public
-//  Description: 
+//  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 template<class GetCategory>
 template<class GetCategory>
 INLINE bool NotifyCategoryProxy<GetCategory>::
 INLINE bool NotifyCategoryProxy<GetCategory>::
@@ -107,7 +120,7 @@ is_info() {
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 //     Function: NotifyCategoryProxy::is_warning
 //     Function: NotifyCategoryProxy::is_warning
 //       Access: Public
 //       Access: Public
-//  Description: 
+//  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 template<class GetCategory>
 template<class GetCategory>
 INLINE bool NotifyCategoryProxy<GetCategory>::
 INLINE bool NotifyCategoryProxy<GetCategory>::
@@ -118,7 +131,7 @@ is_warning() {
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 //     Function: NotifyCategoryProxy::is_error
 //     Function: NotifyCategoryProxy::is_error
 //       Access: Public
 //       Access: Public
-//  Description: 
+//  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 template<class GetCategory>
 template<class GetCategory>
 INLINE bool NotifyCategoryProxy<GetCategory>::
 INLINE bool NotifyCategoryProxy<GetCategory>::
@@ -129,7 +142,7 @@ is_error() {
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 //     Function: NotifyCategoryProxy::is_fatal
 //     Function: NotifyCategoryProxy::is_fatal
 //       Access: Public
 //       Access: Public
-//  Description: 
+//  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 template<class GetCategory>
 template<class GetCategory>
 INLINE bool NotifyCategoryProxy<GetCategory>::
 INLINE bool NotifyCategoryProxy<GetCategory>::
@@ -140,7 +153,7 @@ is_fatal() {
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 //     Function: NotifyCategoryProxy::out
 //     Function: NotifyCategoryProxy::out
 //       Access: Public
 //       Access: Public
-//  Description: 
+//  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 template<class GetCategory>
 template<class GetCategory>
 INLINE ostream &NotifyCategoryProxy<GetCategory>::
 INLINE ostream &NotifyCategoryProxy<GetCategory>::
@@ -151,7 +164,7 @@ out(NotifySeverity severity, bool prefix) {
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 //     Function: NotifyCategoryProxy::spam
 //     Function: NotifyCategoryProxy::spam
 //       Access: Public
 //       Access: Public
-//  Description: 
+//  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 template<class GetCategory>
 template<class GetCategory>
 INLINE ostream &NotifyCategoryProxy<GetCategory>::
 INLINE ostream &NotifyCategoryProxy<GetCategory>::
@@ -162,7 +175,7 @@ spam(bool prefix) {
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 //     Function: NotifyCategoryProxy::debug
 //     Function: NotifyCategoryProxy::debug
 //       Access: Public
 //       Access: Public
-//  Description: 
+//  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 template<class GetCategory>
 template<class GetCategory>
 INLINE ostream &NotifyCategoryProxy<GetCategory>::
 INLINE ostream &NotifyCategoryProxy<GetCategory>::
@@ -173,7 +186,7 @@ debug(bool prefix) {
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 //     Function: NotifyCategoryProxy::info
 //     Function: NotifyCategoryProxy::info
 //       Access: Public
 //       Access: Public
-//  Description: 
+//  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 template<class GetCategory>
 template<class GetCategory>
 INLINE ostream &NotifyCategoryProxy<GetCategory>::
 INLINE ostream &NotifyCategoryProxy<GetCategory>::
@@ -184,7 +197,7 @@ info(bool prefix) {
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 //     Function: NotifyCategoryProxy::warning
 //     Function: NotifyCategoryProxy::warning
 //       Access: Public
 //       Access: Public
-//  Description: 
+//  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 template<class GetCategory>
 template<class GetCategory>
 INLINE ostream &NotifyCategoryProxy<GetCategory>::
 INLINE ostream &NotifyCategoryProxy<GetCategory>::
@@ -195,7 +208,7 @@ warning(bool prefix) {
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 //     Function: NotifyCategoryProxy::error
 //     Function: NotifyCategoryProxy::error
 //       Access: Public
 //       Access: Public
-//  Description: 
+//  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 template<class GetCategory>
 template<class GetCategory>
 INLINE ostream &NotifyCategoryProxy<GetCategory>::
 INLINE ostream &NotifyCategoryProxy<GetCategory>::
@@ -206,7 +219,7 @@ error(bool prefix) {
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 //     Function: NotifyCategoryProxy::fatal
 //     Function: NotifyCategoryProxy::fatal
 //       Access: Public
 //       Access: Public
-//  Description: 
+//  Description:
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 template<class GetCategory>
 template<class GetCategory>
 INLINE ostream &NotifyCategoryProxy<GetCategory>::
 INLINE ostream &NotifyCategoryProxy<GetCategory>::

+ 15 - 2
dtool/src/dconfig/notifyCategoryProxy.h

@@ -1,6 +1,19 @@
 // Filename: notifyCategoryProxy.h
 // Filename: notifyCategoryProxy.h
 // Created by:  drose (04Mar00)
 // Created by:  drose (04Mar00)
-// 
+//
+////////////////////////////////////////////////////////////////////
+//
+// PANDA 3D SOFTWARE
+// Copyright (c) 2001, Disney Enterprises, Inc.  All rights reserved
+//
+// All use of this software is subject to the terms of the Panda 3d
+// Software license.  You should have received a copy of this license
+// along with this source code; you will also find a current copy of
+// the license at http://www.panda3d.org/license.txt .
+//
+// To contact the maintainers of this program write to
+// [email protected] .
+//
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 
 
 #ifndef NOTIFYCATEGORYPROXY_H
 #ifndef NOTIFYCATEGORYPROXY_H
@@ -78,7 +91,7 @@ public:
   INLINE bool is_warning();
   INLINE bool is_warning();
   INLINE bool is_error();
   INLINE bool is_error();
   INLINE bool is_fatal();
   INLINE bool is_fatal();
-  
+
   INLINE ostream &out(NotifySeverity severity, bool prefix = true);
   INLINE ostream &out(NotifySeverity severity, bool prefix = true);
   INLINE ostream &spam(bool prefix = true);
   INLINE ostream &spam(bool prefix = true);
   INLINE ostream &debug(bool prefix = true);
   INLINE ostream &debug(bool prefix = true);

Some files were not shown because too many files changed in this diff