VR-Vantage 3.0 API Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
ciServerClient.h
Go to the documentation of this file.
1 
2 // Copyright JRM Enterprises, Inc. 2004
3 // All rights reserved.
4 //
5 // This code is the intellectual property of JRM Enterprises, Inc.
6 // It may not be used or released as source or compiled binary form
7 // without the prior written consent of JRM Enterprises, Inc.
8 //
9 // Original Author:
10 // Date:
11 //
12 //
13 //
15 
16 #if !defined(_CISERVER_CLIENT_H_)
17 #define _CISERVER_CLIENT_H_
18 
19 #if _MSC_VER > 1000
20 #pragma once
21 #endif // _MSC_VER > 1000
22 #ifndef LINUX
23 #pragma warning (disable : 4996) // Eliminate warnings about old C stdio routines.
24 #endif
25 
29 #include "ciApi.h"
30 #include <stdio.h>
31 #include <string.h>
32 #include <fstream>
33 #include <iostream>
34 #include <assert.h>
35 #include <string.h>
36 #include "clXML.h"
37 #include "clXMLNode.h"
38 #include "ciXML.h"
39 
40 #define MAX_CLIENT_COUNT 256
41 
43 {
44 public:
45 
47  {
48  disable = 0,
49  server = 1,
50  client =2
51  };
52 
55  bool m_clientUpdateMap[MAX_CLIENT_COUNT];
57 
59  //getPortNumber
64  int getPortNumber() {
65  return m_portnumber;
66  }
68  //setPortNumber
73  void setPortNumber(int number = 8000) {
74  m_portnumber = number;
75  }
76 
78  //getUpdateLut
84  bool getUpdateLut(int index) {return m_clientUpdateMap[index];}
86  //setUpdateLut
92  void setUpdateLut(int index, bool value = false) { m_clientUpdateMap[index] = value? true : false;}
93 
95  // getNetworkMode
103  int getNetworkMode() {return m_networkMode;};
104 
106  // getNetworkMode
114  void setNetworkMode(int mode = 0) {m_networkMode = mode;};
115 
117  // archive
125  bool save(std::ofstream &outf);
126 
127  //
128  // loadXML
129  //
130  // \par Description:
131  // Loads attributes from an XML node
132  //
133  // \param clXMLNode* trackNode
134  // \return bool
135  //
136  bool loadXML(clXMLNode* trackNode);
137 
138  //
139  // parseXML
140  //
141  // \par Description:
142  // Parses an XML document for specific tags
143  //
144  // \param clXML xmlDocument
145  // \return bool
146  //
147  bool parseXML(clXML& xmlDocument);
148 
150  //loadXMLNode
157  bool loadXMLNode(std::string tag, char *nodeString);
159  //loadXMLNode
166  bool loadXMLNode(std::string tag, bool *nodeBool);
168  //loadXMLNode
175  bool loadXMLNode(std::string tag, int *nodeBool);
177  //loadXMLNode
184  bool loadXMLNode(std::string tag, double *nodeBool);
185 
186  //
187  // saveXML
188  //
189  // \par Description:
190  // Saves XML nodes to an XML document
191  //
192  // \param clXML* xmlDocument
193  //
194  void saveXML(clXML* xmlDocument);
195 
197  // serialize
205  bool load(char *filepath);
206 
207 protected: // methods
208 
209 public: // construction/destruction
210 
212  // ciServerClient
217  ciServerClient();
218 
220  // ciServerClient
227  // ciServerClient(ciServerClient &obj);
228 
229  virtual ~ciServerClient();
230 
232  // operator =
240  ciServerClient operator = (ciServerClient &obj);
241 };
242 
243 #endif // _CISERVER_CLIENT_H_


Copyright © 2005-2022 MAK Technologies. All Rights Reserved (www.mak.com)