Logo ROOT   6.30.04
Reference Guide
 All Namespaces Files Pages
TXMLPlayer.h
Go to the documentation of this file.
1 // @(#)root/xml:$Id$
2 // Author: Sergey Linev 10.05.2004
3 
4 /*************************************************************************
5  * Copyright (C) 1995-2004, Rene Brun and Fons Rademakers. *
6  * All rights reserved. *
7  * *
8  * For the licensing terms see $ROOTSYS/LICENSE. *
9  * For the list of contributors see $ROOTSYS/README/CREDITS. *
10  *************************************************************************/
11 
12 #ifndef ROOT_TXMLPlayer
13 #define ROOT_TXMLPlayer
14 
15 #include "TObject.h"
16 
17 #include "TList.h"
18 
19 #include "TXMLSetup.h"
20 
21 class TStreamerInfo;
22 class TStreamerElement;
23 class TStreamerSTL;
24 class TDataMember;
25 
26 class TXMLPlayer : public TObject {
27 public:
28  TXMLPlayer();
29  virtual ~TXMLPlayer();
30 
31  Bool_t ProduceCode(TList *cllist, const char *filename);
32 
33 protected:
34  TString GetStreamerName(TClass *cl);
35 
36  const char *ElementGetter(TClass *cl, const char *membername, int specials = 0);
37  const char *ElementSetter(TClass *cl, const char *membername, char *endch);
38 
39  TString GetMemberTypeName(TDataMember *member);
40  TString GetBasicTypeName(TStreamerElement *el);
41  TString GetBasicTypeReaderMethodName(Int_t type, const char *realname);
42  void ProduceStreamerSource(std::ostream &fs, TClass *cl, TList *cllist);
43 
44  void ReadSTLarg(std::ostream &fs, TString &argname, int argtyp, Bool_t isargptr, TClass *argcl, TString &tname,
45  TString &ifcond);
46  void WriteSTLarg(std::ostream &fs, const char *accname, int argtyp, Bool_t isargptr, TClass *argcl);
47  Bool_t ProduceSTLstreamer(std::ostream &fs, TClass *cl, TStreamerSTL *el, Bool_t isWriting);
48 
49  TString fGetterName; //! buffer for name of getter method
50  TString fSetterName; //! buffer for name of setter method
51  TXMLSetup fXmlSetup; //! buffer for xml names conversion
52 
53  ClassDef(TXMLPlayer, 1) // Generation of external xml streamers
54 };
55 
56 #endif