protected:
void InitXmlFile(Bool_t create);
// Interface to basic system I/O routines
virtual Int_t SysOpen(const char *, Int_t, UInt_t) { return 0; }
virtual Int_t SysClose(Int_t) { return 0; }
virtual Int_t SysRead(Int_t, void *, Int_t) { return 0; }
virtual Int_t SysWrite(Int_t, const void *, Int_t) { return 0; }
virtual Long64_t SysSeek(Int_t, Long64_t, Int_t) { return 0; }
virtual Int_t SysStat(Int_t, Long_t *, Long64_t *, Long_t *, Long_t *) { return 0; }
virtual Int_t SysSync(Int_t) { return 0; }
// Overwrite methods for directory I/O
virtual Long64_t DirCreateEntry(TDirectory *);
virtual Int_t DirReadKeys(TDirectory *);
virtual void DirWriteKeys(TDirectory *);
virtual void DirWriteHeader(TDirectory *);
private:
// let the compiler do the job. gcc complains when the following line is activated
// TXMLFile(const TXMLFile &) {} //Files cannot be copied
void operator=(const TXMLFile &);
public:
TXMLFile();
TXMLFile(const char *filename, Option_t *option = "read", const char *title = "title", Int_t compression = 1);
virtual ~TXMLFile();
virtual void Close(Option_t *option = ""); // *MENU*
virtual TKey *CreateKey(TDirectory *mother, const TObject *obj, const char *name, Int_t bufsize);
virtual TKey *CreateKey(TDirectory *mother, const void *obj, const TClass *cl, const char *name, Int_t bufsize);
virtual void DrawMap(const char * = "*", Option_t * = "") {}
virtual void FillBuffer(char *&) {}
virtual void Flush() {}
virtual Long64_t GetEND() const { return 0; }
virtual Int_t GetErrno() const { return 0; }
virtual void ResetErrno() const {}
virtual Int_t GetNfree() const { return 0; }
virtual Int_t GetNbytesInfo() const { return 0; }
virtual Int_t GetNbytesFree() const { return 0; }
virtual Long64_t GetSeekFree() const { return 0; }
virtual Long64_t GetSeekInfo() const { return 0; }
virtual Long64_t GetSize() const { return 0; }
virtual TList *GetStreamerInfoList();
Int_t GetIOVersion() const { return fIOVersion; }
virtual Bool_t IsOpen() const;
virtual void MakeFree(Long64_t, Long64_t) {}
virtual void MakeProject(const char *, const char * = "*", Option_t * = "new") {} // *MENU*
virtual void Map(Option_t *) {} //
virtual void Map() {} //
virtual void Paint(Option_t * = "") {}
virtual void Print(Option_t * = "") const {}
virtual Bool_t ReadBuffer(char *, Int_t) { return kFALSE; }
virtual Bool_t ReadBuffer(char *, Long64_t, Int_t) { return kFALSE; }
virtual void ReadFree() {}
virtual Int_t Recover() { return 0; }
virtual Int_t ReOpen(Option_t *mode);
virtual void Seek(Long64_t, ERelativeTo = kBeg) {}
virtual void SetEND(Long64_t) {}
virtual Int_t Sizeof() const { return 0; }
virtual Bool_t WriteBuffer(const char *, Int_t) { return kFALSE; }
virtual Int_t Write(const char * = 0, Int_t = 0, Int_t = 0) { return 0; }
virtual Int_t Write(const char * = 0, Int_t = 0, Int_t = 0) const { return 0; }
virtual void WriteFree() {}
virtual void WriteHeader() {}
virtual void WriteStreamerInfo();
// XML specific functions
virtual void SetXmlLayout(EXMLLayout layout);
virtual void SetStoreStreamerInfos(Bool_t iConvert = kTRUE);
virtual void SetUsedDtd(Bool_t use = kTRUE);
virtual void SetUseNamespaces(Bool_t iUseNamespaces = kTRUE);
Bool_t AddXmlComment(const char *comment);
Bool_t AddXmlStyleSheet(const char *href, const char *type = "text/css", const char *title = 0, int alternate = -1,
const char *media = 0, const char *charset = 0);
Bool_t AddXmlLine(const char *line);
TXMLEngine *XML() { return fXML; }
protected:
// functions to store streamer infos
void StoreStreamerElement(XMLNodePointer_t node, TStreamerElement *elem);
void ReadStreamerElement(XMLNodePointer_t node, TStreamerInfo *info);
Bool_t ReadFromFile();
Int_t ReadKeysList(TDirectory *dir, XMLNodePointer_t topnode);
TKeyXML *FindDirKey(TDirectory *dir);
TDirectory *FindKeyDir(TDirectory *mother, Long64_t keyid);
void CombineNodesTree(TDirectory *dir, XMLNodePointer_t topnode, Bool_t dolink);
void SaveToFile();
static void ProduceFileNames(const char *filename, TString &fname, TString &dtdname);
XMLDocPointer_t fDoc; //!
XMLNodePointer_t fStreamerInfoNode; //! pointer of node with streamer info data
TXMLEngine *fXML; //! object for interface with xml library
Int_t fIOVersion; //! indicates format of ROOT xml file
Long64_t fKeyCounter; //! counter of created keys, used for keys id