|
Gaudi Framework, version v21r4 |
| Home | Generated: 7 Sep 2009 |
#include <Property.h>


Definition at line 145 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 | |
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] |
| PropertyWithValue< TYPE >::PropertyWithValue | ( | const PropertyWithValue< OTHER > & | right | ) | [inline, protected] |
| PropertyWithValue< TYPE >::~PropertyWithValue | ( | ) | [inline, protected, virtual] |
| PropertyWithValue< TYPE > & PropertyWithValue< TYPE >::operator= | ( | const TYPE & | value | ) | [inline, protected] |
assignement operator
Reimplemented in PropertyWithVerifier< TYPE, VERIFIER >, SimpleProperty< TYPE, VERIFIER >, SimplePropertyRef< TYPE, VERIFIER >, PropertyWithVerifier< int, BoundedVerifier< int > >, PropertyWithVerifier< double, BoundedVerifier< double > >, PropertyWithVerifier< unsigned int, BoundedVerifier< unsigned int > >, PropertyWithVerifier< bool, BoundedVerifier< bool > >, PropertyWithVerifier< std::string, BoundedVerifier< std::string > >, and PropertyWithVerifier< std::vector< std::string >, BoundedVerifier< std::vector< std::string > > >.
Definition at line 233 of file Property.h.
00234 { 00235 if ( !setValue ( value ) ) 00236 { throw std::out_of_range( "Value not verified" ) ; } 00237 return *this ; 00238 }
| PropertyWithValue< TYPE > & PropertyWithValue< TYPE >::operator= | ( | const PropertyWithValue< TYPE > & | rhs | ) | [inline, protected] |
Definition at line 321 of file Property.h.
00322 { 00323 // assign the base class 00324 Property::operator=( right ) ; 00325 // assign the value 00326 PropertyWithValue<TYPE>::operator=( right.value() ) ; 00327 return *this ; 00328 }
| PropertyWithValue< TYPE > & PropertyWithValue< TYPE >::operator= | ( | const PropertyWithValue< OTHER > & | right | ) | [inline, protected] |
Reimplemented in PropertyWithVerifier< TYPE, VERIFIER >, SimpleProperty< TYPE, VERIFIER >, SimplePropertyRef< TYPE, VERIFIER >, PropertyWithVerifier< int, BoundedVerifier< int > >, PropertyWithVerifier< double, BoundedVerifier< double > >, PropertyWithVerifier< unsigned int, BoundedVerifier< unsigned int > >, PropertyWithVerifier< bool, BoundedVerifier< bool > >, PropertyWithVerifier< std::string, BoundedVerifier< std::string > >, PropertyWithVerifier< std::vector< std::string >, BoundedVerifier< std::vector< std::string > > >, SimpleProperty< double >, SimpleProperty< std::string >, SimpleProperty< std::vector< std::string > >, SimpleProperty< int >, SimpleProperty< unsigned int >, and SimpleProperty< bool >.
Definition at line 335 of file Property.h.
00336 { 00337 // assign the base class 00338 Property::operator=( right ) ; 00339 // assign the value 00340 PropertyWithValue<TYPE>::operator=( right.value() ) ; 00341 return *this ; 00342 }
| PropertyWithValue< TYPE >::operator const TYPE & | ( | ) | const [inline] |
| const TYPE & PropertyWithValue< TYPE >::value | ( | ) | const [inline] |
get the access to the storage
Definition at line 303 of file Property.h.
00304 { useReadHandler() ; return *m_value ; }
| virtual bool PropertyWithValue< TYPE >::setValue | ( | const TYPE & | value | ) | [pure virtual] |
Implemented in PropertyWithVerifier< TYPE, VERIFIER >, PropertyWithVerifier< int, BoundedVerifier< int > >, PropertyWithVerifier< double, BoundedVerifier< double > >, PropertyWithVerifier< unsigned int, BoundedVerifier< unsigned int > >, PropertyWithVerifier< bool, BoundedVerifier< bool > >, PropertyWithVerifier< std::string, BoundedVerifier< std::string > >, and PropertyWithVerifier< std::vector< std::string >, BoundedVerifier< std::vector< std::string > > >.
| bool PropertyWithValue< TYPE >::assign | ( | const Property & | source | ) | [inline, virtual] |
get the value from another property
implementation of Property::assign
Implements Property.
Definition at line 244 of file Property.h.
00245 { 00246 // 1) Is the property of "the same" type? 00247 const PropertyWithValue<TYPE>* p = 00248 dynamic_cast<const PropertyWithValue<TYPE>*> ( &source ) ; 00249 if ( 0 != p ) { return setValue ( p->value() ) ; } // RETURN 00250 // 2) Else use the string representation 00251 return this->fromString( source.toString() ).isSuccess() ; 00252 }
| bool PropertyWithValue< TYPE >::load | ( | Property & | dest | ) | const [inline, virtual] |
set value for another property
implementation of Property::load
Implements Property.
Definition at line 258 of file Property.h.
00259 { 00260 // gelegate to the 'opposite' method ; 00261 return dest.assign( *this ) ; 00262 }
| StatusCode PropertyWithValue< TYPE >::fromString | ( | const std::string & | s | ) | [inline, virtual] |
string -> value
Implementation of PropertyWithValue::fromString.
Implements Property.
Definition at line 278 of file Property.h.
00279 { 00280 TYPE tmp ; 00281 StatusCode sc = Gaudi::Parsers::parse ( tmp , source ) ; 00282 if ( sc.isFailure() ) { return sc ; } 00283 return setValue ( tmp ) ? StatusCode::SUCCESS : StatusCode::FAILURE ; 00284 }
| std::string PropertyWithValue< TYPE >::toString | ( | ) | const [inline, virtual] |
value -> string
Implementation of PropertyWithValue::toString.
Implements Property.
Definition at line 268 of file Property.h.
00269 { 00270 useReadHandler(); 00271 return Gaudi::Utils::toString( *m_value ) ; 00272 }
| void PropertyWithValue< TYPE >::i_set | ( | const TYPE & | value | ) | [inline, protected] |
| TYPE * PropertyWithValue< TYPE >::i_get | ( | ) | const [inline, protected] |
TYPE* PropertyWithValue< TYPE >::m_value [private] |
Definition at line 186 of file Property.h.
bool PropertyWithValue< TYPE >::m_own [private] |
Definition at line 187 of file Property.h.