VR-Link API Documentation for DIS
 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-2026 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 
72  virtual void setDumpDirectory(const DtString& dir);
73  virtual const DtString& dumpDirectory() const;
74 
81  virtual int writeFomDumps(const DtString& dir, const DtOMTTree* mergedTree) const;
82 
83 public:
84 
85  // Parse the contents of the given buffer into the provided xml doc tree.
86  static DtFedReadStatus parseBuffer(const char* buffer, int size, xmlDocPtr* newXmlDocTree, DtString& lastError);
87 
88  // Parse the contents of the given file into the provided xml doc tree.
89  static DtFedReadStatus parseFile(const char *fedFileName,
90  xmlDoc **newXmlDocTree, DtString& lastError);
91 
92 protected:
93 
94 protected:
97  std::vector<DtOMTTree*> myOMTTrees;
98  std::vector<DtString> myModuleNames;
99  bool MIM;
101 
102 private:
103 
105  DtXMLFileReader(const DtXMLFileReader& orig);
106 
108  DtXMLFileReader& operator=(const DtXMLFileReader& rhs);
109 
111  void buildTree(DtOMTTree* omtTree);
112  void setAttributeHandles(DtObjectClassFedNode* objNode);
113  void setParameterHandles(DtInteractionClassFedNode* objNode);
114 
115 };
116 
117 
118 
119 #ifdef DtUSE_UTILITIES_NAMESPACE
120 } // end of namespace DtUSE_UTILITIES_NAMESPACE
121 #endif
Instances of DtExerciseConn are used to provide an application&#39;s interface or connection to the netwo...
Definition: exerciseConnDIS.h:63
Represents an attribute inside a object class.
Definition: attributeFedNode.h:33
bool MIM
Definition: xmlFileReader.h:99
struct _xmlNode xmlNode
Definition: fedReader.h:21
Contains the DtString class declaration.
DtString myDumpDirectory
Definition: xmlFileReader.h:100
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:95
defines an object class inside our Fed Tree
Definition: interactionClassFedNode.h:31
struct _xmlDoc xmlDoc
Definition: fedReader.h:22
Definition: fieldComponentNode.h:18
std::vector< DtString > myModuleNames
Definition: xmlFileReader.h:98
Definition: complexComponentNode.h:21
defines an object class inside our Fed Tree
Definition: objectClassFedNode.h:37
DtExerciseConn * myExConn
Definition: xmlFileReader.h:96
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:38
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:97

Document ID: Generated on Mon Sep 28 00:09:32 EDT 2026 from SVN revision 295353
Copyright © 1992-2025 MAK Technologies. All Rights Reserved (www.mak.com)