PUGIXML_DOMDocument.h
Go to the documentation of this file.
/* -*- C++ -*- */
/****************************************************************************
** Copyright (c) 2001-2014
**
** This file is part of the QuickFIX FIX Engine
**
** This file may be distributed under the terms of the quickfixengine.org
** license as defined by quickfixengine.org and appearing in the file
** LICENSE included in the packaging of this file.
**
** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
**
** See http://www.quickfixengine.org/LICENSE for licensing information.
**
** Contact ask@quickfixengine.org if any conditions of this licensing are
** not clear to you.
**
****************************************************************************/
#ifndef FIX_PUGIXMLDOMDOCUMENT_H
#define FIX_PUGIXMLDOMDOCUMENT_H
#include "DOMDocument.h"
#include "Exceptions.h"
#include "pugixml.hpp"
namespace FIX
{
class PUGIXML_DOMAttributes : public DOMAttributes
{
public:
PUGIXML_DOMAttributes( pugi::xml_node pNode )
: m_pNode(pNode) {}
bool get( const std::string&, std::string& );
DOMAttributes::map toMap();
private:
pugi::xml_node m_pNode;
};
class PUGIXML_DOMNode : public DOMNode
{
public:
PUGIXML_DOMNode( pugi::xml_node pNode )
: m_pNode(pNode) {}
~PUGIXML_DOMNode() {}
DOMNodePtr getFirstChildNode();
DOMNodePtr getNextSiblingNode();
DOMAttributesPtr getAttributes();
std::string getName();
std::string getText();
private:
pugi::xml_node m_pNode;
};
class PUGIXML_DOMDocument : public DOMDocument
{
public:
PUGIXML_DOMDocument() throw( ConfigError );
~PUGIXML_DOMDocument();
bool load( std::istream& );
bool load( const std::string& );
bool xml( std::ostream& );
DOMNodePtr getNode( const std::string& );
private:
pugi::xml_document m_pDoc;
};
}
#endif
DOMDocument.h
Exceptions.h
FIX::DOMAttributes
Interface that represents attribute from underlying XML parser.
Definition: DOMDocument.h:36
FIX::DOMAttributes::map
std::map< std::string, std::string > map
Definition: DOMDocument.h:38
FIX::DOMDocument
Interface that represents document of underlying XML parser.
Definition: DOMDocument.h:63
FIX::DOMNode
Interface that represents node from underlying XML parser.
Definition: DOMDocument.h:49
FIX::PUGIXML_DOMAttributes
XML attribute as represented by pugixml.
Definition: PUGIXML_DOMDocument.h:33
FIX::PUGIXML_DOMAttributes::m_pNode
pugi::xml_node m_pNode
Definition: PUGIXML_DOMDocument.h:42
FIX::PUGIXML_DOMAttributes::get
bool get(const std::string &, std::string &)
Definition: PUGIXML_DOMDocument.cpp:31
FIX::PUGIXML_DOMAttributes::PUGIXML_DOMAttributes
PUGIXML_DOMAttributes(pugi::xml_node pNode)
Definition: PUGIXML_DOMDocument.h:35
FIX::PUGIXML_DOMAttributes::toMap
DOMAttributes::map toMap()
Definition: PUGIXML_DOMDocument.cpp:39
FIX::PUGIXML_DOMDocument
XML document as represented by pugixml.
Definition: PUGIXML_DOMDocument.h:65
FIX::PUGIXML_DOMDocument::xml
bool xml(std::ostream &)
Definition: PUGIXML_DOMDocument.cpp:100
FIX::PUGIXML_DOMDocument::~PUGIXML_DOMDocument
~PUGIXML_DOMDocument()
Definition: PUGIXML_DOMDocument.cpp:77
FIX::PUGIXML_DOMDocument::getNode
DOMNodePtr getNode(const std::string &)
Definition: PUGIXML_DOMDocument.cpp:105
FIX::PUGIXML_DOMDocument::load
bool load(std::istream &)
Definition: PUGIXML_DOMDocument.cpp:82
FIX::PUGIXML_DOMDocument::PUGIXML_DOMDocument
PUGIXML_DOMDocument()
Definition: PUGIXML_DOMDocument.cpp:73
FIX::PUGIXML_DOMDocument::m_pDoc
pugi::xml_document m_pDoc
Definition: PUGIXML_DOMDocument.h:77
FIX::PUGIXML_DOMNode
XML node as represented by pugixml.
Definition: PUGIXML_DOMDocument.h:47
FIX::PUGIXML_DOMNode::getAttributes
DOMAttributesPtr getAttributes()
Definition: PUGIXML_DOMDocument.cpp:58
FIX::PUGIXML_DOMNode::PUGIXML_DOMNode
PUGIXML_DOMNode(pugi::xml_node pNode)
Definition: PUGIXML_DOMDocument.h:49
FIX::PUGIXML_DOMNode::getFirstChildNode
DOMNodePtr getFirstChildNode()
Definition: PUGIXML_DOMDocument.cpp:44
FIX::PUGIXML_DOMNode::m_pNode
pugi::xml_node m_pNode
Definition: PUGIXML_DOMDocument.h:60
FIX::PUGIXML_DOMNode::getName
std::string getName()
Definition: PUGIXML_DOMDocument.cpp:63
FIX::PUGIXML_DOMNode::~PUGIXML_DOMNode
~PUGIXML_DOMNode()
Definition: PUGIXML_DOMDocument.h:51
FIX::PUGIXML_DOMNode::getText
std::string getText()
Definition: PUGIXML_DOMDocument.cpp:68
FIX::PUGIXML_DOMNode::getNextSiblingNode
DOMNodePtr getNextSiblingNode()
Definition: PUGIXML_DOMDocument.cpp:51
FIX
Definition: Acceptor.cpp:35
FIX::DOMAttributesPtr
SmartPtr< DOMAttributes > DOMAttributesPtr
Definition: DOMDocument.h:45
FIX::DOMNodePtr
SmartPtr< DOMNode > DOMNodePtr
Definition: DOMDocument.h:59
FIX::ConfigError
Application is not configured correctly
Definition: Exceptions.h:88