DDS  ver. 3.4
TopoParserXML.h
Go to the documentation of this file.
1 // Copyright 2014 GSI, Inc. All rights reserved.
2 //
3 //
4 //
5 
6 #ifndef __DDS__TopologyParserXML__
7 #define __DDS__TopologyParserXML__
8 
9 // STD
10 #include <string>
11 // BOOST
12 #include <boost/property_tree/ptree.hpp>
13 
14 namespace dds
15 {
16  namespace topology_api
17  {
19  {
20  public:
26  static void parse(boost::property_tree::ptree& _pt,
27  const std::string& _filepath,
28  const std::string& _schemaFilepath,
29  std::string* _topologyName = nullptr);
30 
36  static bool isValid(const std::string& _filepath,
37  const std::string& _schemaFilepath,
38  std::string* _output = nullptr);
39 
40  private:
42  static void PrintPropertyTree(const std::string& _path, const boost::property_tree::ptree& _pt);
43  };
44  } // namespace topology_api
45 } // namespace dds
46 #endif /* defined(__DDS__TopologyParserXML__) */
Definition: AgentConnectionManager.h:13
Definition: TopoParserXML.h:18
static bool isValid(const std::string &_filepath, const std::string &_schemaFilepath, std::string *_output=nullptr)
Validate provided XML file against XSD using xmllint.
Definition: TopoParserXML.cpp:99
static void parse(boost::property_tree::ptree &_pt, const std::string &_filepath, const std::string &_schemaFilepath, std::string *_topologyName=nullptr)
Parse topology from specified XML file.
Definition: TopoParserXML.cpp:27