00001 
00002 
00003 
00004 
00005 
00006 
00007 
00008 
00009 
00010 
00011 
00012 
00013 
00014 
00015 
00016 
00017 
00018 
00019 #ifndef CPPARRAYTYPE_H
00020 #define CPPARRAYTYPE_H
00021 
00022 #include <dtoolbase.h>
00023 
00024 #include "cppType.h"
00025 
00026 class CPPExpression;
00027 
00028 
00029 
00030 
00031 
00032 class CPPArrayType : public CPPType {
00033 public:
00034   CPPArrayType(CPPType *element_type, CPPExpression *bounds);
00035 
00036   CPPType *_element_type;
00037   CPPExpression *_bounds;
00038 
00039   virtual bool is_fully_specified() const;
00040   virtual CPPDeclaration *substitute_decl(SubstDecl &subst,
00041                                           CPPScope *current_scope,
00042                                           CPPScope *global_scope);
00043 
00044   virtual CPPType *resolve_type(CPPScope *current_scope,
00045                                 CPPScope *global_scope);
00046   virtual bool is_tbd() const;
00047   virtual bool is_equivalent(const CPPType &other) const;
00048 
00049   virtual void output(ostream &out, int indent_level, CPPScope *scope,
00050                       bool complete) const;
00051   virtual void output_instance(ostream &out, int indent_level,
00052                                CPPScope *scope,
00053                                bool complete, const string &prename,
00054                                const string &name) const;
00055 
00056   virtual SubType get_subtype() const;
00057 
00058   virtual CPPArrayType *as_array_type();
00059 
00060 protected:
00061   virtual bool is_equal(const CPPDeclaration *other) const;
00062   virtual bool is_less(const CPPDeclaration *other) const;
00063 };
00064 
00065 #endif