Main Page | Class Hierarchy | Class List | File List | Class Members

fsxmldoc.h

00001 /* libIXAml - IXA Taldea */
00002 
00003 #ifndef _FSXMLDOC_H
00004 #define _FSXMLDOC_H
00005 
00006 #include "xmlsimpledoc.h"
00007 #include "domid.h"
00008 #include "teiheader.h"
00009 #include "fsprolog.h"
00010 #include "fs.h"
00011 #include "fsid.h"
00012 #include "xmlsimplestruct.h"
00013 #include <vector>
00014 #include <string>
00015 #include <fstream>
00016 
00019 class FSXMLDoc:public XMLSimpleDoc {
00020 
00021   static std::map <std::string, std::vector <FSDDecl> > fsdMap;  //FSDDecl-en bilduma mantendu
00022 
00023  protected:
00024   DomId      aDom;           
00025   std::vector <FS> fsL;      
00026   unsigned ind;              
00027   FSProlog prolog;           
00033   void printErrorea(const char* msg, XMLSimpleNode* item) const;
00034 
00039   std::vector<FSDDecl> readFSDDecl (const std::string & fname) const;
00040 
00045   virtual XMLSimpleNode* printBody(XMLSimpleStruct* xmlstruct) const= 0;
00046 
00050   virtual void initBody(XMLSimpleNode* bodyItem) throw (char*) = 0;
00051 
00052 public:
00053   
00057   FSXMLDoc(const DomId & domId);
00058 
00062   FSXMLDoc(const FSXMLDoc & fsDoc);
00063 
00065   virtual ~FSXMLDoc();
00066 
00071   FSXMLDoc& operator=(const FSXMLDoc & fsDoc);
00072 
00076   void putDom(const DomId & domId);
00077 
00081   DomId getDom() const;
00082 
00085   void begin();
00086 
00089   void next();
00090 
00094   FS   current() const;
00095   
00099   bool ready() const;
00100 
00104   unsigned size() const;
00105   
00110   FS get(const unsigned pos) const;
00111 
00115   void add(const FS & fs);
00116 
00120   void remove(const FS & fs);
00121 
00126   FS   find(const FSId & id) const;
00127   
00132   bool contains(const FSId & id) const;
00133   
00134  private:
00135 
00136   void writeDocument(XMLSimpleStruct*) const throw (char*);
00137   void readDocument(XMLSimpleStruct*) throw (char*);
00138 
00139 };
00140 
00141 #endif // _FSXMLDOC_H

Generated on Tue Sep 11 12:07:42 2007 for libIXAml by doxygen 1.3.5