Main Page   Namespace List   Compound List   File List   Namespace Members   Compound Members   File Members   Examples  

XMLStream.h

Go to the documentation of this file.
00001 # ifndef _XMLStream_h__included__
00002 # define _XMLStream_h__included__
00003 
00005 // DataXML: Utility for Storing Simple Object Data
00006 //
00007 // Component: utilities
00008 // Author   : Jakub.Moscicki@cern.ch
00009 //
00010 // CERN/IT, Geneva, 2001
00012 
00013 // this header contains mainpage for doxygen documentation 
00014 // see bottom of the file
00015 
00016 # include "DataObject.h"
00017 
00018 namespace DataXML 
00019 {
00020 
00022 class XMLParserImplementation;
00023 
00032 class InputXMLStream
00033 {
00034  public:
00035 
00037   InputXMLStream();
00038 
00042   InputXMLStream(std::istream&);
00043 
00045   ~InputXMLStream();
00046   
00049   const DataObject& read();
00050   
00053   const DataObject& read(std::istream&);
00054 
00056   bool success() const;
00057 
00059   std::string errorName() const;
00060   
00062   std::string errorSourcePoint() const;
00063 
00065   std::istream& getDefaultStream() const;
00066 
00069   void setDefaultStream(std::istream& = std::cin); 
00070   
00071  private:
00072 
00073   void _init(std::istream&);
00074 
00076   XMLParserImplementation *m_impl;
00077   
00079   char *m_SRC_BUF;
00080 
00082   int m_BUF_SIZE;
00083 
00085   bool m_success;
00086 
00088   std::istream *m_def_stream;
00089 };
00090 
00099 class OutputXMLStream
00100 {
00101  public:
00102 
00104   OutputXMLStream();
00105 
00109   OutputXMLStream(std::ostream& os);
00110 
00112   ~OutputXMLStream();
00113 
00116   bool write(const DataObject&, std::ostream&) const;
00117 
00120   bool write(const DataObject&) const;
00121 
00123   std::ostream& getDefaultStream() const;
00124 
00127   void setDefaultStream(std::ostream& = std::cout); 
00128 
00129  private:
00130 
00132   std::ostream *m_def_stream;
00133 };
00134 
00135 } // namespace
00136 
00167 # endif

Generated at Tue Jan 28 15:35:28 2003 for DataXML by doxygen1.2.8.1 written by Dimitri van Heesch, © 1997-2001