![]() |
VR-Forces 4.0.4 Class Documentation
|
00001 /****************************************************************************** 00002 ** Copyright (c) 2008 MAK Technologies, Inc. 00003 ** All rights reserved. 00004 ******************************************************************************/ 00005 /****************************************************************************** 00006 ** $RCSfile: DtSurfacesSettings.h,v $ $Revision: 1.14 $ $State: Exp $ 00007 ******************************************************************************/ 00008 00012 00013 #ifndef DtSurfacesSettings_H_ 00014 #define DtSurfacesSettings_H_ 00015 00016 #include <vrvCore/vrvCore.h> 00017 #include <vrvUtil/signalslib.h> 00018 #include <makArchives/DtSurfaceSettingsRecord.h> 00019 #include <map> 00020 #include <string> 00021 #include <vector> 00022 00023 namespace makVrv 00024 { 00027 class DT_DLL_VRVCORE DtSurfacesSettings 00028 { 00029 public: 00030 00032 typedef std::vector<int> SurfaceIdList; 00033 00036 class SurfaceDefinition 00037 { 00038 public: 00039 SurfaceDefinition(const std::string& regExp, int id) 00040 : myId(id) 00041 , myRegExp(regExp) 00042 {} 00043 00044 std::string myRegExp; 00045 int myId; 00046 }; 00047 00049 DtSurfacesSettings(); 00050 00052 ~DtSurfacesSettings(); 00053 00055 DtSurfacesSettings(DtSurfacesSettings const &); 00056 00058 DtSurfacesSettings& operator=(DtSurfacesSettings const& obj); 00059 00061 void getRecord(makArchives::DtSurfaceSettingsRecord& rec) const; 00062 00064 void setFromRecord(const makArchives::DtSurfaceSettingsRecord& rec); 00065 00067 void setSurfaceVisible(int surfaceId, bool state); 00068 00070 bool surfaceVisible(int surfaceId); 00071 00073 SurfaceIdList const& surfaceIds(); 00074 00076 SurfaceDefinition* findSurfaceDefinition(int id); 00077 00079 bool isLoaded(); 00080 00081 protected: 00082 00083 makArchives::DtSurfaceSettingsRecord::SurfaceVisibleMap mySurfaceVisibleMap; 00084 00086 typedef std::vector<SurfaceDefinition> SurfaceDefinitionList; 00087 std::vector<SurfaceDefinition> mySurfaceDefinitions; 00088 00089 SurfaceIdList mySurfaceIds; 00090 00091 bool myIsLoaded; 00092 }; 00093 } 00094 00095 #endif