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 #include "Utility.h"
30 
31 namespace FIX
32 {
33  #include "Utility.h"
36  {
37  public:
38  typedef std::map<std::string, std::string> map;
39 
40  virtual ~DOMAttributes() {}
41 
42  virtual bool get( const std::string&, std::string& ) = 0;
43  virtual map toMap() = 0;
44  };
45  typedef SmartPtr<DOMAttributes> DOMAttributesPtr;
46 
48  class DOMNode
49  {
50  public:
51  virtual ~DOMNode() {}
52 
53  virtual SmartPtr<DOMNode> getFirstChildNode() = 0;
54  virtual SmartPtr<DOMNode> getNextSiblingNode() = 0;
55  virtual SmartPtr<DOMAttributes> getAttributes() = 0;
56  virtual std::string getName() = 0;
57  virtual std::string getText() = 0;
58  };
59  typedef SmartPtr<DOMNode> DOMNodePtr;
60 
63  {
64  public:
65  virtual ~DOMDocument() {}
66 
67  virtual bool load( std::istream& ) = 0;
68  virtual bool load( const std::string& ) = 0;
69  virtual bool xml( std::ostream& ) = 0;
70 
71  virtual SmartPtr<DOMNode> getNode( const std::string& ) = 0;
72  };
73  typedef SmartPtr<DOMDocument> DOMDocumentPtr;
74 }
75 
76 #endif
Interface that represents attribute from underlying XML parser.
Definition: DOMDocument.h:36
virtual bool get(const std::string &, std::string &)=0
virtual map toMap()=0
std::map< std::string, std::string > map
Definition: DOMDocument.h:38
virtual ~DOMAttributes()
Definition: DOMDocument.h:40
Interface that represents document of underlying XML parser.
Definition: DOMDocument.h:63
virtual bool load(const std::string &)=0
virtual ~DOMDocument()
Definition: DOMDocument.h:65
virtual bool load(std::istream &)=0
virtual bool xml(std::ostream &)=0
virtual SmartPtr< DOMNode > getNode(const std::string &)=0
Interface that represents node from underlying XML parser.
Definition: DOMDocument.h:49
virtual SmartPtr< DOMNode > getFirstChildNode()=0
virtual std::string getName()=0
virtual std::string getText()=0
virtual SmartPtr< DOMAttributes > getAttributes()=0
virtual SmartPtr< DOMNode > getNextSiblingNode()=0
virtual ~DOMNode()
Definition: DOMDocument.h:51
Definition: Acceptor.cpp:35
SmartPtr< DOMAttributes > DOMAttributesPtr
Definition: DOMDocument.h:45
SmartPtr< DOMNode > DOMNodePtr
Definition: DOMDocument.h:59
SmartPtr< DOMDocument > DOMDocumentPtr
Definition: DOMDocument.h:73

Generated on Wed Nov 24 2021 09:55:53 for QuickFIX by doxygen 1.9.1 written by Dimitri van Heesch, © 1997-2001