/usr/include/root/TMemberStreamer.h is in libroot-core-dev 5.34.14-1build1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 | // @(#)root/meta:$Id$
// Author: Victor Perev and Philippe Canal 08/05/02
/*************************************************************************
* Copyright (C) 1995-2003, Rene Brun, Fons Rademakers and al. *
* All rights reserved. *
* *
* For the licensing terms see $ROOTSYS/LICENSE. *
* For the list of contributors see $ROOTSYS/README/CREDITS. *
*************************************************************************/
#ifndef ROOT_TMemberStreamer
#define ROOT_TMemberStreamer
#include "Rtypes.h"
#include "TClassRef.h"
//////////////////////////////////////////////////////////////////////////
// //
// TMemberStreamer is used to stream a data member. //
// //
// The address passed to operator() will be the address of the data //
// member. //
// //
//////////////////////////////////////////////////////////////////////////
class TMemberStreamer {
protected:
TMemberStreamer() : fStreamer(0) {};
public:
TMemberStreamer(MemberStreamerFunc_t pointer) : fStreamer(pointer) {};
TMemberStreamer(const TMemberStreamer &rhs) : fStreamer(rhs.fStreamer) {};
TMemberStreamer &operator=(const TMemberStreamer &rhs) { fStreamer = rhs.fStreamer; return *this; }
virtual ~TMemberStreamer(){};
virtual void SetOnFileClass( const TClass* cl ) { fOnFileClass = const_cast<TClass*>(cl); }
virtual const TClass* GetOnFileClass() const { return fOnFileClass; }
virtual void operator()(TBuffer &b, void *pmember, Int_t size=0)
{
// The address passed to operator() will be the address of the data member.
// If the data member is a variable size array, 'size' is the number of elements
// to read/write
(*fStreamer)(b,pmember,size);
}
private:
MemberStreamerFunc_t fStreamer;
TClassRef fOnFileClass;
};
#endif
|