Version: 0.6.0
gxremoteservers.h
1 /******************************************************************************
2  * Project: wxGIS (GIS Remote)
3  * Purpose: wxGxRemoteServers class.
4  * Author: Baryshnikov Dmitriy (aka Bishop), polimax@mail.ru
5  ******************************************************************************
6 * Copyright (C) 2010-2012 Bishop
7 *
8 * This program is free software: you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation, either version 2 of the License, or
11 * (at your option) any later version.
12 *
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
17 *
18 * You should have received a copy of the GNU General Public License
19 * along with this program. If not, see <http://www.gnu.org/licenses/>.
20  ****************************************************************************/
21 
22 #pragma once
23 
24 #include "wxgis/catalog/catalog.h"
25 #include "wxgis/catalog/gxobject.h"
26 #include "wxgis/net/netfactory.h"
27 #include "wxgis/catalog/gxxmlconnstor.h"
28 
29 #define RCONNCONF wxT("rconn.xml")
30 
34 class WXDLLIMPEXP_GIS_RS wxGxRemoteServers :
37 {
38  DECLARE_DYNAMIC_CLASS(wxGxRemoteServers)
39 public:
40  wxGxRemoteServers(void);
41  virtual ~wxGxRemoteServers(void);
42  virtual bool IsUniqName(const wxString & sName);
43  virtual bool StoreConnectionProperties(const wxXmlNode* pConnProp);
44  //wxGxObject
45  virtual bool Create(wxGxObject *oParent = NULL, const wxString &soName = wxEmptyString, const CPLString &soPath = "");
46  virtual bool Destroy(void);
47  virtual wxString GetBaseName(void) const {return GetName();};
48  virtual wxString GetFullName(void) const {return wxEmptyString;};
49  virtual wxString GetCategory(void) const {return wxString(_("Remote Servers"));};
50  virtual void Refresh(void);
51  //wxGxObjectContainer
52  virtual bool AreChildrenViewable(void){return true;};
53  //IGxRootObjectProperties
54  virtual void Init(wxXmlNode* const pConfigNode);
55  virtual void Serialize(wxXmlNode* const pConfigNode);
56 protected:
57  //wxGxXMLConnectionStorage
58  virtual bool IsObjectExist(wxGxObject* pObj, const wxXmlNode* pNode);
59  virtual void CreateConnectionsStorage(void);
60  virtual wxGxObject* CreateChildGxObject(const wxXmlNode* pNode);
61  //
62  virtual void LoadFactories(wxXmlNode* pConf);
63 protected:
64  bool m_bIsChildrenLoaded;
65  wxString m_sUserConfigDir;
66  wxFileSystemWatcher *m_pWatcher;
67  wxNetConnFactoryArray m_apNetConnFact;
68 private:
69  DECLARE_EVENT_TABLE()
70  /*
71  //IGxObjectContainer
72  virtual bool DeleteChild(IGxObject* pChild);
73  virtual bool AreChildrenViewable(void){return true;};
74  virtual bool HasChildren(void){return m_Children.size() > 0 ? true : false;};
75  //wxGxRemoteServers
76 protected:
77  //wxGxRemoteServers
78  virtual void LoadChildren();
79  virtual void EmptyChildren(void);
80  virtual void UnLoadFactories(void);
81  virtual void StoreConnections(void);
82 
83 protected:
84  NETCONNFACTORYARRAY m_apNetConnFact;
85  bool m_bIsChildrenLoaded;
86  wxString m_sUserConfig;
87  wxString m_sUserConfigDir;*/
88 };
A Remote Servers GxRootObject.
Definition: gxremoteservers.h:34
Definition: catalog.h:72
Definition: gxobject.h:37