00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015 #ifndef INTERROGATEELEMENT_H
00016 #define INTERROGATEELEMENT_H
00017
00018 #include "dtoolbase.h"
00019
00020 #include "interrogateComponent.h"
00021
00022 class IndexRemapper;
00023
00024
00025
00026
00027
00028
00029 class EXPCL_DTOOLCONFIG InterrogateElement : public InterrogateComponent {
00030 public:
00031 INLINE InterrogateElement(InterrogateModuleDef *def = NULL);
00032 INLINE InterrogateElement(const InterrogateElement ©);
00033 INLINE void operator = (const InterrogateElement ©);
00034
00035 INLINE bool is_global() const;
00036
00037 INLINE bool has_scoped_name() const;
00038 INLINE const string &get_scoped_name() const;
00039
00040 INLINE TypeIndex get_type() const;
00041 INLINE bool has_getter() const;
00042 INLINE FunctionIndex get_getter() const;
00043 INLINE bool has_setter() const;
00044 INLINE FunctionIndex get_setter() const;
00045
00046 void output(ostream &out) const;
00047 void input(istream &in);
00048
00049 void remap_indices(const IndexRemapper &remap);
00050
00051 private:
00052 enum Flags {
00053 F_global = 0x0001,
00054 F_has_getter = 0x0002,
00055 F_has_setter = 0x0004
00056 };
00057
00058 int _flags;
00059 string _scoped_name;
00060 TypeIndex _type;
00061 FunctionIndex _getter;
00062 FunctionIndex _setter;
00063
00064 friend class InterrogateBuilder;
00065 };
00066
00067 INLINE ostream &operator << (ostream &out, const InterrogateElement &element);
00068 INLINE istream &operator >> (istream &in, InterrogateElement &element);
00069
00070 #include "interrogateElement.I"
00071
00072 #endif