PUGIXML_DOMDocument.h
Go to the documentation of this file.
1 /* -*- C++ -*- */
2 
3 /****************************************************************************
4 ** Copyright (c) 2001-2014
5 **
6 ** This file is part of the QuickFIX FIX Engine
7 **
8 ** This file may be distributed under the terms of the quickfixengine.org
9 ** license as defined by quickfixengine.org and appearing in the file
10 ** LICENSE included in the packaging of this file.
11 **
12 ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
13 ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
14 **
15 ** See http://www.quickfixengine.org/LICENSE for licensing information.
16 **
17 ** Contact ask@quickfixengine.org if any conditions of this licensing are
18 ** not clear to you.
19 **
20 ****************************************************************************/
21 
22 #ifndef FIX_PUGIXMLDOMDOCUMENT_H
23 #define FIX_PUGIXMLDOMDOCUMENT_H
24 
25 #include "DOMDocument.h"
26 #include "Exceptions.h"
27 #include "pugixml.hpp"
28 
29 namespace FIX
30 {
32  class PUGIXML_DOMAttributes : public DOMAttributes
33  {
34  public:
35  PUGIXML_DOMAttributes( pugi::xml_node pNode )
36  : m_pNode(pNode) {}
37 
38  bool get( const std::string&, std::string& );
40 
41  private:
42  pugi::xml_node m_pNode;
43  };
44 
46  class PUGIXML_DOMNode : public DOMNode
47  {
48  public:
49  PUGIXML_DOMNode( pugi::xml_node pNode )
50  : m_pNode(pNode) {}
51  ~PUGIXML_DOMNode() {}
52 
56  std::string getName();
57  std::string getText();
58 
59  private:
60  pugi::xml_node m_pNode;
61  };
62 
64  class PUGIXML_DOMDocument : public DOMDocument
65  {
66  public:
69 
70  bool load( std::istream& );
71  bool load( const std::string& );
72  bool xml( std::ostream& );
73 
74  DOMNodePtr getNode( const std::string& );
75 
76  private:
77  pugi::xml_document m_pDoc;
78  };
79 }
80 
81 #endif
FIX::PUGIXML_DOMNode::m_pNode
pugi::xml_node m_pNode
Definition: PUGIXML_DOMDocument.h:77
FIX::DOMAttributes::map
std::map< std::string, std::string > map
Definition: DOMDocument.h:55
FIX::PUGIXML_DOMAttributes::m_pNode
pugi::xml_node m_pNode
Definition: PUGIXML_DOMDocument.h:76
FIX::DOMAttributesPtr
SmartPtr< DOMAttributes > DOMAttributesPtr
Definition: DOMDocument.h:45
FIX::PUGIXML_DOMNode::PUGIXML_DOMNode
PUGIXML_DOMNode(pugi::xml_node pNode)
Definition: PUGIXML_DOMDocument.h:66
FIX::PUGIXML_DOMDocument::xml
bool xml(std::ostream &)
Definition: PUGIXML_DOMDocument.cpp:117
FIX::PUGIXML_DOMDocument::load
bool load(std::istream &)
Definition: PUGIXML_DOMDocument.cpp:99
FIX::PUGIXML_DOMDocument
XML document as represented by pugixml.
Definition: PUGIXML_DOMDocument.h:81
FIX::PUGIXML_DOMNode::~PUGIXML_DOMNode
~PUGIXML_DOMNode()
Definition: PUGIXML_DOMDocument.h:68
FIX::PUGIXML_DOMAttributes::get
bool get(const std::string &, std::string &)
Definition: PUGIXML_DOMDocument.cpp:48
DOMDocument.h
FIX::ConfigError
Application is not configured correctly
Definition: Exceptions.h:104
FIX::PUGIXML_DOMNode::getAttributes
DOMAttributesPtr getAttributes()
Definition: PUGIXML_DOMDocument.cpp:75
FIX::DOMNodePtr
SmartPtr< DOMNode > DOMNodePtr
Definition: DOMDocument.h:59
FIX::PUGIXML_DOMDocument::m_pDoc
pugi::xml_document m_pDoc
Definition: PUGIXML_DOMDocument.h:94
FIX::PUGIXML_DOMNode::getNextSiblingNode
DOMNodePtr getNextSiblingNode()
Definition: PUGIXML_DOMDocument.cpp:68
FIX::PUGIXML_DOMAttributes::PUGIXML_DOMAttributes
PUGIXML_DOMAttributes(pugi::xml_node pNode)
Definition: PUGIXML_DOMDocument.h:69
FIX::PUGIXML_DOMDocument::getNode
DOMNodePtr getNode(const std::string &)
Definition: PUGIXML_DOMDocument.cpp:122
FIX::PUGIXML_DOMNode::getText
std::string getText()
Definition: PUGIXML_DOMDocument.cpp:85
FIX
Definition: Acceptor.cpp:34
FIX::PUGIXML_DOMDocument::PUGIXML_DOMDocument
PUGIXML_DOMDocument()
Definition: PUGIXML_DOMDocument.cpp:90
FIX::PUGIXML_DOMAttributes::toMap
DOMAttributes::map toMap()
Definition: PUGIXML_DOMDocument.cpp:56
Exceptions.h
FIX::PUGIXML_DOMNode::getName
std::string getName()
Definition: PUGIXML_DOMDocument.cpp:80
pugi
Definition: pugixml.cpp:486
FIX::PUGIXML_DOMNode::getFirstChildNode
DOMNodePtr getFirstChildNode()
Definition: PUGIXML_DOMDocument.cpp:61

Generated on Wed Apr 29 2020 19:41:30 for QuickFIX by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2001