cppTypeProxy.h 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. // Filename: cppTypeProxy.h
  2. // Created by: drose (07Dec99)
  3. //
  4. ////////////////////////////////////////////////////////////////////
  5. //
  6. // PANDA 3D SOFTWARE
  7. // Copyright (c) 2001, Disney Enterprises, Inc. All rights reserved
  8. //
  9. // All use of this software is subject to the terms of the Panda 3d
  10. // Software license. You should have received a copy of this license
  11. // along with this source code; you will also find a current copy of
  12. // the license at http://www.panda3d.org/license.txt .
  13. //
  14. // To contact the maintainers of this program write to
  15. // [email protected] .
  16. //
  17. ////////////////////////////////////////////////////////////////////
  18. #ifndef CPPTYPEPROXY_H
  19. #define CPPTYPEPROXY_H
  20. #include <dtoolbase.h>
  21. #include "cppType.h"
  22. ///////////////////////////////////////////////////////////////////
  23. // Class : CPPTypeProxy
  24. // Description : This is a special kind of type that is a placeholder
  25. // for some type, currently unknown, that will be filled
  26. // in later. It's used when a type that references
  27. // itself must instantiate.
  28. ////////////////////////////////////////////////////////////////////
  29. class CPPTypeProxy : public CPPType {
  30. public:
  31. CPPTypeProxy();
  32. virtual CPPType *resolve_type(CPPScope *current_scope,
  33. CPPScope *global_scope);
  34. virtual bool is_tbd() const;
  35. bool has_typedef_name() const;
  36. string get_typedef_name(CPPScope *scope = NULL) const;
  37. virtual string get_simple_name() const;
  38. virtual string get_local_name(CPPScope *scope = NULL) const;
  39. virtual string get_fully_scoped_name() const;
  40. virtual string get_preferred_name() const;
  41. virtual bool is_incomplete() const;
  42. virtual void output_instance(ostream &out, int indent_level,
  43. CPPScope *scope,
  44. bool complete, const string &prename,
  45. const string &name) const;
  46. virtual void output(ostream &out, int indent_level, CPPScope *scope,
  47. bool complete) const;
  48. virtual SubType get_subtype() const;
  49. virtual CPPType *as_type();
  50. virtual CPPSimpleType *as_simple_type();
  51. virtual CPPPointerType *as_pointer_type();
  52. virtual CPPReferenceType *as_reference_type();
  53. virtual CPPArrayType *as_array_type();
  54. virtual CPPConstType *as_const_type();
  55. virtual CPPFunctionType *as_function_type();
  56. virtual CPPExtensionType *as_extension_type();
  57. virtual CPPStructType *as_struct_type();
  58. virtual CPPEnumType *as_enum_type();
  59. virtual CPPTBDType *as_tbd_type();
  60. virtual CPPTypeProxy *as_type_proxy();
  61. CPPType *_actual_type;
  62. };
  63. #endif