00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019 #ifndef CPPEXTENSIONTYPE_H
00020 #define CPPEXTENSIONTYPE_H
00021
00022 #include <dtoolbase.h>
00023
00024 #include "cppType.h"
00025 #include "cppInstance.h"
00026
00027 class CPPScope;
00028 class CPPIdentifier;
00029
00030
00031
00032
00033
00034 class CPPExtensionType : public CPPType {
00035 public:
00036 enum Type {
00037 T_enum,
00038 T_class,
00039 T_struct,
00040 T_union,
00041 };
00042
00043 CPPExtensionType(Type type, CPPIdentifier *ident, CPPScope *current_scope,
00044 const CPPFile &file);
00045
00046 virtual string get_simple_name() const;
00047 virtual string get_local_name(CPPScope *scope = NULL) const;
00048 virtual string get_fully_scoped_name() const;
00049
00050 virtual bool is_incomplete() const;
00051 virtual bool is_tbd() const;
00052
00053 virtual CPPDeclaration *substitute_decl(SubstDecl &subst,
00054 CPPScope *current_scope,
00055 CPPScope *global_scope);
00056
00057 virtual bool is_equivalent(const CPPType &other) const;
00058
00059
00060 virtual void output(ostream &out, int indent_level, CPPScope *scope,
00061 bool complete) const;
00062 virtual SubType get_subtype() const;
00063
00064 virtual CPPExtensionType *as_extension_type();
00065
00066
00067 Type _type;
00068 CPPIdentifier *_ident;
00069 };
00070
00071 ostream &operator << (ostream &out, CPPExtensionType::Type type);
00072
00073 #endif