cppArrayType.h 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  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_equivalent(const CPPType &other) const;
  36. virtual void output(ostream &out, int indent_level, CPPScope *scope,
  37. bool complete) 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 SubType get_subtype() const;
  43. virtual CPPArrayType *as_array_type();
  44. protected:
  45. virtual bool is_equal(const CPPDeclaration *other) const;
  46. virtual bool is_less(const CPPDeclaration *other) const;
  47. };
  48. #endif