#ifndef ROOT_TCollectionProxyFactory
#define ROOT_TCollectionProxyFactory
#include <typeinfo>
#include <vector>
#ifndef ROOT_TCollectionProxyInfo
#include "TCollectionProxyInfo.h"
#endif
#ifndef ROOT_TClassStreamer
#include "TClassStreamer.h"
#endif
#ifndef ROOT_TMemberStreamer
#include "TMemberStreamer.h"
#endif
class TBuffer;
class TGenCollectionProxy;
class TGenCollectionStreamer;
class TVirtualCollectionProxy;
class TEmulatedCollectionProxy;
#if defined(_WIN32)
#if _MSC_VER<1300
#define TYPENAME
#define R__VCXX6
#else
#define TYPENAME typename
#endif
#else
#define TYPENAME typename
#endif
class TCollectionProxyFactory {
public:
typedef TVirtualCollectionProxy Proxy_t;
#ifdef R__HPUX
typedef const type_info& Info_t;
#else
typedef const std::type_info& Info_t;
#endif
static TVirtualCollectionProxy* GenEmulatedProxy(const char* class_name);
static TClassStreamer* GenEmulatedClassStreamer(const char* class_name);
static TMemberStreamer* GenEmulatedMemberStreamer(const char* class_name);
static Proxy_t* GenExplicitProxy( const ::ROOT::TCollectionProxyInfo &info, TClass *cl );
template <class T> static Proxy_t* GenProxy(const T &arg, TClass *cl) {
return GenExplicitProxy( ::ROOT::TCollectionProxyInfo::Get(arg), cl );
}
static TGenCollectionStreamer*
GenExplicitStreamer( const ::ROOT::TCollectionProxyInfo &info, TClass *cl );
static TClassStreamer*
GenExplicitClassStreamer( const ::ROOT::TCollectionProxyInfo &info, TClass *cl );
template <class T> static TClassStreamer* GenClassStreamer(const T &arg, TClass *cl) {
return GenExplicitClassStreamer(::ROOT::TCollectionProxyInfo::Get(arg), cl);
}
static TMemberStreamer*
GenExplicitMemberStreamer(const ::ROOT::TCollectionProxyInfo &info, TClass *cl);
template <class T> static TMemberStreamer* GenMemberStreamer(const T &arg, TClass *cl) {
return GenExplicitMemberStreamer(::ROOT::TCollectionProxyInfo::Get(arg), cl);
}
};
class TCollectionStreamer {
private:
TCollectionStreamer& operator=(const TCollectionStreamer&);
protected:
TGenCollectionProxy* fStreamer;
void InvalidProxyError();
public:
TCollectionStreamer();
TCollectionStreamer(const TCollectionStreamer& c);
virtual ~TCollectionStreamer();
void AdoptStreamer(TGenCollectionProxy* streamer);
void Streamer(TBuffer &refBuffer, void *pObject, int siz, TClass *onFileClass );
};
class TCollectionClassStreamer : public TClassStreamer, public TCollectionStreamer {
public:
TCollectionClassStreamer() : TClassStreamer(0) { }
TCollectionClassStreamer(const TCollectionClassStreamer& c)
: TClassStreamer(c), TCollectionStreamer(c) { }
virtual ~TCollectionClassStreamer() { }
virtual void operator()(TBuffer &buff, void *pObj ) { Streamer(buff,pObj,0,fOnFileClass); }
virtual TClassStreamer *Generate() {
return new TCollectionClassStreamer(*this);
}
TGenCollectionProxy *GetXYZ() { return TCollectionStreamer::fStreamer; }
};
class TCollectionMemberStreamer : public TMemberStreamer, public TCollectionStreamer {
public:
TCollectionMemberStreamer() : TMemberStreamer(0) { }
TCollectionMemberStreamer(const TCollectionMemberStreamer& c)
: TMemberStreamer(c), TCollectionStreamer(c) { }
virtual ~TCollectionMemberStreamer() { }
virtual void operator()(TBuffer &buff,void *pObj,Int_t siz=0)
{ Streamer(buff, pObj, siz, 0); }
};
#endif
Last change: Fri Sep 19 09:32:38 2008
Last generated: 2008-09-19 09:32
This page has been automatically generated. If you have any comments or suggestions about the page layout send a mail to ROOT support, or contact the developers with any questions or problems regarding ROOT.