ROOT  6.06/09
Reference Guide
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 #ifndef ROOT_TObject
16 #include "TObject.h"
17 #endif
18 
19 #ifndef ROOT_TList
20 #include "TList.h"
21 #endif
22 
23 #ifndef ROOT_TXMLSetup
24 #include "TXMLSetup.h"
25 #endif
26 
27 class TStreamerInfo;
28 class TStreamerElement;
29 class TStreamerSTL;
30 class TDataMember;
31 
32 class TXMLPlayer : public TObject {
33  public:
34  TXMLPlayer();
35  virtual ~TXMLPlayer();
36 
37  Bool_t ProduceCode(TList* cllist, const char* filename);
38 
39  protected:
40 
42 
43  const char* ElementGetter(TClass* cl, const char* membername, int specials = 0);
44  const char* ElementSetter(TClass* cl, const char* membername, char* endch);
45 
48  TString GetBasicTypeReaderMethodName(Int_t type, const char* realname);
49  void ProduceStreamerSource(std::ostream& fs, TClass* cl, TList* cllist);
50 
51  void ReadSTLarg(std::ostream& fs, TString& argname, int argtyp, Bool_t isargptr, TClass* argcl, TString& tname, TString& ifcond);
52  void WriteSTLarg(std::ostream& fs, const char* accname, int argtyp, Bool_t isargptr, TClass* argcl);
53  Bool_t ProduceSTLstreamer(std::ostream& fs, TClass* cl, TStreamerSTL* el, Bool_t isWriting);
54 
55  TString fGetterName; //! buffer for name of getter method
56  TString fSetterName; //! buffer for name of setter method
57  TXMLSetup fXmlSetup; //! buffer for xml names convertion
58 
59  ClassDef(TXMLPlayer,1) // Generation of external xml streamers
60 };
61 
62 #endif
Describe Streamer information for one class version.
Definition: TStreamerInfo.h:47
TXMLSetup fXmlSetup
buffer for name of setter method
Definition: TXMLPlayer.h:57
TXMLPlayer()
default constructor
Definition: TXMLPlayer.cxx:135
All ROOT classes may have RTTI (run time type identification) support added.
Definition: TDataMember.h:33
void ProduceStreamerSource(std::ostream &fs, TClass *cl, TList *cllist)
Produce source code of streamer function for specified class.
Definition: TXMLPlayer.cxx:412
static const char * filename()
Basic string class.
Definition: TString.h:137
int Int_t
Definition: RtypesCore.h:41
bool Bool_t
Definition: RtypesCore.h:59
TString GetBasicTypeReaderMethodName(Int_t type, const char *realname)
return functions name to read simple data type from xml file
Definition: TXMLPlayer.cxx:284
TString GetStreamerName(TClass *cl)
returns streamer function name for given class
Definition: TXMLPlayer.cxx:149
Bool_t ProduceSTLstreamer(std::ostream &fs, TClass *cl, TStreamerSTL *el, Bool_t isWriting)
Produce code of xml streamer for data member of stl type.
Definition: TXMLPlayer.cxx:946
#define ClassDef(name, id)
Definition: Rtypes.h:254
const char * ElementSetter(TClass *cl, const char *membername, char *endch)
Produce code to set value to given data member.
Definition: TXMLPlayer.cxx:377
Bool_t ProduceCode(TList *cllist, const char *filename)
Produce streamers for provide class list TList should include list of classes, for which code should ...
Definition: TXMLPlayer.cxx:165
TString GetBasicTypeName(TStreamerElement *el)
return simple data types for given TStreamerElement object
Definition: TXMLPlayer.cxx:253
A doubly linked list.
Definition: TList.h:47
TString fGetterName
Definition: TXMLPlayer.h:55
void ReadSTLarg(std::ostream &fs, TString &argname, int argtyp, Bool_t isargptr, TClass *argcl, TString &tname, TString &ifcond)
Produce code to read argument of stl container from xml file.
Definition: TXMLPlayer.cxx:829
The ROOT global object gROOT contains a list of all defined classes.
Definition: TClass.h:81
TString fSetterName
buffer for name of getter method
Definition: TXMLPlayer.h:56
virtual ~TXMLPlayer()
destructor of TXMLPlayer object
Definition: TXMLPlayer.cxx:142
int type
Definition: TGX11.cxx:120
void WriteSTLarg(std::ostream &fs, const char *accname, int argtyp, Bool_t isargptr, TClass *argcl)
Produce code to write argument of stl container to xml file.
Definition: TXMLPlayer.cxx:895
const char * ElementGetter(TClass *cl, const char *membername, int specials=0)
produce code to access member of given class.
Definition: TXMLPlayer.cxx:322
Mother of all ROOT objects.
Definition: TObject.h:58
TString GetMemberTypeName(TDataMember *member)
returns name of simple data type for given data member
Definition: TXMLPlayer.cxx:218