#include <RegistryItemXxx.h>
Inheritance diagram for RegistryItemXxx< T >:

Public Member Functions | |
| RegistryItemXxx () | |
| ~RegistryItemXxx () | |
| void | Dump () const |
| void | Print (Option_t *="") const |
| virtual std::ostream & | PrintStream (std::ostream &os) const |
| virtual std::istream & | ReadStream (std::istream &is) |
| virtual const type_info & | GetType () const |
| virtual const char * | GetTypeAsString () const |
| template<> | |
| void | Streamer (TBuffer &buf) |
| template<> | |
| void | Streamer (TBuffer &buf) |
| template<> | |
| std::ostream & | PrintStream (std::ostream &os) const |
| template<> | |
| std::istream & | ReadStream (std::istream &is) |
| template<> | |
| ~RegistryItemXxx () | |
| template<> | |
| RegistryItem * | Dup (void) const |
| template<> | |
| RegistryItem * | Dup (void) const |
| template<> | |
| void | Streamer (TBuffer &buf) |
| template<> | |
| void | Streamer (TBuffer &buf) |
| template<> | |
| ~RegistryItemXxx () | |
| template<> | |
| std::ostream & | PrintStream (std::ostream &os) const |
| template<> | |
| std::istream & | ReadStream (std::istream &is) |
| template<> | |
| const char * | GetTypeAsString (void) const |
| template<> | |
| const char * | GetTypeAsString (void) const |
| template<> | |
| const char * | GetTypeAsString (void) const |
| template<> | |
| const char * | GetTypeAsString (void) const |
| template<> | |
| const char * | GetTypeAsString (void) const |
| template<> | |
| std::ostream & | PrintStream (std::ostream &os) const |
| template<> | |
| std::istream & | ReadStream (std::istream &is) |
Private Member Functions | |
| RegistryItemXxx (T *data) | |
| T * | Get (void) |
| void | Set (T *data) |
| RegistryItem * | Dup (void) const |
Private Attributes | |
| T * | fData |
Friends | |
| class | Registry |
Definition at line 28 of file RegistryItemXxx.h.
| RegistryItemXxx< T >::RegistryItemXxx | ( | ) |
| RegistryItemXxx< T >::~RegistryItemXxx | ( | ) |
| RegistryItemXxx< T >::RegistryItemXxx | ( | T * | data | ) | [private] |
| RegistryItemXxx< const char * >::~RegistryItemXxx | ( | ) |
Definition at line 205 of file RegistryItemXxx.cxx.
References RegistryItemXxx< T >::fData.
00206 { 00207 if (fData) { 00208 if (*fData) { 00209 delete [] *fData; 00210 *fData = 0; 00211 } 00212 delete fData; 00213 fData = 0; 00214 } 00215 }
| RegistryItemXxx< const char * >::~RegistryItemXxx | ( | ) |
| void RegistryItemXxx< T >::Dump | ( | void | ) | const [inline] |
Definition at line 37 of file RegistryItemXxx.h.
References RegistryItemXxx< T >::fData.
00037 { std::cerr << *fData; }
| RegistryItem * RegistryItemXxx< const char * >::Dup | ( | void | ) | const [virtual] |
Implements RegistryItem.
| RegistryItem * RegistryItemXxx< const char * >::Dup | ( | void | ) | const [virtual] |
Implements RegistryItem.
Definition at line 218 of file RegistryItemXxx.cxx.
References RegistryItemXxx< T >::fData.
00219 { 00220 char** ppc = new char*; 00221 (*ppc) = new char [strlen(*fData)+1]; 00222 strcpy(*ppc,*fData); 00223 const char** ppcc = const_cast<const char**>(ppc); 00224 return new RegistryItemXxx< const char* >(ppcc); 00225 }
| RegistryItem * RegistryItemXxx< T >::Dup | ( | void | ) | const [private, virtual] |
Implements RegistryItem.
Definition at line 102 of file RegistryItemXxx.h.
References RegistryItemXxx< T >::fData.
00103 { 00104 return new RegistryItemXxx<T>(new T (*fData)); 00105 }
| T * RegistryItemXxx< T >::Get | ( | void | ) | [private] |
Definition at line 112 of file RegistryItemXxx.h.
References RegistryItemXxx< T >::fData.
Referenced by Registry::Get().
00113 { 00114 return fData; 00115 }
| virtual const type_info& RegistryItemXxx< T >::GetType | ( | ) | const [inline, virtual] |
| const char * RegistryItemXxx< Registry >::GetTypeAsString | ( | void | ) | const [virtual] |
Implements RegistryItem.
| const char * RegistryItemXxx< const char * >::GetTypeAsString | ( | void | ) | const [virtual] |
Implements RegistryItem.
| const char * RegistryItemXxx< double >::GetTypeAsString | ( | void | ) | const [virtual] |
Implements RegistryItem.
| const char * RegistryItemXxx< int >::GetTypeAsString | ( | void | ) | const [virtual] |
Implements RegistryItem.
| const char * RegistryItemXxx< char >::GetTypeAsString | ( | void | ) | const [virtual] |
Implements RegistryItem.
| virtual const char* RegistryItemXxx< T >::GetTypeAsString | ( | void | ) | const [inline, virtual] |
| void RegistryItemXxx< T >::Print | ( | Option_t * | = "" |
) | const [inline, virtual] |
Implements RegistryItem.
Definition at line 38 of file RegistryItemXxx.h.
References RegistryItemXxx< T >::fData.
00038 { std::cout << *fData; }
| std::ostream & RegistryItemXxx< Registry >::PrintStream | ( | std::ostream & | os | ) | const [virtual] |
Implements RegistryItem.
| std::ostream & RegistryItemXxx< const char * >::PrintStream | ( | std::ostream & | os | ) | const [virtual] |
Implements RegistryItem.
| std::ostream & RegistryItemXxx< const char * >::PrintStream | ( | std::ostream & | os | ) | const [virtual] |
Implements RegistryItem.
Definition at line 179 of file RegistryItemXxx.cxx.
References RegistryItemXxx< T >::fData.
00180 { 00181 os << "'" << *fData << "'"; 00182 return os; 00183 }
| virtual std::ostream& RegistryItemXxx< T >::PrintStream | ( | std::ostream & | os | ) | const [inline, virtual] |
Implements RegistryItem.
Definition at line 40 of file RegistryItemXxx.h.
References RegistryItemXxx< T >::fData.
00040 { 00041 return os << *fData; 00042 }
| std::istream & RegistryItemXxx< Registry >::ReadStream | ( | std::istream & | is | ) | [virtual] |
Implements RegistryItem.
| std::istream & RegistryItemXxx< const char * >::ReadStream | ( | std::istream & | is | ) | [virtual] |
Implements RegistryItem.
| std::istream & RegistryItemXxx< const char * >::ReadStream | ( | std::istream & | is | ) | [virtual] |
Implements RegistryItem.
Definition at line 186 of file RegistryItemXxx.cxx.
References RegistryItemXxx< T >::fData, and Util::read_quoted_string().
00187 { 00188 string stot = Util::read_quoted_string(is); 00189 00190 if (!fData) { 00191 char** ppchar = new char*; 00192 *ppchar = 0; 00193 fData = const_cast<const char**>(ppchar); 00194 } 00195 if (*fData) delete [] *fData; 00196 00197 char* pchar = new char[stot.length() + 1]; 00198 strcpy(pchar,stot.c_str()); 00199 *fData = const_cast<const char*>(pchar); 00200 return is; 00201 }
| virtual std::istream& RegistryItemXxx< T >::ReadStream | ( | std::istream & | is | ) | [inline, virtual] |
Implements RegistryItem.
Definition at line 43 of file RegistryItemXxx.h.
References RegistryItemXxx< T >::fData.
| void RegistryItemXxx< T >::Set | ( | T * | data | ) | [private] |
Definition at line 118 of file RegistryItemXxx.h.
References RegistryItemXxx< T >::fData.
00119 { 00120 if (fData) delete fData; 00121 fData = data; 00122 }
| void RegistryItemXxx< char >::Streamer | ( | TBuffer & | buf | ) |
| void RegistryItemXxx< const char * >::Streamer | ( | TBuffer & | buf | ) |
| void RegistryItemXxx< char >::Streamer | ( | TBuffer & | buf | ) |
Definition at line 160 of file RegistryItemXxx.cxx.
References RegistryItemXxx< T >::fData, and Registry::Streamer().
00161 { 00162 if (buf.IsReading()) { 00163 Version_t v = buf.ReadVersion(); 00164 if (v) { } 00165 RegistryItem::Streamer(buf); 00166 00167 char c; 00168 buf >> c; 00169 fData = new char(c); 00170 } 00171 else { 00172 buf.WriteVersion(IsA()); 00173 RegistryItem::Streamer(buf); 00174 buf << *fData; 00175 } 00176 }
| void RegistryItemXxx< T >::Streamer | ( | TBuffer & | buf | ) |
Definition at line 127 of file RegistryItemXxx.cxx.
References RegistryItemXxx< T >::fData, and Registry::Streamer().
00128 { 00129 if (buf.IsReading()) { 00130 Version_t v = buf.ReadVersion(); 00131 if (v) { } 00132 RegistryItem::Streamer(buf); 00133 00134 std::string str = ""; 00135 char x[2]; 00136 x[1] = '\0'; 00137 00138 do { // read out string one byte at a time 00139 buf >> x[0]; 00140 str += x; 00141 } while (x[0]); 00142 00143 char** ppchar = new char*; 00144 *ppchar = new char[str.length() + 1]; 00145 strcpy(*ppchar,str.c_str()); 00146 (*ppchar)[str.length()] = '\0'; // paranoia 00147 fData = const_cast<const char**>(ppchar); 00148 } 00149 else { 00150 buf.WriteVersion(IsA()); 00151 RegistryItem::Streamer(buf); 00152 buf << (*fData); 00153 } 00154 }
friend class Registry [friend] |
Definition at line 32 of file RegistryItemXxx.h.
T* RegistryItemXxx< T >::fData [private] |
Definition at line 58 of file RegistryItemXxx.h.
Referenced by RegistryItemXxx< T >::Dump(), RegistryItemXxx< T >::Dup(), RegistryItemXxx< T >::Get(), RegistryItemXxx< T >::Print(), RegistryItemXxx< T >::PrintStream(), RegistryItemXxx< T >::ReadStream(), RegistryItemXxx< T >::Set(), RegistryItemXxx< T >::Streamer(), and RegistryItemXxx< T >::~RegistryItemXxx().
1.4.7