cppArrayType.h 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. // Filename: cppArrayType.h
  2. // Created by: drose (19Oct99)
  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 CPPARRAYTYPE_H
  15. #define CPPARRAYTYPE_H
  16. #include "dtoolbase.h"
  17. #include "cppType.h"
  18. class CPPExpression;
  19. ///////////////////////////////////////////////////////////////////
  20. // Class : CPPArrayType
  21. // Description :
  22. ////////////////////////////////////////////////////////////////////
  23. class CPPArrayType : public CPPType {
  24. public:
  25. CPPArrayType(CPPType *element_type, CPPExpression *bounds);
  26. CPPType *_element_type;
  27. CPPExpression *_bounds;
  28. virtual bool is_fully_specified() const;
  29. virtual CPPDeclaration *substitute_decl(SubstDecl &subst,
  30. CPPScope *current_scope,
  31. CPPScope *global_scope);
  32. virtual CPPType *resolve_type(CPPScope *current_scope,
  33. CPPScope *global_scope);
  34. virtual bool is_tbd() const;
  35. virtual bool is_trivial() const;
  36. virtual bool is_default_constructible() const;
  37. virtual bool is_copy_constructible() const;
  38. virtual bool is_equivalent(const CPPType &other) const;
  39. virtual void output(ostream &out, int indent_level, CPPScope *scope,
  40. bool complete) const;
  41. virtual void output_instance(ostream &out, int indent_level,
  42. CPPScope *scope,
  43. bool complete, const string &prename,
  44. const string &name) const;
  45. virtual SubType get_subtype() const;
  46. virtual CPPArrayType *as_array_type();
  47. protected:
  48. virtual bool is_equal(const CPPDeclaration *other) const;
  49. virtual bool is_less(const CPPDeclaration *other) const;
  50. };
  51. #endif