Version: 0.6.0
rxobjectserver.h
1 /******************************************************************************
2  * Project: wxGIS (GIS Server)
3  * Purpose: wxRxObjectContainer class.
4  * Author: Bishop (aka Barishnikov Dmitriy), 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 #pragma once
22 
23 #include "wxgis/net/netevent.h"
24 #include "wxgis/catalog/gxcatalog.h"
25 
30 class wxRxObject
31 {
32 public:
33  virtual ~wxRxObject(void){};
34  virtual void OnNetEvent(wxGISNetEvent& event) = 0;
35  virtual wxString GetClassName(void) const = 0;
36  //virtual wxXmlNode* GetXmlDescription(void) const = 0;
37  virtual wxXmlNode* GetXmlDescription(void) const {return NULL;};
38 };
39 
44 class WXDLLIMPEXP_GIS_FRW wxRxObjectContainer : public wxRxObject
45 {
46 public:
47  virtual ~wxRxObjectContainer(void);
48  virtual void SendChildren(const wxGxObjectList &Children, long nSourceId, int nNetClientId);
49 };
50 
54 class WXDLLIMPEXP_GIS_FRW wxRxCatalog :
55  public wxGxCatalog,
56  public wxRxObjectContainer,
57  public INetEventProcessor
58 {
59  wxDECLARE_DYNAMIC_CLASS_NO_COPY(wxRxCatalog);
60 public:
61  wxRxCatalog(wxGxObject *oParent = NULL, const wxString &soName = _("Catalog"), const CPLString &soPath = "");
62  virtual ~wxRxCatalog(void);
63  virtual wxString GetClassName(void) const {return wxString(wxT("wxRxCatalog"));};
64  //INetEventProcessor
65  virtual void ProcessNetEvent(wxGISNetEvent& event);
66  //wxRxObjectContainer
67  virtual void OnNetEvent(wxGISNetEvent& event);
68 protected:
69  virtual wxString GetConfigName(void) const {return wxString(wxT("wxServerCatalog"));};
70 };
71 
72 /*
73 #include "wxgissrv/srv_framework/framework.h"
74 #include "wxgis/catalog/catalog.h"
75 /*
79 class WXDLLIMPEXP_GIS_FRW wxRxObjectContainer :
80  public IGxObjectContainer,
81  public IRxObjectServer,
82  public INetMessageReceiver
83 {
84 public:
85  wxRxObjectContainer(void);
86  virtual ~wxRxObjectContainer(void);
87  //IGxObject
88  virtual wxString GetName(void) = 0;
89  virtual wxString GetBaseName(void){return GetName();};
90  virtual wxString GetPath(void){return wxEmptyString;};
91  virtual wxString GetCategory(void) = 0;
92  virtual void Detach(void);
93  //IGxObjectContainer
94  virtual bool DeleteChild(IGxObject* pChild);
95  virtual bool AreChildrenViewable(void){return true;};
96  virtual bool HasChildren(void){return m_Children.size() > 0 ? true : false;};
97  //IRxObjectServer
98  virtual wxXmlNode* GetDescription(void);
99  virtual void SetApplication(IServerApplication* pApp);
100  //INetMessageReceiver
101  virtual void ProcessMessage(WXGISMSG msg, wxXmlNode* pChildNode);
102  //wxRxObjectContainer
103  virtual void EmptyChildren(void);
104 protected:
105  IServerApplication* m_pApp;
106  bool m_bIsChildrenLoaded;
107 };
108 /*
112 class WXDLLIMPEXP_GIS_FRW wxRxObject :
113  public IGxObject,
114  public IRxObjectServer,
115  public INetMessageReceiver
116 {
117 public:
118  wxRxObject(void);
119  virtual ~wxRxObject(void);
120  //IGxObject
121  virtual wxString GetName(void) = 0;
122  virtual wxString GetBaseName(void){return GetName();};
123  virtual CPLString GetInternalName(void){return CPLString();};
124  virtual wxString GetCategory(void) = 0;
125  virtual void Detach(void);
126  //IRxObjectServer
127  virtual wxXmlNode* GetDescription(void);
128  virtual void SetApplication(IServerApplication* pApp);
129  //INetMessageReceiver
130  virtual void ProcessMessage(WXGISMSG msg, wxXmlNode* pChildNode);
131 protected:
132  IServerApplication* m_pApp;
133 };
134 */
The base class for Remote GxObjects (RxObjects).
Definition: rxobjectclient.h:33
Definition: netevent.h:66
The base class for Remote GxObjectContainers (RxObjectContainers).
Definition: rxobjectclient.h:50
Definition: gxcatalog.h:42
Definition: netevent.h:34
The root of Remote GxObjects (RxObjects).
Definition: rxobjectclient.h:75
Definition: gxobject.h:37