00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019 #ifndef CPPSIMPLETYPE_H
00020 #define CPPSIMPLETYPE_H
00021
00022 #include <dtoolbase.h>
00023
00024 #include "cppType.h"
00025
00026
00027
00028
00029
00030 class CPPSimpleType : public CPPType {
00031 public:
00032 enum Type {
00033 T_bool,
00034 T_char,
00035 T_int,
00036 T_float,
00037 T_double,
00038 T_void,
00039 T_unknown,
00040 };
00041
00042 enum Flags {
00043 F_long = 0x001,
00044 F_longlong = 0x002,
00045 F_short = 0x004,
00046 F_unsigned = 0x008,
00047 F_signed = 0x010,
00048 };
00049
00050 CPPSimpleType(Type type, int flags = 0);
00051
00052 Type _type;
00053 int _flags;
00054
00055 virtual bool is_tbd() const;
00056
00057 virtual string get_preferred_name() const;
00058
00059 virtual void output(ostream &out, int indent_level, CPPScope *scope,
00060 bool complete) const;
00061 virtual SubType get_subtype() const;
00062
00063 virtual CPPSimpleType *as_simple_type();
00064
00065 protected:
00066 virtual bool is_equal(const CPPDeclaration *other) const;
00067 virtual bool is_less(const CPPDeclaration *other) const;
00068 };
00069
00070 #endif