TContainerConverters.h

Go to the documentation of this file.
00001 // @(#)root/io:$Id: TContainerConverters.h 34914 2010-08-20 19:28:06Z pcanal $
00002 // Author: Philippe Canal 11/11/2004
00003 
00004 /*************************************************************************
00005  * Copyright (C) 1995-2004, Rene Brun and Fons Rademakers.               *
00006  * All rights reserved.                                                  *
00007  *                                                                       *
00008  * For the licensing terms see $ROOTSYS/LICENSE.                         *
00009  * For the list of contributors see $ROOTSYS/README/CREDITS.             *
00010  *************************************************************************/
00011 #ifndef ROOT_TContainerConverters
00012 #define ROOT_TContainerConverters
00013 
00014 //////////////////////////////////////////////////////////////////////////
00015 //                                                                      //
00016 //  Small helper to read a TBuffer containing a TClonesArray into any   //
00017 //  valid collection.                                                   //
00018 //                                                                      //
00019 //////////////////////////////////////////////////////////////////////////
00020 
00021 #ifndef ROOT_TMemberStreamer
00022 #include "TMemberStreamer.h"
00023 #endif
00024 
00025 class TVirtualCollectionProxy;
00026 class TGenCollectionStreamer;
00027 class TClassStreamer;
00028 
00029 class TConvertClonesArrayToProxy : public TMemberStreamer {
00030    Bool_t fIsPointer;
00031    Bool_t fIsPrealloc;
00032    UInt_t fOffset;
00033    TVirtualCollectionProxy *fProxy;
00034 public:
00035    TConvertClonesArrayToProxy(TVirtualCollectionProxy *proxy, Bool_t isPointer, Bool_t isPrealloc);
00036    ~TConvertClonesArrayToProxy();
00037    void operator()(TBuffer &b, void *pmember, Int_t size=0);
00038 };
00039 
00040 class TConvertMapToProxy : public TMemberStreamer {
00041    Bool_t fIsPointer;
00042    Bool_t fIsPrealloc;
00043    UInt_t fSizeOf;
00044    TVirtualCollectionProxy *fProxy;
00045    TGenCollectionStreamer  *fCollectionStreamer;
00046 
00047 public:
00048    TConvertMapToProxy(TClassStreamer *streamer, Bool_t isPointer, Bool_t isPrealloc);
00049    void operator()(TBuffer &b, void *pmember, Int_t size=0);
00050    Bool_t IsValid() { return fCollectionStreamer != 0; }
00051 };
00052 
00053 #endif

Generated on Tue Jul 5 14:26:42 2011 for ROOT_528-00b_version by  doxygen 1.5.1