00001
00093 #ifndef INC_MGUI_DLGGETOBJECTITEM_H
00094 #define INC_MGUI_DLGGETOBJECTITEM_H
00095
00096 #ifndef INC_MGUI_DLGGETOBJECTDLG_H
00097 #include <mgui/dlggetobjectdlg.h>
00098 #endif
00099
00100 #ifndef INC_MI32_SPATREF_H
00101 #include <mi32/spatref.h>
00102 #endif
00103
00104 #ifndef INC_MI32_DATETIME_H
00105 #include <mi32/datetime.h>
00106 #endif
00107
00108 #ifndef INC_MI32_ELEMTYPE_H
00109 #include <mi32/elemtype.h>
00110 #endif
00111
00112
00113 #ifndef GENERATING_DOXYGEN_OUTPUT
00114 class XMLNODE;
00115 namespace RVC {
00116 class GEOMETRIC;
00117 }
00118 #endif
00119
00120 namespace MGUI {
00121
00122
00123
00124 class DLG_GETOBJECT::ITEM {
00125 public:
00126 typedef fastdelegate::FastDelegate<ERRVALUE(ITEM&)> DELEGATE_ONLOADWEBLAYERS;
00127
00128 enum TYPE {
00129 TYPE_Invalid,
00130 TYPE_Computer,
00131 TYPE_NetRoot,
00132 TYPE_NetServer,
00133 TYPE_NetShare,
00134 TYPE_Volume,
00135 TYPE_Folder,
00136 TYPE_File,
00137 TYPE_RVC_File,
00138 TYPE_RVC_Folder,
00139 TYPE_RVC_Object,
00140 TYPE_WebLayerGroup,
00141 TYPE_RemoteTileset,
00142 TYPE_RemoteKML,
00143 TYPE_MyMaps,
00144 TYPE_WMS,
00145 TYPE_ArcIMS,
00146 TYPE_Geomashup,
00147 TYPE_TerrainTileset,
00148 TYPE_COUNT
00149 };
00150
00151 enum OBJECTSTATE {
00152 OBJECTSTATE_Unknown = 0,
00153 OBJECTSTATE_Valid = 1,
00154 OBJECTSTATE_IsInvalidChild,
00155 OBJECTSTATE_HasInvalidChild,
00156 OBJECTSTATE_IsInvalidSingleton,
00157 OBJECTSTATE_HasInvalidSingleton,
00158 OBJECTSTATE_ObjectHasUnlocatableLink,
00159 OBJECTSTATE_ChildHasUnlocatableLink,
00160 OBJECTSTATE_IsOutdatedChild,
00161 OBJECTSTATE_HasOutdatedChild,
00162 };
00163
00164
00165 ITEM ();
00166
00167
00168 ITEM (const ITEM& rhs);
00169
00170
00171 ITEM (const MISTRING& name, TYPE type);
00172
00173
00174 ITEM (const MISTRING& name, RVC::OBJTYPE rvctype);
00175
00176
00177 ITEM (const FILEPATH& filepath, TYPE type, bool IsSelectable);
00178
00179
00180 ITEM (const MISTRING& name, const FILEPATH& filepath, TYPE type);
00181
00182
00183 ITEM (const RVC::OBJITEM& objitem, bool IsBrowsable = false, bool IsSelectable = false);
00184
00185
00186 ITEM (const MISTRING& name, const RVC::OBJITEM& objitem, bool IsBrowsable = false, bool IsSelectable = false);
00187
00188
00189 ITEM (const MINETRES& netres);
00190
00191
00192 ITEM (const MISTRING& name, const MISTRING& location, TYPE type);
00193
00194
00195 ITEM (XMLNODE* node);
00196
00197
00198 ~ITEM ();
00199
00200
00201 ITEM& operator= (
00202 const ITEM& rhs
00203 );
00204
00205
00206 bool operator== (
00207 const DLG_GETOBJECT::ITEM& rhs
00208 ) const { return (IsEqual(rhs)); }
00209
00210
00211 bool operator!= (
00212 const DLG_GETOBJECT::ITEM& rhs
00213 ) { return (!IsEqual(rhs)); }
00214
00215
00216 ERRVALUE BuildNetItemList (
00217 ITEMLIST& ItemList
00218 ) const;
00219
00221 const SPATREF::COORDREFSYS& GetCoordRefSys (
00222 ) const {return m_CRS;}
00223
00225 const MISTRING& GetDescription (
00226 ) const { return (m_description); }
00227
00229 const MISTRING& GetDimensionString (
00230 ) const { return (m_DimensionString); }
00231
00233 INT64 GetDimensionValue (
00234 ) const { return (m_DimensionValue); }
00235
00237 const DRECT3D& GetExtentInCRS (
00238 ) const {return m_ExtentInCRS;}
00239
00241 ICONID GetIconID (
00242 ) const;
00243
00244 const FILEPATH& GetFilePath (
00245 ) const { return (m_pObjItem->GetFilePath()); }
00246
00247
00248 const MISTRING& GetName (
00249 ) const;
00250
00251
00252 void GetDisplayLocation (
00253 MISTRING& location,
00254 bool bStripToFolder = true
00255 ) const;
00256
00257
00258 const MISTRING& GetLocation (
00259 ) const {return (m_location); }
00260
00261 MINETRES* GetNetRes (
00262 ) const { return (m_pNetRes); }
00263
00264 XMLNODE* GetNode (
00265 bool bLoadIfNeeded = true
00266 );
00267
00268
00269 OBJECTSTATE GetObjectState (
00270 ) const;
00271
00272
00273
00274 const RVC::OBJITEM* GetObjItem (
00275 ) const { return (m_pObjItem); }
00276
00277
00278 RVC::OBJITEM& GetObjItemToChange (
00279 ) { return (*m_pObjItem); }
00280
00281 INT32 GetOrder (
00282 ) const { return (m_order); }
00283
00284 const DPOINT3D& GetResolutionInCRS (
00285 ) const { return (m_ResolutionInCRS); }
00286
00287 RVC::OBJTYPE GetRVCType (
00288 ) const { return (m_rvctype); }
00289
00290
00291 const RVC::OBJECTNAME& GetShortName (
00292 ) const;
00293
00294 INT64 GetSizeInBytes (
00295 ) const { return (m_SizeInBytes); }
00296
00297 INT32 GetSubType (
00298 ) const { return (m_subtype); }
00299
00300
00301 const DATETIME& GetTimeCreated (
00302 ) const { return (m_TimeCreated); }
00303
00304
00305 const DATETIME& GetTimeModified (
00306 ) const { return (m_TimeModified); }
00307
00308
00309 TYPE GetType (
00310 ) const { return (m_type); }
00311
00312 bool IsBrowsable (
00313 ) const { return (m_IsBrowsable); }
00314
00315 bool IsEqual (
00316 const ITEM& rhs
00317 ) const;
00318
00319 bool IsSelectable (
00320 ) const { return (m_IsSelectable); }
00321
00322 void ResetExtValues (
00323 ) { m_ExtValuesValid = EXTVALUE_None; }
00324
00325 void SetDelegateOnLoadWebLayers (
00326 DELEGATE_ONLOADWEBLAYERS delegate
00327 ) { m_DelegateOnLoadWebLayers = delegate; }
00328
00329 void SetCRS (const SPATREF::COORDREFSYS& crs) {m_CRS = crs;}
00330
00331 void SetExtentInCRS (const DRECT2D& extents) { m_ExtentInCRS = extents;}
00332
00333
00334 void SetName (const MISTRING& name);
00335
00336 void SetNode (XMLNODE* node) { m_node = node; }
00337
00338 void SetSelectable (bool IsSelectable) { m_IsSelectable = IsSelectable; }
00339
00340 void SetupExtValues (EXTVALUES ExtValues);
00341
00343 bool GetINIString (MISTRING& inistring) const;
00344
00346 bool SetFromINIString (const MISTRING& inistring);
00347
00348 protected:
00349
00350 void SetFilePath (
00351 const FILEPATH& filepath
00352 );
00353
00354 private:
00355 #ifndef GENERATING_DOXYGEN_OUTPUT
00356 MISTRING m_name;
00357 MISTRING m_location;
00358 MISTRING m_description;
00359 TYPE m_type;
00360 RVC::OBJTYPE m_rvctype;
00361 INT32 m_subtype;
00362 bool m_IsBrowsable;
00363 bool m_IsSelectable;
00364 UINT32 m_ExtValuesValid;
00365 RVC::OBJITEM *m_pObjItem;
00366 mutable MINETRES *m_pNetRes;
00367 mutable OBJECTSTATE m_ObjectState;
00368 XMLNODE* m_node;
00369 INT32 m_order;
00370 DATETIME m_TimeCreated;
00371 DATETIME m_TimeModified;
00372 INT64 m_SizeInBytes;
00373 INT64 m_DimensionValue;
00374 MISTRING m_DimensionString;
00375 SPATREF::COORDREFSYS m_CRS;
00376 DRECT3D m_ExtentInCRS;
00377 DPOINT3D m_ResolutionInCRS;
00378 DELEGATE_ONLOADWEBLAYERS m_DelegateOnLoadWebLayers;
00379
00380 ELEMTYPE AddDimensionElemCount (RVC::GEOMETRIC& ObjGeometric, ELEMTYPE ElemType, ELEMTYPE PrevType);
00381
00382 void SetDescription (const MISTRING& description);
00383 #endif
00384 };
00385
00386
00387
00388 }
00389
00390 #endif // INC_MGUI_DLGGETOBJECTITEM_H