![]() |
VR-Forces 4.0.4 Class Documentation
|
00001 /****************************************************************************** 00002 ** Copyright (c) 2007 MAK Technologies, Inc. 00003 ** All rights reserved. 00004 ******************************************************************************/ 00005 /****************************************************************************** 00006 ** $RCSfile: DtOsgEarthServerManager.h,v $ $Revision: 1.9 $ $State: Exp $ 00007 ******************************************************************************/ 00008 00012 00013 #ifndef DtOsgEarthServerManager_H_ 00014 #define DtOsgEarthServerManager_H_ 00015 00016 #include <vrvOsgEarthQt/vrvOsgEarthQt.h> 00017 #include <vrvUtil/DtVirtualBaseClass.h> 00018 00019 #include <map> 00020 #include <string> 00021 00022 namespace makVrv 00023 { 00024 class DtDe; 00025 class DtOsgEarthServerDescriptor; 00026 00029 class DT_DLL_VRVOSGEARTHQT DtOsgEarthServerManager : public DtVirtualBaseClass 00030 { 00031 00032 public: 00033 00035 typedef std::map<std::string, DtOsgEarthServerDescriptor*> ServerMap; 00036 00038 static DtOsgEarthServerManager& instance(DtDe& de); 00039 00041 virtual ~DtOsgEarthServerManager(); 00042 00044 virtual void loadServerDescriptors(); 00045 00048 virtual void addServer(DtOsgEarthServerDescriptor* server); 00049 00051 virtual bool deleteServer(const std::string& filename); 00052 00054 virtual void removeServer(const std::string& filename); 00055 00057 virtual bool copyServer(const std::string& name, const std::string& newName); 00058 00060 virtual bool renameServer(const std::string& oldname, const std::string& newName); 00061 00063 virtual bool updateServer(const std::string& name, const std::string& content); 00064 00066 virtual ServerMap& serverMap(); 00067 00068 boost::signal<void (const std::string&, const std::string&)> signal_renameServer; 00069 boost::signal<void (const std::string&)> signal_newServer; 00070 boost::signal<void (const std::string&)> signal_updateServer; 00071 boost::signal<void (const std::string&)> signal_deleteServer; 00072 00075 virtual void slot_onDePostInitialize(); 00076 00077 public: 00078 00079 std::string serversDirectory(); 00080 00081 protected: 00082 00084 DtOsgEarthServerManager(DtDe& de); 00085 00087 void clearServerMap(); 00088 00089 protected: 00090 00091 DtDe& myDe; 00092 ServerMap myServerMap; 00093 00094 }; 00095 } 00096 00097 #endif 00098