00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018 #include "RConfig.h"
00019 #include <string>
00020 #include "TBuffer.h"
00021 #include "TString.h"
00022
00023 namespace std {} using namespace std;
00024
00025 void std_string_streamer(TBuffer &b, void *objadd)
00026 {
00027
00028 string *obj = (string*)objadd;
00029 Int_t nbig;
00030 UChar_t nwh;
00031 if (b.IsReading()) {
00032 b >> nwh;
00033 ;
00034 if (nwh == 0) {
00035 obj->clear();
00036 } else {
00037 if( obj->size() ) {
00038
00039 (*obj)[0] = '\0';
00040 }
00041 if (nwh == 255) {
00042 b >> nbig;
00043 obj->resize(nbig,'\0');
00044 b.ReadFastArray((char*)obj->data(),nbig);
00045 }
00046 else {
00047 obj->resize(nwh,'\0');
00048 b.ReadFastArray((char*)obj->data(),nwh);
00049 }
00050 }
00051 } else if ( obj ) {
00052 nbig = obj->length();
00053 if (nbig > 254) {
00054 nwh = 255;
00055 b << nwh;
00056 b << nbig;
00057 } else {
00058 nwh = UChar_t(nbig);
00059 b << nwh;
00060 }
00061 b.WriteFastArray(obj->data(),nbig);
00062 }
00063 }
00064
00065
00066 RootStreamer(string,std_string_streamer);
00067
00068
00069 RootClassVersion(string,2);
00070
00071