Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

DbiString.cxx

Go to the documentation of this file.
00001 // $Id: DbiString.cxx,v 1.6 2006/08/08 10:51:32 west Exp $
00002 
00003 #include <sstream>
00004 
00005 #include "DatabaseInterface/DbiString.h"
00006 #include "LeakChecker/Lea.h"
00007 #include "MessageService/MsgService.h"
00008 
00009 ClassImp(DbiString)
00010 
00011 
00012 //   Definition of static data members
00013 //   *********************************
00014 
00015 CVSID("$Id: DbiString.cxx,v 1.6 2006/08/08 10:51:32 west Exp $");
00016 
00017 // Definition of member functions (alphabetical order)
00018 // ***************************************************
00019 
00020 //.....................................................................
00021 
00022 DbiString::DbiString()
00023 {
00024 //
00025 //
00026 //  Purpose:  Default constructor
00027 //
00028 //  Arguments:  None.
00029 //
00030 //  Return:    n/a
00031 //
00032 //  Contact:   N. West
00033 //
00034 //  Specification:-
00035 //  =============
00036 //
00037 //  o  Create DbiString.
00038 
00039 
00040 //  Program Notes:-
00041 //  =============
00042 
00043 //  None.
00044 
00045   LEA_CTOR    //Leak Checker
00046 
00047   MSG("Dbi", Msg::kVerbose) << "Creating DbiString" << endl;
00048 
00049 }
00050 
00051 //.....................................................................
00052 
00053 DbiString::DbiString(const Char_t* str) :
00054 fString(str)
00055 {
00056 //
00057 //
00058 //  Purpose:  Constructor from Char_t*.
00059 //
00060 //  Arguments:
00061 //     str        in  Initial string.       
00062 //
00063 //  Return:    n/a
00064 //
00065 //  Contact:   N. West
00066 //
00067 //  Specification:-
00068 //  =============
00069 //
00070 //  o  Create DbiString.
00071 
00072 
00073 //  Program Notes:-
00074 //  =============
00075 
00076 //  None.
00077 
00078   LEA_CTOR    //Leak Checker
00079 
00080   MSG("Dbi", Msg::kVerbose) << "Creating DbiString" << endl;
00081 
00082 }
00083 
00084 //.....................................................................
00085 
00086 DbiString::DbiString(const std::string& str) :
00087 fString(str)
00088 {
00089 //
00090 //
00091 //  Purpose:  Constructor from string.
00092 //
00093 //  Arguments:
00094 //     str        in  Initial string.       
00095 //
00096 //  Return:    n/a
00097 //
00098 //  Contact:   N. West
00099 //
00100 //  Specification:-
00101 //  =============
00102 //
00103 //  o  Create DbiString.
00104 
00105 
00106 //  Program Notes:-
00107 //  =============
00108 
00109 //  None.
00110 
00111   LEA_CTOR    //Leak Checker
00112 
00113   MSG("Dbi", Msg::kVerbose) << "Creating DbiString" << endl;
00114 
00115 }
00116 
00117 //.....................................................................
00118 
00119 DbiString::~DbiString() {
00120 //
00121 //
00122 //  Purpose: Destructor
00123 //
00124 //  Arguments: 
00125 //    None.
00126 //
00127 //  Return:    n/a
00128 //
00129 //  Contact:   N. West
00130 //
00131 //  Specification:-
00132 //  =============
00133 //
00134 //  o  Destroy DbiString
00135 
00136 
00137 //  Program Notes:-
00138 //  =============
00139 
00140 //  None.
00141 
00142   LEA_DTOR    //Leak Checker
00143 
00144   MSG("Dbi", Msg::kVerbose) << "Destroying DbiString" << endl;
00145 
00146 }
00147 
00148 #define OUT(t,v)               \
00149     ostringstream out;         \
00150     out << v;                  \
00151     fString.append(out.str()); \
00152     return *this;
00153 
00154 
00155 DbiString& DbiString::operator<<(Int_t data)   { OUT(Int_t,data) }
00156 DbiString& DbiString::operator<<(UInt_t data)  { OUT(UInt_t,data) }
00157 DbiString& DbiString::operator<<(Float_t data) { OUT(Float_t,data) }
00158 DbiString& DbiString::operator<<(Char_t data) { 
00159                              fString.append(1,data); return *this; }
00160 DbiString& DbiString::operator<<(const Char_t* data) { 
00161                                fString.append(data); return *this; }
00162 DbiString& DbiString::operator<<(const std::string& data) { 
00163                                fString.append(data); return *this; }
00164 

Generated on Mon Feb 15 11:06:34 2010 for loon by  doxygen 1.3.9.1