VR-Link API Documentation for HLA Evolved
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
xmlFileReader.h
Go to the documentation of this file.
1 /*******************************************************************************
2 ** Copyright (c) 1992-2025 MAK Technologies, Inc
3 ** All rights reserved.
4 *******************************************************************************/
7 #pragma once
8 
9 
10 
11 #include <omtReader/omtReader.h>
12 #include <vlutil/vlString.h>
13 
15 #include <mtl/xmlFedTags.h>
16 #include <mtl/fedReader.h>
17 #ifdef DtUSE_UTILITIES_NAMESPACE
18 namespace DtUSE_UTILITIES_NAMESPACE
19 {
20 #endif
21 class DtOMTTree;
23 class DtEnumerationNode;
24 class DtAttributeFedNode;
25 class DtParameterFedNode;
30 class DtExerciseConn;
31 
33 {
34 
35 public:
36 
39 
41  virtual ~DtXMLFileReader();
42 
46  virtual DtOMTTree* readFile(const DtFilename& str, DtExerciseConn* ex = 0);
47 
51  virtual DtOMTTree* readFiles(const std::vector<DtFilename>& str, DtFomType fomTypeToUse=DtFomInvalid, DtExerciseConn* ex = 0);
52 
53  virtual const DtString& getLastError();
54  virtual void clearLastError();
55 
56  bool isEvolvedFormat(const DtString& fileName);
57  static bool isEvolvedFormat(xmlNodePtr& rootNode);
58  static xmlNode* getNodeByName( xmlNode* rootNode,
59  const xmlChar* nodeName );
60  static const xmlChar* childContentByName(xmlNode* node,
61  const xmlChar *name);
62 
63  virtual void includeMIM(bool inc);
64  virtual bool MIMincluded();
65 
66 public:
67 
68  // Parse the contents of the given buffer into the provided xml doc tree.
69  static DtFedReadStatus parseBuffer(const char* buffer, int size, xmlDocPtr* newXmlDocTree, DtString& lastError);
70 
71  // Parse the contents of the given file into the provided xml doc tree.
72  static DtFedReadStatus parseFile(const char *fedFileName,
73  xmlDoc **newXmlDocTree, DtString& lastError);
74 
75 protected:
76 
77 protected:
80  std::vector<DtOMTTree*> myOMTTrees;
81  bool MIM;
82 
83 private:
84 
86  DtXMLFileReader(const DtXMLFileReader& orig);
87 
89  DtXMLFileReader& operator=(const DtXMLFileReader& rhs);
90 
92  void buildTree(DtOMTTree* omtTree);
93  void setAttributeHandles(DtObjectClassFedNode* objNode);
94  void setParameterHandles(DtInteractionClassFedNode* objNode);
95 
96 };
97 
98 
99 
100 #ifdef DtUSE_UTILITIES_NAMESPACE
101 } // end of namespace DtUSE_UTILITIES_NAMESPACE
102 #endif
Instances of DtExerciseConn are used to provide an application&#39;s interface or connection to the netwo...
Definition: exerciseConnHLA.h:61
Represents an attribute inside a object class.
Definition: attributeFedNode.h:33
bool MIM
Definition: xmlFileReader.h:81
struct _xmlNode xmlNode
Definition: fedReader.h:21
Contains the DtString class declaration.
unsigned char xmlChar
Definition: fedReader.h:19
This file declares DtFedReader and several helper classes.
Contains defines for export control for OMT Reader.
Definition: vlFedTarget.h:44
#define DT_DLL_OMTREADER
Definition: omtReader.h:27
DtFedReadStatus
Definition: fedReader.h:31
DtString myLastError
Definition: xmlFileReader.h:78
defines an object class inside our Fed Tree
Definition: interactionClassFedNode.h:31
struct _xmlDoc xmlDoc
Definition: fedReader.h:22
Definition: fieldComponentNode.h:18
Definition: complexComponentNode.h:21
defines an object class inside our Fed Tree
Definition: objectClassFedNode.h:36
DtExerciseConn * myExConn
Definition: xmlFileReader.h:79
Instances of DtFilename are DtStrings which convert filenames to the native format.
Definition: vlFilename.h:20
DtFomType
Definition: vlFedTarget.h:42
Definition: xmlFileReader.h:32
A tree using the an OMT File information.
Definition: omtTree.h:64
This file declares constants for XML Fed File Parsing.
Instances of DtString are used to represent strings.
Definition: vlString.h:36
Definition: enumerationNode.h:17
Definition: alternativeComponentNode.h:19
Represents an parameter inside a object class.
Definition: parameterFedNode.h:33
std::vector< DtOMTTree * > myOMTTrees
Definition: xmlFileReader.h:80

Document ID: Generated on Thu Oct 16 00:12:25 EDT 2025 from SVN revision 280738
Copyright © 1992-2025 MAK Technologies. All Rights Reserved (www.mak.com)