cppArrayType.h 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  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_equivalent(const CPPType &other) const;
  37. virtual void output(ostream &out, int indent_level, CPPScope *scope,
  38. bool complete) const;
  39. virtual void output_instance(ostream &out, int indent_level,
  40. CPPScope *scope,
  41. bool complete, const string &prename,
  42. const string &name) const;
  43. virtual SubType get_subtype() const;
  44. virtual CPPArrayType *as_array_type();
  45. protected:
  46. virtual bool is_equal(const CPPDeclaration *other) const;
  47. virtual bool is_less(const CPPDeclaration *other) const;
  48. };
  49. #endif