Logo ROOT   6.08/07
Reference Guide
TMemberStreamer.h
Go to the documentation of this file.
1 // @(#)root/meta:$Id$
2 // Author: Victor Perev and Philippe Canal 08/05/02
3 
4 /*************************************************************************
5  * Copyright (C) 1995-2003, Rene Brun, Fons Rademakers and al. *
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_TMemberStreamer
13 #define ROOT_TMemberStreamer
14 
15 #include "Rtypes.h"
16 #include "TClassRef.h"
17 
18 //////////////////////////////////////////////////////////////////////////
19 // //
20 // TMemberStreamer is used to stream a data member. //
21 // //
22 // The address passed to operator() will be the address of the data //
23 // member. //
24 // //
25 //////////////////////////////////////////////////////////////////////////
26 
28 protected:
30 
31 public:
34  TMemberStreamer &operator=(const TMemberStreamer &rhs) { fStreamer = rhs.fStreamer; return *this; }
35 
36  virtual ~TMemberStreamer(){};
37 
38  virtual void SetOnFileClass( const TClass* cl ) { fOnFileClass = const_cast<TClass*>(cl); }
39  virtual const TClass* GetOnFileClass() const { return fOnFileClass; }
40 
41  virtual void operator()(TBuffer &b, void *pmember, Int_t size=0)
42  {
43  // The address passed to operator() will be the address of the data member.
44  // If the data member is a variable size array, 'size' is the number of elements
45  // to read/write
46 
47  (*fStreamer)(b,pmember,size);
48  }
49 
50 private:
53 };
54 
55 #endif
TMemberStreamer & operator=(const TMemberStreamer &rhs)
Buffer base class used for serializing objects.
Definition: TBuffer.h:42
int Int_t
Definition: RtypesCore.h:41
TClassRef fOnFileClass
TMemberStreamer(MemberStreamerFunc_t pointer)
void(* MemberStreamerFunc_t)(TBuffer &, void *, Int_t)
Definition: Rtypes.h:69
virtual ~TMemberStreamer()
The ROOT global object gROOT contains a list of all defined classes.
Definition: TClass.h:81
virtual const TClass * GetOnFileClass() const
TMemberStreamer(const TMemberStreamer &rhs)
MemberStreamerFunc_t fStreamer
TClassRef is used to implement a permanent reference to a TClass object.
Definition: TClassRef.h:33
you should not use this method at all Int_t Int_t Double_t Double_t Double_t Int_t Double_t Double_t Double_t Double_t b
Definition: TRolke.cxx:630
virtual void operator()(TBuffer &b, void *pmember, Int_t size=0)
virtual void SetOnFileClass(const TClass *cl)