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_DOMDOCUMENT_H
23 #define FIX_DOMDOCUMENT_H
24 
25 #include <string>
26 #include <map>
27 #include <iostream>
28 #include <memory>
29 
30 namespace FIX
31 {
34  {
35  public:
36  typedef std::map<std::string, std::string> map;
37 
38  virtual ~DOMAttributes() {}
39 
40  virtual bool get( const std::string&, std::string& ) = 0;
41  virtual map toMap() = 0;
42  };
43  typedef std::auto_ptr<DOMAttributes> DOMAttributesPtr;
44 
46  class DOMNode
47  {
48  public:
49  virtual ~DOMNode() {}
50 
51  virtual std::auto_ptr<DOMNode> getFirstChildNode() = 0;
52  virtual std::auto_ptr<DOMNode> getNextSiblingNode() = 0;
53  virtual std::auto_ptr<DOMAttributes> getAttributes() = 0;
54  virtual std::string getName() = 0;
55  virtual std::string getText() = 0;
56  };
57  typedef std::auto_ptr<DOMNode> DOMNodePtr;
58 
61  {
62  public:
63  virtual ~DOMDocument() {}
64 
65  virtual bool load( std::istream& ) = 0;
66  virtual bool load( const std::string& ) = 0;
67  virtual bool xml( std::ostream& ) = 0;
68 
69  virtual std::auto_ptr<DOMNode> getNode( const std::string& ) = 0;
70  };
71  typedef std::auto_ptr<DOMDocument> DOMDocumentPtr;
72 }
73 
74 #endif
virtual std::auto_ptr< DOMNode > getNode(const std::string &)=0
virtual std::auto_ptr< DOMNode > getFirstChildNode()=0
virtual ~DOMNode()
Definition: DOMDocument.h:49
virtual std::string getText()=0
virtual ~DOMAttributes()
Definition: DOMDocument.h:38
std::map< std::string, std::string > map
Definition: DOMDocument.h:36
virtual std::auto_ptr< DOMAttributes > getAttributes()=0
std::auto_ptr< DOMAttributes > DOMAttributesPtr
Definition: DOMDocument.h:43
std::auto_ptr< DOMDocument > DOMDocumentPtr
Definition: DOMDocument.h:71
virtual map toMap()=0
virtual std::auto_ptr< DOMNode > getNextSiblingNode()=0
virtual ~DOMDocument()
Definition: DOMDocument.h:63
std::auto_ptr< DOMNode > DOMNodePtr
Definition: DOMDocument.h:57
Interface that represents attribute from underlying XML parser.
Definition: DOMDocument.h:33
virtual std::string getName()=0
virtual bool xml(std::ostream &)=0
Interface that represents node from underlying XML parser.
Definition: DOMDocument.h:46
virtual bool load(std::istream &)=0
Interface that represents document of underlying XML parser.
Definition: DOMDocument.h:60

Generated on Sat Mar 29 2014 15:13:31 for QuickFIX by doxygen 1.8.5 written by Dimitri van Heesch, © 1997-2001