// $Id: IDbiString.cxx,v 1.1 2011/01/18 05:49:20 finch Exp $ #include #include "IDbiString.hxx" #include #include using std::endl; ClassImp(COMET::IDbiString) // Definition of static data members // ********************************* // Definition of member functions (alphabetical order) // *************************************************** //..................................................................... COMET::IDbiString::IDbiString() { // // // Purpose: Default constructor // // Arguments: None. // // Return: n/a // // Contact: N. West // // Specification:- // ============= // // o Create COMET::IDbiString. // Program Notes:- // ============= // None. COMETTrace( "Creating COMET::IDbiString" << " "); } //..................................................................... COMET::IDbiString::IDbiString(const Char_t* str) : fString(str) { // // // Purpose: Constructor from Char_t*. // // Arguments: // str in Initial string. // // Return: n/a // // Contact: N. West // // Specification:- // ============= // // o Create COMET::IDbiString. // Program Notes:- // ============= // None. COMETTrace( "Creating COMET::IDbiString" << " "); } //..................................................................... COMET::IDbiString::IDbiString(const std::string& str) : fString(str) { // // // Purpose: Constructor from string. // // Arguments: // str in Initial string. // // Return: n/a // // Contact: N. West // // Specification:- // ============= // // o Create COMET::IDbiString. // Program Notes:- // ============= // None. COMETTrace( "Creating COMET::IDbiString" << " "); } //..................................................................... COMET::IDbiString::~IDbiString() { // // // Purpose: Destructor // // Arguments: // None. // // Return: n/a // // Contact: N. West // // Specification:- // ============= // // o Destroy COMET::IDbiString // Program Notes:- // ============= // None. COMETTrace( "Destroying COMET::IDbiString" << " "); } #define OUT(t,v) \ ostringstream out; \ out << v; \ fString.append(out.str()); \ return *this; COMET::IDbiString& COMET::IDbiString::operator<<(Int_t data) { OUT(Int_t,data) } COMET::IDbiString& COMET::IDbiString::operator<<(UInt_t data) { OUT(UInt_t,data) } COMET::IDbiString& COMET::IDbiString::operator<<(Float_t data) { OUT(Float_t,data) } COMET::IDbiString& COMET::IDbiString::operator<<(Char_t data) { fString.append(1,data); return *this; } COMET::IDbiString& COMET::IDbiString::operator<<(const Char_t* data) { fString.append(data); return *this; } COMET::IDbiString& COMET::IDbiString::operator<<(const std::string& data) { fString.append(data); return *this; }