tools/NavGenProj/include/NavGenProjPdgInput.h Source File

NavGenProjPdgInput.h
Go to the documentation of this file.
1 /*
2 * Copyright 2015 Autodesk, Inc. All rights reserved.
3 * Use of this software is subject to the terms of the Autodesk license agreement and any attachments or Appendices thereto provided at the time of installation or download,
4 * or which otherwise accompanies this software in either electronic or hard copy form, or which is signed by you and accepted by Autodesk.
5 */
6 
7 
8 
9 // primary contact: MAMU - secondary contact: NOBODY
10 #ifndef GwNavGen_NavGenProjPdgInput_H
11 #define GwNavGen_NavGenProjPdgInput_H
12 
13 #include "tinyxml.h"
14 #include <string>
15 #include "NavGenProj.h"
16 
17 namespace Kaim
18 {
19 
24 {
25 public:
27  {
28  Clear();
29  }
30 
31  void Clear()
32  {
33  m_fileName = "";
34  }
35 
37  {
38  Clear();
39  }
40 
41  void SetFileName(std::string geometryFileName)
42  {
43  m_fileName = geometryFileName;
44  }
45 
46  std::string FileType()
47  {
48  std::string fileType = "pdginput";
49  return fileType;
50  }
51 
52  bool Read(TiXmlNode* node)
53  {
54  TiXmlNode* child;
55  for (child = node->FirstChild(); child != 0; child = child->NextSibling())
56  {
57  NavGenProj::GetParam(child, "filepath", m_fileName);
58  }
59  return true;
60  }
61 
62  bool Write(TiXmlNode* node)
63  {
64  // Get geometry folder node
65  TiXmlNode* geometryFolderNode = NavGenProj::GetOrCreateFolderNode(node, "pdginputs");
66 
67  // Create geometry node
68  TiXmlElement* geometryNode = new TiXmlElement("pdginput");
69  geometryFolderNode->LinkEndChild(geometryNode);
70 
71  // Create filePathNode node
72  TiXmlElement* filePathNode = new TiXmlElement("filepath");
73  geometryNode->LinkEndChild(filePathNode);
74  TiXmlText* text = new TiXmlText(m_fileName.c_str());
75  filePathNode->LinkEndChild(text);
76 
77  return true;
78  }
79 
80 public:
81  std::string m_fileName;
82 };
83 
84 }
85 
86 
87 #endif
Definition: gamekitcrowddispersion.h:20
An instance of this class is used to represent each input sectorInput file in a NavGenProj.
Definition: NavGenProjPdgInput.h:23