cppArrayType.h 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. // Filename: cppArrayType.h
  2. // Created by: drose (19Oct99)
  3. //
  4. ////////////////////////////////////////////////////////////////////
  5. //
  6. // PANDA 3D SOFTWARE
  7. // Copyright (c) 2001, Disney Enterprises, Inc. All rights reserved
  8. //
  9. // All use of this software is subject to the terms of the Panda 3d
  10. // Software license. You should have received a copy of this license
  11. // along with this source code; you will also find a current copy of
  12. // the license at http://www.panda3d.org/license.txt .
  13. //
  14. // To contact the maintainers of this program write to
  15. // [email protected] .
  16. //
  17. ////////////////////////////////////////////////////////////////////
  18. #ifndef CPPARRAYTYPE_H
  19. #define CPPARRAYTYPE_H
  20. #include <dtoolbase.h>
  21. #include "cppType.h"
  22. class CPPExpression;
  23. ///////////////////////////////////////////////////////////////////
  24. // Class : CPPArrayType
  25. // Description :
  26. ////////////////////////////////////////////////////////////////////
  27. class CPPArrayType : public CPPType {
  28. public:
  29. CPPArrayType(CPPType *element_type, CPPExpression *bounds);
  30. CPPType *_element_type;
  31. CPPExpression *_bounds;
  32. virtual bool is_fully_specified() const;
  33. virtual CPPDeclaration *substitute_decl(SubstDecl &subst,
  34. CPPScope *current_scope,
  35. CPPScope *global_scope);
  36. virtual CPPType *resolve_type(CPPScope *current_scope,
  37. CPPScope *global_scope);
  38. virtual bool is_tbd() const;
  39. virtual bool is_equivalent(const CPPType &other) const;
  40. virtual void output(ostream &out, int indent_level, CPPScope *scope,
  41. bool complete) const;
  42. virtual void output_instance(ostream &out, int indent_level,
  43. CPPScope *scope,
  44. bool complete, const string &prename,
  45. const string &name) const;
  46. virtual SubType get_subtype() const;
  47. virtual CPPArrayType *as_array_type();
  48. protected:
  49. virtual bool is_equal(const CPPDeclaration *other) const;
  50. virtual bool is_less(const CPPDeclaration *other) const;
  51. };
  52. #endif