00001 #ifndef ComObjectH
00002 #define ComObjectH
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00041
00042
00043 #include "CoreMainHeader.h"
00044 #include "TemplList.h"
00045 #include "Plugins.h"
00046 #include "ExtendedUUID.h"
00047 #include "SimpleList.h"
00048
00049
00050
00051 class CPluginObjectDescription;
00052
00053 class CVisObject;
00054
00055
00056
00058
00061 class NEMESIS_CORE_PACKAGE CComObject : public CObject{
00062 public:
00063
00064
00065
00066 __fastcall CComObject(CComObject* owner,CPluginObjectInfo* objectinfo);
00067 __fastcall CComObject(CComObject* owner,CPluginObjectInfo* objectinfo,const CSmallString& name);
00068 __fastcall CComObject(CVisObject* owner,CPluginObjectInfo* objectinfo);
00069 __fastcall CComObject(CVisObject* owner,CPluginObjectInfo* objectinfo,const CSmallString& name);
00070
00071 virtual __fastcall ~CComObject(void);
00072
00073
00074
00075
00076
00077 inline void __fastcall SetName(const CSmallString& name);
00078 inline const CSmallString& __fastcall GetName(void) const;
00079
00080
00081 inline void __fastcall SetDescription(const CSmallString& name);
00082 inline const CSmallString& __fastcall GetDescription(void) const;
00083
00084
00085 inline const CExtUUID& __fastcall GetType(void) const;
00086 inline const CExtUUID& __fastcall GetCategory(void) const;
00087 inline CPluginObjectInfo* __fastcall GetPluginObjectInfo(void) const;
00088
00089
00090
00091 virtual int __fastcall GetImageIndex(void) const;
00092
00093
00094 inline const CSmallString __fastcall GetLocaleString(const CSmallString& univalue);
00095
00096
00097 inline CComObject* __fastcall GetComOwner(void);
00098 void __fastcall SetOwner(CComObject* owner);
00099 void __fastcall SetOwner(CVisObject* owner);
00100
00101
00102
00103 public:
00104 virtual void __fastcall SetIndex(int index);
00105 virtual int __fastcall GetIndex(void) const;
00106
00107 private:
00108 CPluginObjectInfo* ObjectInfo;
00109 int UIndex;
00110 CSmallString Name;
00111 CSmallString Description;
00112
00113
00114 CSimpleList<CComObject> ComObjects;
00115 CSimpleList<CVisObject> VisObjects;
00116 CComObject* ComOwner;
00117 CVisObject* VisOwner;
00118 friend class CVisObject;
00119 };
00120
00121
00122
00123 inline void __fastcall CComObject::SetName(const CSmallString& name)
00124 {
00125 Name = name;
00126 }
00127
00128
00129
00130 inline const CSmallString& __fastcall CComObject::GetName(void) const
00131 {
00132 return(Name);
00133 }
00134
00135
00136
00137 inline void __fastcall CComObject::SetDescription(const CSmallString& descrip)
00138 {
00139 Description = descrip;
00140 }
00141
00142
00143
00144 inline const CSmallString& __fastcall CComObject::GetDescription(void) const
00145 {
00146 return(Description);
00147 }
00148
00149
00150
00151 inline CPluginObjectInfo* __fastcall CComObject::GetPluginObjectInfo(void) const
00152 {
00153 return(ObjectInfo);
00154 }
00155
00156
00157
00158 inline const CExtUUID& __fastcall CComObject::GetType(void) const
00159 {
00160 static CExtUUID uuid;
00161 if( ObjectInfo == NULL ) return(uuid);
00162 return(ObjectInfo->GetObjectUUID());
00163 }
00164
00165
00166
00167 inline const CExtUUID& __fastcall CComObject::GetCategory(void) const
00168 {
00169 static CExtUUID uuid;
00170 if( ObjectInfo == NULL ) return(uuid);
00171 return(ObjectInfo->GetCategory());
00172 }
00173
00174
00175
00176 inline const CSmallString __fastcall CComObject::GetLocaleString(const CSmallString& univalue)
00177 {
00178 if( ObjectInfo == NULL ) return("");
00179 return(ObjectInfo->GetLocaleString(univalue));
00180 }
00181
00182
00183
00184 inline CComObject* __fastcall CComObject::GetComOwner(void)
00185 {
00186 return(ComOwner);
00187 }
00188
00189
00190
00191 #endif