Logo ROOT   6.08/07
Reference Guide
TRealData.h
Go to the documentation of this file.
1 // @(#)root/meta:$Id$
2 // Author: Rene Brun 05/03/95
3 
4 /*************************************************************************
5  * Copyright (C) 1995-2000, 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_TRealData
13 #define ROOT_TRealData
14 
15 
16 //////////////////////////////////////////////////////////////////////////
17 // //
18 // TRealData //
19 // //
20 // Description of persistent data members. //
21 // //
22 //////////////////////////////////////////////////////////////////////////
23 
24 #ifndef ROOT_TObject
25 #include "TObject.h"
26 #endif
27 #ifndef ROOT_TString
28 #include "TString.h"
29 #endif
30 
31 class TDataMember;
32 
33 
34 class TRealData : public TObject {
35 
36 private:
37  TDataMember *fDataMember; //pointer to data member descriptor
38  Long_t fThisOffset; //offset with the THIS object pointer
39  TString fName; //Concatenated names of this realdata
40  TMemberStreamer *fStreamer; //Object to stream the data member.
41  Bool_t fIsObject; //true if member is an object
42 
43  TRealData(const TRealData& rhs); // Copying TRealData in not allowed.
44  TRealData& operator=(const TRealData& rhs); // Copying TRealData in not allowed.
45 
46 public:
47  enum {
48  kTransient = BIT(14) // The member is transient.
49  };
50 
51  TRealData();
52  TRealData(const char *name, Long_t offset, TDataMember *datamember);
53  virtual ~TRealData();
54 
56  virtual const char *GetName() const {return fName.Data();}
59  Long_t GetThisOffset() const {return fThisOffset;}
60  Bool_t IsObject() const {return fIsObject;}
61  void SetIsObject(Bool_t isObject) {fIsObject=isObject;}
62  void WriteRealData(void *pointer, char *&buffer);
63 
64  static void GetName(TString &output, TDataMember *dm);
65 
66  ClassDef(TRealData,0) //Description of persistent data members
67 };
68 
69 #endif
70 
TMemberStreamer * fStreamer
Definition: TRealData.h:40
void SetIsObject(Bool_t isObject)
Definition: TRealData.h:61
Bool_t fIsObject
Definition: TRealData.h:41
All ROOT classes may have RTTI (run time type identification) support added.
Definition: TDataMember.h:33
TRealData()
RealData default constructor.
Definition: TRealData.cxx:33
#define BIT(n)
Definition: Rtypes.h:120
TRealData & operator=(const TRealData &rhs)
Basic string class.
Definition: TString.h:137
bool Bool_t
Definition: RtypesCore.h:59
#define ClassDef(name, id)
Definition: Rtypes.h:254
void AdoptStreamer(TMemberStreamer *p)
Definition: TRealData.cxx:67
Long_t GetThisOffset() const
Definition: TRealData.h:59
virtual ~TRealData()
RealData default destructor.
Definition: TRealData.cxx:52
void WriteRealData(void *pointer, char *&buffer)
Write one persistent data member on output buffer.
Definition: TRealData.cxx:61
TDataMember * GetDataMember() const
Definition: TRealData.h:57
TMemberStreamer * GetStreamer() const
Return the associate streamer object.
Definition: TRealData.cxx:115
Long_t fThisOffset
Definition: TRealData.h:38
The TRealData class manages the effective list of all data members for a given class.
Definition: TRealData.h:34
long Long_t
Definition: RtypesCore.h:50
Mother of all ROOT objects.
Definition: TObject.h:37
TDataMember * fDataMember
Definition: TRealData.h:37
TString fName
Definition: TRealData.h:39
virtual const char * GetName() const
Returns name of object.
Definition: TRealData.h:56
Bool_t IsObject() const
Definition: TRealData.h:60
char name[80]
Definition: TGX11.cxx:109
const char * Data() const
Definition: TString.h:349