cppExtensionType.h 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. // Filename: cppExtensionType.h
  2. // Created by: drose (21Oct99)
  3. //
  4. ////////////////////////////////////////////////////////////////////
  5. //
  6. // PANDA 3D SOFTWARE
  7. // Copyright (c) 2001 - 2004, Disney Enterprises, Inc. All rights reserved
  8. //
  9. // All use of this software is subject to the terms of the Panda 3d
  10. // Software license. You should have received a copy of this license
  11. // along with this source code; you will also find a current copy of
  12. // the license at http://etc.cmu.edu/panda3d/docs/license/ .
  13. //
  14. // To contact the maintainers of this program write to
  15. // [email protected] .
  16. //
  17. ////////////////////////////////////////////////////////////////////
  18. #ifndef CPPEXTENSIONTYPE_H
  19. #define CPPEXTENSIONTYPE_H
  20. #include "dtoolbase.h"
  21. #include "cppType.h"
  22. #include "cppInstance.h"
  23. class CPPScope;
  24. class CPPIdentifier;
  25. ///////////////////////////////////////////////////////////////////
  26. // Class : CPPExtensionType
  27. // Description :
  28. ////////////////////////////////////////////////////////////////////
  29. class CPPExtensionType : public CPPType {
  30. public:
  31. enum Type {
  32. T_enum,
  33. T_class,
  34. T_struct,
  35. T_union,
  36. };
  37. CPPExtensionType(Type type, CPPIdentifier *ident, CPPScope *current_scope,
  38. const CPPFile &file);
  39. virtual string get_simple_name() const;
  40. virtual string get_local_name(CPPScope *scope = NULL) const;
  41. virtual string get_fully_scoped_name() const;
  42. virtual bool is_incomplete() const;
  43. virtual bool is_tbd() const;
  44. virtual CPPDeclaration *substitute_decl(SubstDecl &subst,
  45. CPPScope *current_scope,
  46. CPPScope *global_scope);
  47. virtual bool is_equivalent(const CPPType &other) const;
  48. virtual void output(ostream &out, int indent_level, CPPScope *scope,
  49. bool complete) const;
  50. virtual SubType get_subtype() const;
  51. virtual CPPExtensionType *as_extension_type();
  52. Type _type;
  53. CPPIdentifier *_ident;
  54. };
  55. ostream &operator << (ostream &out, CPPExtensionType::Type type);
  56. #endif