VR-Vantage 3.1 API Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
ciInterface.h
Go to the documentation of this file.
1 
2 // Copyright JRM Enterprises, Inc. 2007
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: Tim George
10 // Date: Jan 2007
11 //
12 //
13 //
15 #ifndef _CIINTERFACE_H_
16 #define _CIINTERFACE_H_
17 #include <fstream>
18 #include <vector>
19 #include <stdio.h>
20 
21 #ifdef WIN32
22 #include <process.h>
23 #endif
24 #include "ciApi.h"
25 
26 #include "ciSensor.h"
27 #include "ciXML.h"
28 #include "ciOptics.h"
29 #include "ciElectronics.h"
30 #include "ciDetector.h"
31 #include "ciSenSim.h"
32 #include "ciEntity.h"
33 #include "ciChannel.h"
34 #include "ciEnvironment.h"
35 #include "ciMovieMerge.h"
36 #include "ciMoviePlayer.h"
37 #include "ciNVtherm.h"
38 #include "ciOcean.h"
39 #include "ciScenario.h"
40 #include "ciSensorList.h"
41 #include "ciServerClient.h"
42 #include "ciTerrain.h"
43 #include "ciTrack.h"
44 #include "ciSettings.h"
45 #include "ciSystemTest.h"
46 #include "ciDataCollection.h"
47 
48 #ifdef WIN32
49 #pragma warning (disable : 4251) // needs to have dll-interface to be used by clients
50 #endif // WIN32
51 
53 {
54 public:
56  // seInterface
61  ciInterface();
62 
64  // ~seInterface
69  virtual ~ciInterface();
71  // setSensor
78  void setSensor(ciSensor &sensor) { m_sensorData = sensor; }
79 
81  // getSensor
88  ciSensor & getSensor() { return m_sensorData; }
90  //*getSensor
96  ciSensor &getSensor(int index)
97  {
98  return m_sensorData[index];
99  }
101  // setSensor
108  void setSensorList(ciSensorList &sensorList) { m_sensorListData = sensorList; }
109 
111  // getSensor
118  ciSensorList &getSensorList() { return m_sensorListData; }
119 
121  // setEntity
128  void setEntity(ciEntity &entity) { m_entityData = entity; }
129 
130  void setChannel(ciChannel &channel) { m_channelData = channel; }
131 
133  // getEntity
140  ciEntity &getEntity() { return m_entityData; }
141  ciEntity & getEntity(int index)
142  {
143  return m_entityData[index];
144  }
145 
146  ciChannel &getChannel() { return m_channelData; }
147  ciChannel & getChannel(int index) { return m_channelData[index]; }
148 
149 
151  // setTerrain
158  void setTerrain(ciTerrain &terrain) { m_terrainData = terrain; }
159 
161  // getTerrain
168  ciTerrain &getTerrain() { return m_terrainData; }
169 
171  // setEnvironment
178  void setEnvironment(ciEnvironment &environment) { m_environmentData = environment; }
179 
181  // getEnvironment
188  ciEnvironment &getEnvironment() { return m_environmentData; }
189 
190 
192  // setEnvironment
199  void setSystemTest(ciSystemTest &systemTest) { m_systemTestData = systemTest; }
200 
202  // getEnvironment
209  ciSystemTest &getSystemTest() { return m_systemTestData; }
210 
212  // setScenario
219  void setScenario(ciScenario &scenario) { m_scenarioData = scenario; }
220 
222  // getScenario
229  ciScenario &getScenario() { return m_scenarioData; }
230 
231 
232 
233  void setDataCollection(ciDataCollection &dc) { m_dataCollectionData = dc; }
234  ciDataCollection &getDataCollection() { return m_dataCollectionData; }
235 
236 
238  //setMovieMerge
243  void setMovieMerge(ciMovieMerge &movieMerge) {m_movieMergeData = movieMerge;}
245  //&getMovieMerge
250  ciMovieMerge &getMovieMerge() { return m_movieMergeData; }
251 
253  //setOcean
258  void setOcean(ciOcean &ocean) { m_oceanData = ocean;}
260  //&getOcean
265  ciOcean &getOcean(){ return m_oceanData; }
266 
268  // setTrack
275  void setTrack(ciTrack &track) { m_trackData = track; }
276 
278  // getTrack
285  ciTrack & getTrack() { return m_trackData; }
286 
288  //setSensorEffects
293  void setSensorEffects(ciSenSim &senSimData) { m_senSimData = senSimData; }
295  //&getSensorEffects
300  ciSenSim & getSensorEffects() {return m_senSimData;}
301 
303  // setOptics
310  void setOptics(ciOptics &opticsData) { m_opticsData = opticsData; }
311 
313  // getOptics
320  ciOptics &getOptics() { return m_opticsData; }
321 
323  // setDetector
330  void setDetector(ciDetector &detectorData) { m_detectorData = detectorData; }
331 
333  // getDetector
340  ciDetector &getDetector() { return m_detectorData; }
341 
343  // setElectronics
350  void setElectronics(ciElectronics &electronicsData) { m_electronicsData = electronicsData; }
351 
353  // getElectronics
360  ciElectronics &getElectronics() { return m_electronicsData; }
361 
362  ciMoviePlayer & getMoviePlayer(){ return m_moviePlayer;}
363 
364  void setMoviePlayer(ciMoviePlayer movieplayer){m_moviePlayer = movieplayer;}
366  // getNetwork
373 
374  //&getNetwork
379  ciServerClient &getNetwork() { return m_network; }
380 
381  ciSettings &getSettings() { return m_settingsData; }
382 
383  void setSettings(ciSettings& settingsData) { m_settingsData = settingsData; }
384 
385  //
386  // loadConfig, saveConfig, parseConfig
387  //
388  // \par Description:
389  // Loads, saves, and parses an XML file
390  //
391  // \param char* configFile
392  // \return bool
393  //
394  // \param char* configFile
395  // \return bool
396  //
397  // \param clXML xmlDocument
398  //
399  bool loadConfig(char* configFile);
400  bool loadConfigFromString(const char *configString);
401  bool saveConfig(char* configFile);
402 
403  bool saveConfigSigSim(char* configFile);
404  bool saveConfigSenSim(char* configFile);
405  bool saveConfigEnvironment(char* configFile);
406  bool saveConfigGreNrt(char *configFile, int index = 0);
407  bool saveConfigGreSTDomain(char *configFile, int index = 0);
408  bool saveConfigEntity(char *configFile, int index = -1, bool saveGFE = true);
409  bool saveConfigTerrain(char *configFile);
410 
411  char *getConfigAsString();
412  void parseConfig(clXML& xmlDocument);
413  void saveXincludeXML( clXML *xmlDocument );
414  bool ParseXMLDocument(clXML& xmlDocument);
415  bool saveXMLDocument(clXML *xmlDocument);
416  char *getMovieMergeTestLocation(){ return m_movieMergeTestLocation; }
417  bool restoreDefaults(char *configFile);
418  bool ParseXMLRestoreDefaults(clXML& xmlDocument);
419 
420  bool loadConfigSenSim(char *configFile);
421  bool loadConfigSigSim(char *configFile);
422  bool loadConfigEnvironment(char *configFile);
423  bool loadConfigGreNrt(char *configFile, int index = 0);
424  bool loadConfigGreSTDomain(char *configFile, int index = 0);
425  bool loadConfigEntity(char *configFile);
426  bool loadConfigTerrain(char *configFile);
427 
429  //*getCiInterface
434  ciInterface *getCiInterface(){ return this;}
435 
456 
457 
458 protected:
459 
479  char m_movieMergeTestLocation[512];
480  vector<string> m_xincludeData; /* encapsulate in a ciXinclude class? */
482 
483 
484 };
485 
486 #endif


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