Logo ROOT   6.12/07
Reference Guide
String.cxx
Go to the documentation of this file.
1 // @(#)root/base:$Id$
2 // Author: Philippe Canal 03/09/2003
3 
4 /*************************************************************************
5  * Copyright (C) 1995-2000, Rene Brun, Fons Rademakers and al. *
6  * All rights reserved. *
7  * *
8  * For the licensing terms see $ROOTSYS/LICENSE. *
9  * For the list of contributors see $ROOTSYS/README/CREDITS. *
10  *************************************************************************/
11 
12 //////////////////////////////////////////////////////////////////////////
13 // //
14 // std::string helper utilities //
15 // //
16 //////////////////////////////////////////////////////////////////////////
17 
18 #include "RConfig.h"
19 #include <string>
20 #include "TBuffer.h"
21 
22 namespace std {} using namespace std;
23 
24 void std_string_streamer(TBuffer &b, void *objadd)
25 {
26  // Streamer function for std::string object.
27  if (b.IsReading()) {
28  b.ReadStdString((std::string*)objadd);
29  } else {
30  b.WriteStdString((std::string*)objadd);
31  }
32 }
33 
34 // Declare the streamer to the string TClass object
36 
37 // Set a version number of the string TClass object
38 RootClassVersion(string,2);
39 
40 
Bool_t IsReading() const
Definition: TBuffer.h:83
void std_string_streamer(TBuffer &b, void *objadd)
Definition: String.cxx:24
Buffer base class used for serializing objects.
Definition: TBuffer.h:40
STL namespace.
RootClassVersion(string, 2)
virtual void ReadStdString(std::string *s)=0
RootStreamer(string, std_string_streamer)
you should not use this method at all Int_t Int_t Double_t Double_t Double_t Int_t Double_t Double_t Double_t Double_t b
Definition: TRolke.cxx:630
virtual void WriteStdString(const std::string *s)=0