VR-Forces 4.6 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
DtMetaFlightParser.h
Go to the documentation of this file.
1 /******************************************************************************
2 ** Copyright (c) 2010 MAK Technologies, Inc.
3 ** All rights reserved.
4 ******************************************************************************/
5 /******************************************************************************
6 ** $RCSfile: $ $Revision: $ $State: $
7 ******************************************************************************/
8 
12 
13 #pragma once
14 #include <vrvTerrain/vrvTerrain.h>
15 #include <libxml/tree.h>
16 #include <string>
17 
18 namespace makVrv
19 {
23  {
24  public:
25 
28 
30  bool openFile(const std::string& fileName,
31  const std::string& virtualTextureFilename, std::string& parseError);
32 
34  const std::string& fileName() const;
35 
39  const std::string& virtualTextureFileName() const;
40 
43  static bool publish( const std::string& fileName,
44  const std::string& virtualTextureFilename,
45  const std::string& outputFileName,
46  bool encryptingData, bool removeVT, std::string& parseError,
47  bool extendGridLevelZero, float extendGridLevelZeroTo);
48 
50  const char* currentElementType() const;
51 
53  const char* currentElementName() const;
54 
56  const char* currentElementReference() const;
57 
60  std::string currentElementNameOrGenerateUnique();
61 
63  const char* currentElementText() const;
64 
66  bool getCurrentElementValue(std::string& value) const;
67 
69  bool getCurrentElementValue(int& value) const;
70 
72  bool getCurrentElementValue(unsigned int& value) const;
73 
75  bool getCurrentElementValue(double& value) const;
76 
78  unsigned int numberOfChildElements() const;
79 
82  bool readFirstChildElement();
83 
85  bool readNextElement();
86 
88  bool readPreviousElement();
89 
91  bool readParentElement();
92 
93  protected:
94 
95  static xmlDocPtr createDocument( const std::string& file,
96  std::string& parseError );
97 
98  static int countChildrenWithName( xmlNodePtr node,
99  const std::string& nodeName );
100 
101  static xmlNodePtr findChildWithName( const xmlNodePtr node,
102  const std::string& nodeName, const int occurance = 0);
103 
104  static void replaceAll( std::string& result,
105  const std::string& replaceWhat, const std::string& replaceWithWhat );
106 
107  static xmlNodePtr findDatabaseNode( xmlDocPtr xmlDocument,
108  std::string& parseError );
109 
110  static xmlNodePtr findChildWithAttribute( xmlNodePtr node,
111  const std::string& nodeName, const std::string& attrName,
112  const std::string& attrValue );
113 
114  static const char* attribute( xmlNodePtr node,
115  const std::string& attrName );
116 
117  static const char* text(xmlNodePtr node);
118 
119  static bool setText( xmlNodePtr node,const std::string& text );
120 
121  protected:
122 
123  std::string myFileName;
125 
126  xmlDocPtr myDocument;
128  unsigned int myUniqueId;
129  };
130 }
131 

Document ID: Generated on Thu Apr 12 03:15:37 EDT 2018 from SVN revision 187986
Copyright © 2005-2018 VT MÄK. All Rights Reserved (www.mak.com)