Logo ROOT   6.12/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 #include "TObject.h"
25 #include "TString.h"
26 
27 class TDataMember;
28 
29 
30 class TRealData : public TObject {
31 
32 private:
33  TDataMember *fDataMember; //pointer to data member descriptor
34  Long_t fThisOffset; //offset with the THIS object pointer
35  TString fName; //Concatenated names of this realdata
36  TMemberStreamer *fStreamer; //Object to stream the data member.
37  Bool_t fIsObject; //true if member is an object
38 
39  TRealData(const TRealData& rhs); // Copying TRealData in not allowed.
40  TRealData& operator=(const TRealData& rhs); // Copying TRealData in not allowed.
41 
42 public:
43  enum EStatusBits {
44  kTransient = BIT(14) // The member is transient.
45  };
46 
47  TRealData();
48  TRealData(const char *name, Long_t offset, TDataMember *datamember);
49  virtual ~TRealData();
50 
52  virtual const char *GetName() const {return fName.Data();}
55  Long_t GetThisOffset() const {return fThisOffset;}
56  Bool_t IsObject() const {return fIsObject;}
57  void SetIsObject(Bool_t isObject) {fIsObject=isObject;}
58  void WriteRealData(void *pointer, char *&buffer);
59 
60  static void GetName(TString &output, TDataMember *dm);
61 
62  ClassDef(TRealData,0) //Description of persistent data members
63 };
64 
65 #endif
66 
TMemberStreamer * fStreamer
Definition: TRealData.h:36
void SetIsObject(Bool_t isObject)
Definition: TRealData.h:57
Bool_t fIsObject
Definition: TRealData.h:37
All ROOT classes may have RTTI (run time type identification) support added.
Definition: TDataMember.h:31
TRealData()
RealData default constructor.
Definition: TRealData.cxx:33
#define BIT(n)
Definition: Rtypes.h:78
TRealData & operator=(const TRealData &rhs)
Basic string class.
Definition: TString.h:125
bool Bool_t
Definition: RtypesCore.h:59
#define ClassDef(name, id)
Definition: Rtypes.h:320
void AdoptStreamer(TMemberStreamer *p)
Definition: TRealData.cxx:67
Long_t GetThisOffset() const
Definition: TRealData.h:55
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:53
TMemberStreamer * GetStreamer() const
Return the associate streamer object.
Definition: TRealData.cxx:115
Long_t fThisOffset
Definition: TRealData.h:34
The TRealData class manages the effective list of all data members for a given class.
Definition: TRealData.h:30
long Long_t
Definition: RtypesCore.h:50
EStatusBits
Definition: TObject.h:57
Mother of all ROOT objects.
Definition: TObject.h:37
TDataMember * fDataMember
Definition: TRealData.h:33
TString fName
Definition: TRealData.h:35
virtual const char * GetName() const
Returns name of object.
Definition: TRealData.h:52
Bool_t IsObject() const
Definition: TRealData.h:56
char name[80]
Definition: TGX11.cxx:109
const char * Data() const
Definition: TString.h:345