Plus  - Minimal XML for C++ (Version 0.9.2) Giancarlo Niccolai
Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

mxml_document.h

Go to the documentation of this file.
00001 /*
00002    Mini XML lib PLUS for C++
00003 
00004    Document class
00005 
00006    Author: Giancarlo Niccolai <gian@niccolai.ws>
00007 
00008    $Id: mxml_document.h,v 1.4 2004/02/03 23:12:40 jonnymind Exp $
00009 */
00010 
00017 #ifndef MXML_DOCUMENT_H
00018 #define MXML_DOCUMENT_H
00019 
00020 #include <mxml_node.h>
00021 #include <mxml_element.h>
00022 
00023 namespace MXML {
00024 
00041 class Document: public Element
00042 {
00043 private:
00044    Node *m_root;
00045    int m_style;
00046 
00047    friend std::ostream& operator>>( std::ostream& stream, Document& doc );
00048 public:
00049 
00059    Document( const int style = 0);
00060 
00064    Document( Document &doc );
00065 
00074    Document( std::istream &in, const int style = 0 ) throw( MalformedError );
00075    
00080    ~Document();
00081 
00086    Node *root() const { return m_root; }
00087    int style() const { return m_style; }
00088    void style( const int style ) { m_style = style; }
00089 
00095    Node *main() const;
00096 
00103    virtual void write( std::ostream &stream, const int style ) const;
00104 
00144    virtual void read( std::istream &stream ) throw(MalformedError);
00145 
00146 };
00147 
00148 }
00149 #endif
00150 
00151 /* end of mxml_document.cpp */

Generated on Sun Apr 11 02:08:18 2004 for Mxml Plus by doxygen 1.3.5