cppConstType.h 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. /**
  2. * PANDA 3D SOFTWARE
  3. * Copyright (c) Carnegie Mellon University. All rights reserved.
  4. *
  5. * All use of this software is subject to the terms of the revised BSD
  6. * license. You should have received a copy of this license along
  7. * with this source code in a file named "LICENSE."
  8. *
  9. * @file cppConstType.h
  10. * @author drose
  11. * @date 1999-10-28
  12. */
  13. #ifndef CPPCONSTTYPE_H
  14. #define CPPCONSTTYPE_H
  15. #include "dtoolbase.h"
  16. #include "cppType.h"
  17. /**
  18. *
  19. */
  20. class CPPConstType : public CPPType {
  21. public:
  22. CPPConstType(CPPType *wrapped_around);
  23. CPPType *_wrapped_around;
  24. virtual bool is_fully_specified() const;
  25. virtual CPPDeclaration *substitute_decl(SubstDecl &subst,
  26. CPPScope *current_scope,
  27. CPPScope *global_scope);
  28. virtual CPPType *resolve_type(CPPScope *current_scope,
  29. CPPScope *global_scope);
  30. virtual bool is_tbd() const;
  31. virtual bool is_fundamental() const;
  32. virtual bool is_standard_layout() const;
  33. virtual bool is_trivial() const;
  34. virtual bool is_constructible(const CPPType *type) const;
  35. virtual bool is_default_constructible() const;
  36. virtual bool is_copy_constructible() const;
  37. virtual bool is_destructible() const;
  38. virtual bool is_convertible_to(const CPPType *other) const;
  39. virtual bool is_equivalent(const CPPType &other) const;
  40. virtual void output(ostream &out, int indent_level, CPPScope *scope,
  41. bool complete) 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 SubType get_subtype() const;
  47. virtual CPPConstType *as_const_type();
  48. protected:
  49. virtual bool is_equal(const CPPDeclaration *other) const;
  50. virtual bool is_less(const CPPDeclaration *other) const;
  51. };
  52. #endif