VR-Link API Documentation for HLA 1.3
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
fedReader1516e.h
Go to the documentation of this file.
1 /*********************************************************************
2 ** Copyright (c) 1992-2010 MAK Technologies, Inc
3 ** All rights reserved.
4 *********************************************************************/
5 #ifndef fedReader1516e_h__
6 #define fedReader1516e_h__
7 
8 
9 
13 
14 #include <stdio.h>
15 #include <string>
16 
17 #include <vlutil/vlFedTarget.h>
18 #include <vlutil/vlFilename.h>
19 #include "mtl/fedReader.h"
20 #include <vlutil/vlString.h>
21 #include "libxml/tree.h"
22 #include <set>
23 #include <map>
24 
26 struct _xmlNode;
27 struct _xmlDoc;
28 typedef unsigned char xmlChar;
29 typedef struct _xmlNode xmlNode;
30 typedef struct _xmlDoc xmlDoc;
31 
32 #ifdef DtUSE_UTILITIES_NAMESPACE
33 namespace DtUSE_UTILITIES_NAMESPACE
34 {
35 #endif
36 
42  {
43  public:
44 
47 
49  virtual ~DtFedReader1516e();
50 
51  private:
52 
55  DtFedReader1516e& operator=( const DtFedReader1516e& );
56 
57  public:
58 
61  virtual DtFedReadStatus readFedFilePtr(FILE* filePointer, DtFedTarget *fedTarget,
62  DtFilename fileName, unsigned int strictCheckingMask=DtFedReadStrictDisabled, bool useDTD=false, bool dontParseSwitches=false );
63 
64 
66  virtual void setSchemaValidationEnabled(bool enabled);
67 
68  protected:
69 
70  virtual DtFedReadStatus processXmlDocPtr( xmlDocPtr xmlDocument ) ;
72  virtual DtFedReadStatus parseTimeTree( xmlNode* currentNode );
74  virtual DtFedReadStatus parseSynchronizationsTree( xmlNode* currentNode );
76  DtFedReadStatus getSharingType( xmlNode* currentNode, DtSharingType& sharingType );
78  DtFedReadStatus getSemantics( xmlNode* currentNode, DtString& semanticsVal );
80  DtFedReadStatus getNotes( xmlNode* currentNode, DtString& notesVal );
81  DtFedReadStatus getOwnershipType( xmlNode* currentNode, DtOwnershipType& ownershipVal );
83  DtFedReadStatus getUpdateCondition( xmlNode* currentNode, DtString& updateConditionVal );
85  DtFedReadStatus getUpdateType( xmlNode* currentNode, DtFomUpdateType& updateTypeVal );
86 
88  virtual bool schemaValidate(xmlDoc* pDoc, const char * schemaFile);
89 
91  static xmlNode* getNodeByName( xmlNode* currentNode,
92  const xmlChar* nodeName );
93 
95  virtual DtFedReadStatus processFed( xmlNode* fedObj );
96 
98  virtual DtFedReadStatus parseTransportationsList( xmlNode* currentNode );
99 
101  virtual DtFedReadStatus processModelIdentification( xmlNode* currentNode );
102 
104  virtual DtFedReadStatus processObjects( xmlNode* currentNode );
105 
107  virtual DtFedReadStatus processInteractions( xmlNode* currentNode );
108 
110  virtual DtFedReadStatus parseObjectTree( xmlNode* currentNode,
111  const DtString& parentName );
112 
114  virtual DtFedReadStatus parseAttribute( xmlNode* currentNode,
115  const DtString& parentName );
116 
118  virtual DtFedReadStatus parseAttributeDimensions( xmlNode* currentNode,
119  DtString const& objectClass, DtString const& attribute);
120 
122  virtual DtFedReadStatus parseInteractionTree( xmlNode* currentNode,
123  const DtString& parentName );
124 
126  virtual DtFedReadStatus parseInteractionDimensions( xmlNode *currentNode,
127  DtString const& interactionClass );
128 
130  virtual DtFedReadStatus parseDimensionList( xmlNode* currentNode );
131 
133  virtual DtFedReadStatus parseDimension( xmlNode* currentNode );
134 
136  virtual DtFedReadStatus parseSwitches( xmlNode* currentNode );
137 
139  virtual DtFedReadStatus parseUpdateRates( xmlNode* currentNode );
140 
142  virtual DtFedReadStatus parseParameter( xmlNode* currentNode,
143  const DtString& parentName );
144 
146  virtual DtFedReadStatus parseDataTypeTree( xmlNode* currentNode );
147 
149  virtual DtFedReadStatus parseNotesTree( xmlNode* currentNode );
150 
152  virtual DtFedReadStatus parseTagsTree( xmlNode* currentNode );
153 
155  virtual DtFedReadStatus parseBasicDataTypesTree( xmlNode* currentNode );
156 
158  virtual DtFedReadStatus parseSimpleDataTypesTree( xmlNode* currentNode );
159 
161  virtual DtFedReadStatus parseArrayDataTypesTree( xmlNode* currentNode );
162 
164  virtual DtFedReadStatus parseEnumeratedDataTypesTree( xmlNode* currentNode );
165 
167  virtual DtFedReadStatus parseFixedRecordDataTypesTree( xmlNode* currentNode );
168 
170  virtual DtFedReadStatus parseVariantRecordDataTypesTree( xmlNode* currentNode );
171 
173  virtual void appendNodeProperties( xmlNode* currentNode, DtString& output ) const;
174 
176  virtual void appendNodeContent(xmlNode* node, DtString& output) const;
177 
179  virtual bool isBlankText(xmlNode* node) const;
180 
182  virtual const xmlChar* propertyByName( xmlNode* node, const xmlChar *name);
183 
187  virtual bool getPropertyByName( xmlNode* node, const xmlChar *name,
188  DtString& propertyContent);
189 
191  static const xmlChar* childContentByName( xmlNode* node, const xmlChar *name) ;
192 
196  virtual bool getChildContentByName( xmlNode* node, const xmlChar *name,
197  DtString& childContent);
198 
200  virtual DtFedReadStatus getTransportType( xmlNode* currentNode,
201  DtTransportType& transportType, DtNameTypePair nameType, bool isAttribute );
202 
204  virtual DtFedReadStatus getOrderType( xmlNode* currentNode,
205  DtOrderType& orderType );
206 
207  bool convertStringToULong(std::string numericString,
208  unsigned long& value);
209 #ifdef __sgi__
210  void clipPrefix(std::string& valueSpec, char c);
211 #else
212  template<typename operandType> void clipPrefix(std::string& valueSpec,
213  operandType c);
214 #endif
215 
216  public:
217 
218  static bool isEvolvedFormat(void* fedFilePtr);
219  bool getChildrenContent(xmlNode* node, DtString& content) const;
220  DtString getChildrenContent(xmlNode* node) const;
221 
223 
224  protected:
225 
226  // Whether or not schema validation should be performed
228 
230 
234  };
235 
236 #ifdef DtUSE_UTILITIES_NAMESPACE
237 }
238 #endif
239 
240 
241 #endif // fedReader1516e_h__
bool myReplacedInteractionRoot
Indicates when federation&#39;s FOM is 1.3 and root name has been replaced to match.
Definition: fedReader1516e.h:232
std::pair< DtString, DtString > DtNameTypePair
Definition: vlFedTarget.h:53
This file contains the declaration of DtFilename.
struct _xmlNode xmlNode
Definition: fedReader.h:21
enum DtFomUpdateType_enum DtFomUpdateType
Update type for object.
Contains the DtString class declaration.
bool mySchemaValidationEnabled
Definition: fedReader1516e.h:227
Instances of DtFedReader are used to read a FED file, and fill in a DtFedTarget with the information ...
Definition: fedReader.h:51
unsigned char xmlChar
Definition: fedReader.h:19
This file declares DtFedReader and several helper classes.
Definition: fedReader.h:41
DtFedReadStatus
Definition: fedReader.h:31
Instances of DtFedReader1516e are used to read a FED file, and fill in a DtFedTarget with the informa...
Definition: fedReader1516e.h:41
This file contains the declaration of DtFedTarget and several helper classes.
enum DtSharingType_enum DtSharingType
DtString FOMDependency
Definition: fedReader1516e.h:222
struct _xmlDoc xmlDoc
Definition: fedReader.h:22
class DtFedTarget:
Definition: vlFedTarget.h:107
bool myReplacedObjectRoot
Indicates when federation&#39;s FOM is 1.3 and root name has been replaced to match.
Definition: fedReader1516e.h:231
Instances of DtFilename are DtStrings which convert filenames to the native format.
Definition: vlFilename.h:20
DtTransportType
Definition: vlFedTarget.h:67
enum DtOwnershipType_enum DtOwnershipType
DtOrderType
Definition: vlFedTarget.h:74
#define DT_DLL_MTL
Definition: vlMachineTypes.h:106
Instances of DtString are used to represent strings.
Definition: vlString.h:29

Document ID: Generated on Thu Sep 19 02:12:35 EDT 2024 from SVN revision 269601
Copyright © 2005-2024 MAK Technologies. All Rights Reserved (www.mak.com)