Logo ROOT  
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 <ROOT/RConfig.hxx>
19 #include "TBuffer.h"
20 
21 #include <string>
22 
23 using namespace std;
24 
25 void std_string_streamer(TBuffer &b, void *objadd)
26 {
27  // Streamer function for std::string object.
28  if (b.IsReading()) {
29  b.ReadStdString((std::string*)objadd);
30  } else {
31  b.WriteStdString((std::string*)objadd);
32  }
33 }
34 
35 // Declare the streamer to the string TClass object
37 
38 // Set a version number of the string TClass object
39 RootClassVersion(string,2);
40 
41 
TBuffer
Definition: TBuffer.h:43
RConfig.hxx
b
#define b(i)
Definition: RSha256.hxx:118
TBuffer.h
std_string_streamer
void std_string_streamer(TBuffer &b, void *objadd)
Definition: String.cxx:25
RootClassVersion
RootClassVersion(string, 2)
RootStreamer
RootStreamer(string, std_string_streamer)