ManualBase4Body.h

Go to the documentation of this file.
00001 #include "TInterpreter.h"
00002 
00003 static int  G__ManualBase4_101_0_97(G__value *result7,G__CONST char *funcname,struct G__param *libp,int hash) {
00004    // Wrapper function for TDirectory::WriteObject
00005    // We need to emulate:
00006    //    return WriteObjectAny(obj,TClass::GetClass(typeid(T)),name,option);
00007 
00008    // Here find the class name 
00009    ClassInfo_t* ti = gInterpreter->ClassInfo_Factory( &libp->para[0] );
00010 
00011    switch(libp->paran) {
00012    case 3:
00013       G__letint(result7,105,(long)((TDirectory*)(G__getstructoffset()))->WriteObjectAny((const void*)G__int(libp->para[0]),gInterpreter->ClassInfo_FullName( ti ),(const char*)G__int(libp->para[1])
00014 ,(Option_t*)G__int(libp->para[2])));
00015       break;
00016    case 2:
00017       G__letint(result7,105,(long)((TDirectory*)(G__getstructoffset()))->WriteObjectAny((const void*)G__int(libp->para[0]),gInterpreter->ClassInfo_FullName( ti ),(const char*)G__int(libp->para[1])));
00018       break;
00019    }
00020    gInterpreter->ClassInfo_Delete( ti );
00021    return(1 || funcname || hash || result7 || libp) ;
00022 }
00023 
00024 static int G__ManualBase4_101_0_98(G__value *result7,G__CONST char *funcname,struct G__param *libp,int hash) {
00025    // We need to emulate:
00026    //     ptr = (T*)GetObjectChecked(namecycle,TClass::GetClass(typeid(T)));
00027 
00028    // Here find the class name 
00029    ClassInfo_t* ti = gInterpreter->ClassInfo_Factory( &libp->para[1] );
00030 
00031    G__setnull(result7);
00032    TDirectory *directory = ((TDirectory*)(G__getstructoffset()));
00033    const char* namecycle = (const char*)G__int(libp->para[0]);
00034    void *ptr = directory->GetObjectChecked( namecycle, gInterpreter->ClassInfo_FullName( ti ) );
00035    void **ptrarg;
00036    if ( libp->para[1].ref ) {
00037       ptrarg = (void**)libp->para[1].ref;
00038    } else {
00039       ptrarg = (void**)(&G__Mlong(libp->para[1]));
00040    }
00041    *ptrarg = ptr;
00042 
00043    gInterpreter->ClassInfo_Delete( ti );
00044    return(1 || funcname || hash || result7 || libp) ;
00045 }
00046 
00047 /* Setting up global function */
00048 static int G__ManualBase4__0_211(G__value* result7, G__CONST char* funcname, struct G__param* libp, int hash)
00049 {
00050    // We need to emulate: template <class Tmpl> TBuffer &operator>>(TBuffer &buf, Tmpl *&obj)
00051 
00052    // Here find the class name 
00053    ClassInfo_t* ti = gInterpreter->ClassInfo_Factory( &libp->para[1] );
00054 
00055    TBuffer & buf( *(TBuffer*) libp->para[0].ref );
00056 
00057    TClass *cl = TBuffer::GetClass(gInterpreter->ClassInfo_FullName( ti ));
00058    void * obj = buf.ReadObjectAny(cl);
00059 
00060    void **ptr = libp->para[1].ref ? (void**) libp->para[1].ref : (void**) (&G__Mlong(libp->para[1])) ;
00061 
00062    *ptr = obj;
00063 
00064    result7->ref = (long) (&buf);
00065    result7->obj.i = (long) (&buf);
00066 
00067    gInterpreter->ClassInfo_Delete( ti );
00068    return(1 || funcname || hash || result7 || libp) ;
00069 }
00070 
00071 static int G__ManualBase4__0_212(G__value* result7, G__CONST char* funcname, struct G__param* libp, int hash)
00072 {
00073    // We need to emulate template <class Tmpl> TBuffer &operator<<(TBuffer &buf, const Tmpl *obj)
00074 
00075    // Here find the class name 
00076    ClassInfo_t* ti = gInterpreter->ClassInfo_Factory( &libp->para[1] );
00077 
00078    TBuffer & buf( *(TBuffer*) libp->para[0].ref );
00079 
00080    const void *obj = (const void*) G__int(libp->para[1]);
00081 
00082    TClass *cl = (obj) ? TBuffer::GetClass(gInterpreter->ClassInfo_FullName( ti )) : 0;
00083    buf.WriteObjectAny(obj, cl);
00084 
00085    result7->ref = (long) (&buf);
00086    result7->obj.i = (long) (&buf);
00087 
00088    gInterpreter->ClassInfo_Delete( ti );
00089    return(1 || funcname || hash || result7 || libp) ;
00090 }
00091 

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