cppArrayType.h 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  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 cppArrayType.h
  10. * @author drose
  11. * @date 1999-10-19
  12. */
  13. #ifndef CPPARRAYTYPE_H
  14. #define CPPARRAYTYPE_H
  15. #include "dtoolbase.h"
  16. #include "cppType.h"
  17. class CPPExpression;
  18. /**
  19. *
  20. */
  21. class CPPArrayType : public CPPType {
  22. public:
  23. CPPArrayType(CPPType *element_type, CPPExpression *bounds);
  24. CPPType *_element_type;
  25. CPPExpression *_bounds;
  26. virtual bool is_fully_specified() const;
  27. virtual CPPDeclaration *substitute_decl(SubstDecl &subst,
  28. CPPScope *current_scope,
  29. CPPScope *global_scope);
  30. virtual CPPType *resolve_type(CPPScope *current_scope,
  31. CPPScope *global_scope);
  32. virtual bool is_tbd() const;
  33. virtual bool is_standard_layout() const;
  34. virtual bool is_trivial() const;
  35. virtual bool is_default_constructible() const;
  36. virtual bool is_copy_constructible() const;
  37. virtual bool is_copy_assignable() const;
  38. virtual bool is_equivalent(const CPPType &other) const;
  39. virtual void output(std::ostream &out, int indent_level, CPPScope *scope,
  40. bool complete) const;
  41. virtual void output_instance(std::ostream &out, int indent_level,
  42. CPPScope *scope,
  43. bool complete, const std::string &prename,
  44. const std::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