![]() |
|
|
Generated: 18 Jul 2008 |
#include <Property.h>
Inheritance diagram for PropertyWithValue< TYPE >:


Definition at line 147 of file Property.h.
Public Member Functions | |
| operator const TYPE & () const | |
| const TYPE & | value () const |
| get the access to the storage | |
| virtual bool | setValue (const TYPE &value)=0 |
| virtual bool | assign (const Property &source) |
| get the value from another property | |
| virtual bool | load (Property &dest) const |
| set value for another property | |
| virtual StatusCode | fromString (const std::string &s) |
| string -> value | |
| virtual std::string | toString () const |
| value -> string | |
| template<> | |
| std::string | toString () const |
| value -> string | |
| template<> | |
| bool | assign (const Property &source) |
| import the property value form the source | |
Protected Member Functions | |
| PropertyWithValue (const std::string &name, TYPE *value, const bool owner) | |
| the constructor with property name and value | |
| PropertyWithValue (const PropertyWithValue &rhs) | |
| copy constructor (don't let the compiler generate a buggy one) | |
| template<class OTHER> | |
| PropertyWithValue (const PropertyWithValue< OTHER > &right) | |
| copy constructor from any other type | |
| virtual | ~PropertyWithValue () |
| virtual destructor | |
| PropertyWithValue & | operator= (const TYPE &value) |
| assignement operator | |
| PropertyWithValue & | operator= (const PropertyWithValue &rhs) |
| template<class OTHER> | |
| PropertyWithValue & | operator= (const PropertyWithValue< OTHER > &right) |
| void | i_set (const TYPE &value) |
| TYPE * | i_get () const |
Private Attributes | |
| TYPE * | m_value |
| bool | m_own |
| PropertyWithValue< TYPE >::PropertyWithValue | ( | const std::string & | name, | |
| TYPE * | value, | |||
| const bool | owner | |||
| ) | [inline, protected] |
| PropertyWithValue< TYPE >::PropertyWithValue | ( | const PropertyWithValue< TYPE > & | rhs | ) | [inline, protected] |
copy constructor (don't let the compiler generate a buggy one)
Definition at line 208 of file Property.h.
References PropertyWithValue< TYPE >::value().
00209 : Property( right ) 00210 , m_value ( right.m_value ) 00211 , m_own ( right.own ) 00212 { if ( m_own ) { m_value = new TYPE(right.value()) ; } }
| PropertyWithValue< TYPE >::PropertyWithValue | ( | const PropertyWithValue< OTHER > & | right | ) | [inline, protected] |
copy constructor from any other type
Definition at line 219 of file Property.h.
References PropertyWithValue< TYPE >::value().
00220 : Property( right ) 00221 , m_value ( right.m_value ) 00222 , m_own ( right.own ) 00223 { if ( m_own ) { m_value = new TYPE(right.value()) ; } }
| PropertyWithValue< TYPE >::~PropertyWithValue | ( | ) | [inline, protected, virtual] |
virtual destructor
Definition at line 228 of file Property.h.
References PropertyWithValue< TYPE >::m_own, and PropertyWithValue< TYPE >::m_value.
| PropertyWithValue< TYPE > & PropertyWithValue< TYPE >::operator= | ( | const TYPE & | value | ) | [inline, protected] |
assignement operator
Reimplemented in PropertyWithVerifier< TYPE, VERIFIER >, SimpleProperty< TYPE, VERIFIER >, SimplePropertyRef< TYPE, VERIFIER >, and PropertyWithVerifier< std::vectorstring, BoundedVerifier< std::vectorstring > >.
Definition at line 235 of file Property.h.
References PropertyWithValue< TYPE >::setValue().
Referenced by PropertyWithVerifier< TYPE, VERIFIER >::operator=(), and PropertyWithValue< TYPE >::operator=().
00236 { 00237 if ( !setValue ( value ) ) 00238 { throw std::out_of_range( "Value not verified" ) ; } 00239 return *this ; 00240 }
| PropertyWithValue< TYPE > & PropertyWithValue< TYPE >::operator= | ( | const PropertyWithValue< TYPE > & | rhs | ) | [protected] |
Definition at line 323 of file Property.h.
References PropertyWithValue< TYPE >::operator=(), and PropertyWithValue< TYPE >::value().
00324 { 00325 // assign the base class 00326 Property::operator=( right ) ; 00327 // assign the value 00328 PropertyWithValue<TYPE>::operator=( right.value() ) ; 00329 return *this ; 00330 }
| PropertyWithValue< TYPE > & PropertyWithValue< TYPE >::operator= | ( | const PropertyWithValue< OTHER > & | right | ) | [protected] |
Reimplemented in PropertyWithVerifier< TYPE, VERIFIER >, SimpleProperty< TYPE, VERIFIER >, SimplePropertyRef< TYPE, VERIFIER >, PropertyWithVerifier< std::vectorstring, BoundedVerifier< std::vectorstring > >, and SimpleProperty< std::vectorstring > >.
Definition at line 337 of file Property.h.
References PropertyWithValue< TYPE >::operator=(), and PropertyWithValue< TYPE >::value().
00338 { 00339 // assign the base class 00340 Property::operator=( right ) ; 00341 // assign the value 00342 PropertyWithValue<TYPE>::operator=( right.value() ) ; 00343 return *this ; 00344 }
| PropertyWithValue< TYPE >::operator const TYPE & | ( | ) | const [inline] |
Definition at line 171 of file Property.h.
References PropertyWithValue< TYPE >::value().
00171 { return value() ;}
| const TYPE & PropertyWithValue< TYPE >::value | ( | ) | const [inline] |
get the access to the storage
Definition at line 305 of file Property.h.
References PropertyWithValue< TYPE >::m_value, and Property::useReadHandler().
Referenced by Algorithm::Algorithm(), AlgTool::AlgTool(), PropertyWithValue< TYPE >::assign(), AIDATupleSvc::connect(), NTupleSvc::createService(), OutputStream::decodeAlgorithms(), ApplicationMgr::decodeCreateSvcNameList(), ApplicationMgr::decodeDllNameList(), ApplicationMgr::decodeExtSvcNameList(), ApplicationMgr::decodeMultiThreadSvcNameList(), Sequencer::decodeNames(), GaudiSequencer::decodeNames(), MinimalEventLoopMgr::decodeOutStreams(), MinimalEventLoopMgr::decodeTopAlgs(), MessageSvc::finalize(), ChronoStatSvc::finalize(), HbookCnv::HFileCnv::initialize(), StatusCodeSvc::initialize(), HistorySvc::initialize(), ExceptionSvc::initialize(), PythonScriptingSvc::initialize(), PoolDbCnvSvc::initialize(), PoolDbCacheSvc::initialize(), MinimalEventLoopMgr::initialize(), Sequencer::isStopOverride(), PropertyWithValue< TYPE >::operator const TYPE &(), PropertyWithValue< TYPE >::operator=(), Service::outputLevel(), PropertyWithValue< TYPE >::PropertyWithValue(), MessageSvc::reportMessage(), ChronoStatSvc::saveStats(), PersistencySvc::service(), Service::Service(), CommandProperty::set(), MessageSvc::setupColors(), THistSvc::setupInputFile(), IssueLogger::setupLevels(), THistSvc::setupOutputFile(), IssueLogger::setupStreams(), MessageSvc::setupThreshold(), StatusCodeSvc::suppressCheck(), and PropertyWithValue< TYPE >::toString().
00306 { useReadHandler() ; return *m_value ; }
| virtual bool PropertyWithValue< TYPE >::setValue | ( | const TYPE & | value | ) | [pure virtual] |
| bool PropertyWithValue< TYPE >::assign | ( | const Property & | source | ) | [inline, virtual] |
get the value from another property
Implements Property.
Definition at line 246 of file Property.h.
References PropertyWithValue< TYPE >::fromString(), PropertyWithValue< TYPE >::setValue(), Property::toString(), and PropertyWithValue< TYPE >::value().
Referenced by AlgTool::AlgTool(), RootHistCnv::RConverter::convertId(), PythonScriptingSvc::initialize(), and PoolDbCnvSvc::initialize().
00247 { 00248 // 1) Is the property of "the same" type? 00249 const PropertyWithValue<TYPE>* p = 00250 dynamic_cast<const PropertyWithValue<TYPE>*> ( &source ) ; 00251 if ( 0 != p ) { return setValue ( p->value() ) ; } // RETURN 00252 // 2) Else use the string representation 00253 return this->fromString( source.toString() ).isSuccess() ; 00254 }
| bool PropertyWithValue< TYPE >::load | ( | Property & | dest | ) | const [inline, virtual] |
set value for another property
Implements Property.
Definition at line 260 of file Property.h.
References Property::assign().
00261 { 00262 // gelegate to the 'opposite' method ; 00263 return dest.assign( *this ) ; 00264 }
| StatusCode PropertyWithValue< TYPE >::fromString | ( | const std::string & | s | ) | [inline, virtual] |
string -> value
Implements Property.
Definition at line 280 of file Property.h.
References StatusCode::FAILURE, StatusCode::isFailure(), Gaudi::Parsers::parse(), PropertyWithValue< TYPE >::setValue(), and StatusCode::SUCCESS.
Referenced by PropertyWithValue< TYPE >::assign().
00281 { 00282 TYPE tmp ; 00283 StatusCode sc = Gaudi::Parsers::parse ( tmp , source ) ; 00284 if ( sc.isFailure() ) { return sc ; } 00285 return setValue ( tmp ) ? StatusCode::SUCCESS : StatusCode::FAILURE ; 00286 }
| std::string PropertyWithValue< TYPE >::toString | ( | ) | const [inline, virtual] |
value -> string
Implements Property.
Definition at line 270 of file Property.h.
References PropertyWithValue< TYPE >::m_value, Gaudi::Utils::toString(), and Property::useReadHandler().
00271 { 00272 useReadHandler(); 00273 return Gaudi::Utils::toString( *m_value ) ; 00274 }
| void PropertyWithValue< TYPE >::i_set | ( | const TYPE & | value | ) | [inline, protected] |
Definition at line 312 of file Property.h.
Referenced by PropertyWithVerifier< TYPE, VERIFIER >::set().
| TYPE * PropertyWithValue< TYPE >::i_get | ( | ) | const [inline, protected] |
Definition at line 317 of file Property.h.
References PropertyWithValue< TYPE >::m_value.
00317 { return m_value ; }
| std::string PropertyWithValue< std::string >::toString | ( | ) | const [inline, virtual] |
value -> string
Implements Property.
Definition at line 292 of file Property.h.
References PropertyWithValue< TYPE >::value().
00293 { return this->value() ; }
| bool PropertyWithValue< std::string >::assign | ( | const Property & | source | ) | [inline, virtual] |
import the property value form the source
Implements Property.
Definition at line 296 of file Property.h.
References PropertyWithValue< TYPE >::fromString(), and Property::toString().
00297 { return this->fromString( source.toString() ).isSuccess() ; }
TYPE* PropertyWithValue< TYPE >::m_value [private] |
Definition at line 188 of file Property.h.
Referenced by PropertyWithValue< TYPE >::i_get(), PropertyWithValue< TYPE >::toString(), PropertyWithValue< TYPE >::value(), and PropertyWithValue< TYPE >::~PropertyWithValue().
bool PropertyWithValue< TYPE >::m_own [private] |
Definition at line 189 of file Property.h.
Referenced by PropertyWithValue< TYPE >::~PropertyWithValue().