CYCLUS
xml_parser.h
Go to the documentation of this file.
1 #ifndef CYCLUS_SRC_XML_PARSER_H_
2 #define CYCLUS_SRC_XML_PARSER_H_
3 
4 #include <sstream>
5 #include <boost/shared_ptr.hpp>
6 
7 namespace xmlpp {
8  class DomParser;
9  class Document;
10 }
11 
12 namespace cyclus {
13 
14 /// A helper class to hold xml file data and provide automatic
15 /// validation
16 class XMLParser {
17  public:
18  /// constructor
19  XMLParser();
20 
21  /// destructor
22  virtual ~XMLParser();
23 
24  /// initializes a parser with an xml snippet
25  /// @param input an xml snippet to be used as input
26  void Init(const std::stringstream& input);
27 
28  /// validates the file agaisnt a schema
29  /// @param schema the schema to validate agaisnt
30  void Validate(const std::stringstream& schema);
31 
32  /// @return the parser's document
33  xmlpp::Document* Document();
34 
35  private:
36  /// file parser
37  xmlpp::DomParser* parser_;
38 };
39 
40 } // namespace cyclus
41 
42 #endif // CYCLUS_SRC_XML_PARSER_H_
A helper class to hold xml file data and provide automatic validation.
Definition: xml_parser.h:16
taken directly from OsiSolverInterface.cpp on 2/17/14 from https://projects.coin-or.org/Osi/browser/trunk.
Definition: agent.cc:14