QuickFIX: /home/omiller/Development/autobuild/quickfix/src/C++/DOMDocument.h Source File

Index Source Files Annotated Class List Alphabetical Class List Class Hierarchy Graphical Class Hierarchy

# DOMDocument.h

Go to the documentation of this file.

    00001 /* -*- C++ -*- */
    00002
    00003 /****************************************************************************
    00004 ** Copyright (c) quickfixengine.org  All rights reserved.
    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_DOMDOCUMENT_H
    00023 #define FIX_DOMDOCUMENT_H
    00024
    00025 #include <string>
    00026 #include <map>
    00027 #include <iostream>
    00028 #include <memory>
    00029
    00030 namespace FIX
    00031 {
    00033   class DOMAttributes
    00034   {
    00035   public:
    00036     typedef std::map<std::string, std::string> map;
    00037
    00038     virtual ~DOMAttributes() {}
    00039
    00040     virtual bool get( const std::string&, std::string& ) = 0;
    00041     virtual map toMap() = 0;
    00042   };
    00043   typedef std::auto_ptr<DOMAttributes> DOMAttributesPtr;
    00044
    00046   class DOMNode
    00047   {
    00048   public:
    00049     virtual ~DOMNode() {}
    00050
    00051     virtual std::auto_ptr<DOMNode> getFirstChildNode() = 0;
    00052     virtual std::auto_ptr<DOMNode> getNextSiblingNode() = 0;
    00053     virtual std::auto_ptr<DOMAttributes> getAttributes() = 0;
    00054     virtual std::string getName() = 0;
    00055     virtual std::string getText() = 0;
    00056   };
    00057   typedef std::auto_ptr<DOMNode> DOMNodePtr;
    00058
    00060   class DOMDocument
    00061   {
    00062   public:
    00063     virtual ~DOMDocument() {}
    00064
    00065     virtual bool load( std::istream& ) = 0;
    00066     virtual bool load( const std::string& ) = 0;
    00067     virtual bool xml( std::ostream& ) = 0;
    00068
    00069     virtual std::auto_ptr<DOMNode> getNode( const std::string& ) = 0;
    00070   };
    00071   typedef std::auto_ptr<DOMDocument> DOMDocumentPtr;
    00072 }
    00073
    00074 #endif