cppArrayType.h 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. // Filename: cppArrayType.h
  2. // Created by: drose (19Oct99)
  3. //
  4. ////////////////////////////////////////////////////////////////////
  5. #ifndef CPPARRAYTYPE_H
  6. #define CPPARRAYTYPE_H
  7. #include <dtoolbase.h>
  8. #include "cppType.h"
  9. class CPPExpression;
  10. ///////////////////////////////////////////////////////////////////
  11. // Class : CPPArrayType
  12. // Description :
  13. ////////////////////////////////////////////////////////////////////
  14. class CPPArrayType : public CPPType {
  15. public:
  16. CPPArrayType(CPPType *element_type, CPPExpression *bounds);
  17. CPPType *_element_type;
  18. CPPExpression *_bounds;
  19. virtual bool is_fully_specified() const;
  20. virtual CPPDeclaration *substitute_decl(SubstDecl &subst,
  21. CPPScope *current_scope,
  22. CPPScope *global_scope);
  23. virtual CPPType *resolve_type(CPPScope *current_scope,
  24. CPPScope *global_scope);
  25. virtual bool is_tbd() const;
  26. virtual bool is_equivalent(const CPPType &other) const;
  27. virtual void output(ostream &out, int indent_level, CPPScope *scope,
  28. bool complete) const;
  29. virtual void output_instance(ostream &out, int indent_level,
  30. CPPScope *scope,
  31. bool complete, const string &prename,
  32. const string &name) const;
  33. virtual SubType get_subtype() const;
  34. virtual CPPArrayType *as_array_type();
  35. protected:
  36. virtual bool is_equal(const CPPDeclaration *other) const;
  37. virtual bool is_less(const CPPDeclaration *other) const;
  38. };
  39. #endif