00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015 #ifndef TYPEDOBJECT_H
00016 #define TYPEDOBJECT_H
00017
00018 #include "dtoolbase.h"
00019
00020 #include "typeHandle.h"
00021 #include "register_type.h"
00022 #include "memoryBase.h"
00023
00024 #include <set>
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042
00043
00044
00045
00046
00047
00048
00049
00050
00051
00052
00053
00054
00055
00056
00057
00058
00059
00060
00061
00062
00063
00064
00065
00066
00067
00068
00069
00070
00071
00072
00073
00074
00075
00076
00077
00078
00079
00080
00081
00082
00083
00084
00085
00086
00087
00088
00089
00090
00091
00092
00093
00094
00095
00096
00097
00098 class EXPCL_DTOOL TypedObject : public MemoryBase {
00099 public:
00100 INLINE TypedObject();
00101 INLINE TypedObject(const TypedObject ©);
00102 INLINE void operator = (const TypedObject ©);
00103
00104 PUBLISHED:
00105
00106 virtual ~TypedObject();
00107
00108
00109
00110 virtual TypeHandle get_type() const=0;
00111
00112 INLINE int get_type_index() const;
00113 INLINE bool is_of_type(TypeHandle handle) const;
00114 INLINE bool is_exact_type(TypeHandle handle) const;
00115
00116 public:
00117 INLINE int get_best_parent_from_Set(const std::set<int> &) const;
00118
00119
00120
00121
00122 virtual TypeHandle force_init_type()=0;
00123
00124
00125
00126
00127
00128
00129
00130 INLINE TypedObject *as_typed_object();
00131 INLINE const TypedObject *as_typed_object() const;
00132
00133 public:
00134 static TypeHandle get_class_type() {
00135 return _type_handle;
00136 }
00137 static void init_type();
00138
00139 private:
00140 static TypeHandle _type_handle;
00141 };
00142
00143 #include "typedObject.I"
00144
00145 #endif