cppTypeProxy.h 2.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. // Filename: cppTypeProxy.h
  2. // Created by: drose (07Dec99)
  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 CPPTYPEPROXY_H
  15. #define CPPTYPEPROXY_H
  16. #include "dtoolbase.h"
  17. #include "cppType.h"
  18. ///////////////////////////////////////////////////////////////////
  19. // Class : CPPTypeProxy
  20. // Description : This is a special kind of type that is a placeholder
  21. // for some type, currently unknown, that will be filled
  22. // in later. It's used when a type that references
  23. // itself must instantiate.
  24. ////////////////////////////////////////////////////////////////////
  25. class CPPTypeProxy : public CPPType {
  26. public:
  27. CPPTypeProxy();
  28. virtual CPPType *resolve_type(CPPScope *current_scope,
  29. CPPScope *global_scope);
  30. virtual bool is_tbd() const;
  31. bool has_typedef_name() const;
  32. string get_typedef_name(CPPScope *scope = NULL) const;
  33. virtual string get_simple_name() const;
  34. virtual string get_local_name(CPPScope *scope = NULL) const;
  35. virtual string get_fully_scoped_name() const;
  36. virtual string get_preferred_name() const;
  37. virtual bool is_incomplete() const;
  38. virtual void output_instance(ostream &out, int indent_level,
  39. CPPScope *scope,
  40. bool complete, const string &prename,
  41. const string &name) const;
  42. virtual void output(ostream &out, int indent_level, CPPScope *scope,
  43. bool complete) const;
  44. virtual SubType get_subtype() const;
  45. virtual CPPType *as_type();
  46. virtual CPPSimpleType *as_simple_type();
  47. virtual CPPPointerType *as_pointer_type();
  48. virtual CPPReferenceType *as_reference_type();
  49. virtual CPPArrayType *as_array_type();
  50. virtual CPPConstType *as_const_type();
  51. virtual CPPFunctionType *as_function_type();
  52. virtual CPPExtensionType *as_extension_type();
  53. virtual CPPStructType *as_struct_type();
  54. virtual CPPEnumType *as_enum_type();
  55. virtual CPPTBDType *as_tbd_type();
  56. virtual CPPTypedefType *as_typedef_type();
  57. virtual CPPTypeProxy *as_type_proxy();
  58. CPPType *_actual_type;
  59. };
  60. #endif