PUGIXML_DOMDocument.h
Go to the documentation of this file.
00001 /* -*- C++ -*- */
00002 
00003 /****************************************************************************
00004 ** Copyright (c) 2001-2014
00005 **
00006 ** This file is part of the QuickFIX FIX Engine
00007 **
00008 ** This file may be distributed under the terms of the quickfixengine.org
00009 ** license as defined by quickfixengine.org and appearing in the file
00010 ** LICENSE included in the packaging of this file.
00011 **
00012 ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
00013 ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
00014 **
00015 ** See http://www.quickfixengine.org/LICENSE for licensing information.
00016 **
00017 ** Contact ask@quickfixengine.org if any conditions of this licensing are
00018 ** not clear to you.
00019 **
00020 ****************************************************************************/
00021 
00022 #ifndef FIX_PUGIXMLDOMDOCUMENT_H
00023 #define FIX_PUGIXMLDOMDOCUMENT_H
00024 
00025 #include "DOMDocument.h"
00026 #include "Exceptions.h"
00027 #include "pugixml.hpp"
00028 
00029 namespace FIX
00030 {
00032   class PUGIXML_DOMAttributes : public DOMAttributes
00033   {
00034   public:
00035     PUGIXML_DOMAttributes( pugi::xml_node pNode )
00036     : m_pNode(pNode) {}
00037 
00038     bool get( const std::string&, std::string& );
00039     DOMAttributes::map toMap();
00040 
00041   private:
00042     pugi::xml_node m_pNode;
00043   };
00044 
00046   class PUGIXML_DOMNode : public DOMNode
00047   {
00048   public:
00049     PUGIXML_DOMNode( pugi::xml_node pNode )
00050     : m_pNode(pNode) {}
00051     ~PUGIXML_DOMNode() {}
00052 
00053     DOMNodePtr getFirstChildNode();
00054     DOMNodePtr getNextSiblingNode();
00055     DOMAttributesPtr getAttributes();
00056     std::string getName();
00057     std::string getText();
00058 
00059   private:
00060     pugi::xml_node m_pNode;
00061   };
00062 
00064   class PUGIXML_DOMDocument : public DOMDocument
00065   {
00066   public:
00067     PUGIXML_DOMDocument() throw( ConfigError );
00068     ~PUGIXML_DOMDocument();
00069 
00070     bool load( std::istream& );
00071     bool load( const std::string& );
00072     bool xml( std::ostream& );
00073 
00074     DOMNodePtr getNode( const std::string& );
00075 
00076   private:
00077     pugi::xml_document m_pDoc;
00078   };
00079 }
00080 
00081 #endif

Generated on Mon Sep 15 2014 01:23:54 for QuickFIX by doxygen 1.7.6.1 written by Dimitri van Heesch, © 1997-2001