cppExtensionType.h 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. // Filename: cppExtensionType.h
  2. // Created by: drose (21Oct99)
  3. //
  4. ////////////////////////////////////////////////////////////////////
  5. //
  6. // PANDA 3D SOFTWARE
  7. // Copyright (c) Carnegie Mellon University. All rights reserved.
  8. //
  9. // All use of this software is subject to the terms of the revised BSD
  10. // license. You should have received a copy of this license along
  11. // with this source code in a file named "LICENSE."
  12. //
  13. ////////////////////////////////////////////////////////////////////
  14. #ifndef CPPEXTENSIONTYPE_H
  15. #define CPPEXTENSIONTYPE_H
  16. #include "dtoolbase.h"
  17. #include "cppType.h"
  18. #include "cppInstance.h"
  19. class CPPScope;
  20. class CPPIdentifier;
  21. ///////////////////////////////////////////////////////////////////
  22. // Class : CPPExtensionType
  23. // Description :
  24. ////////////////////////////////////////////////////////////////////
  25. class CPPExtensionType : public CPPType {
  26. public:
  27. enum Type {
  28. T_enum,
  29. T_class,
  30. T_struct,
  31. T_union,
  32. };
  33. CPPExtensionType(Type type, CPPIdentifier *ident, CPPScope *current_scope,
  34. const CPPFile &file);
  35. virtual string get_simple_name() const;
  36. virtual string get_local_name(CPPScope *scope = NULL) const;
  37. virtual string get_fully_scoped_name() const;
  38. virtual bool is_incomplete() const;
  39. virtual bool is_tbd() const;
  40. virtual CPPDeclaration *substitute_decl(SubstDecl &subst,
  41. CPPScope *current_scope,
  42. CPPScope *global_scope);
  43. virtual bool is_equivalent(const CPPType &other) const;
  44. virtual void output(ostream &out, int indent_level, CPPScope *scope,
  45. bool complete) const;
  46. virtual SubType get_subtype() const;
  47. virtual CPPExtensionType *as_extension_type();
  48. Type _type;
  49. CPPIdentifier *_ident;
  50. };
  51. ostream &operator << (ostream &out, CPPExtensionType::Type type);
  52. #endif