#include <GaudiKernel/Property.h>
Inheritance diagram for SimpleProperty< TYPE, VERIFIER >:
Public Member Functions | |
SimpleProperty (VERIFIER verifier=VERIFIER()) | |
"Almost default" constructor from verifier | |
SimpleProperty (const TYPE &value, VERIFIER verifier=VERIFIER()) | |
The constructor from the value and verifier (ATLAS needs it!). | |
SimpleProperty (const std::string &name, const TYPE &value, VERIFIER verifier=VERIFIER()) | |
The constructor from the name, value and verifier. | |
template<class OTHER> | |
SimpleProperty (const PropertyWithValue< OTHER > &right) | |
constructor from other property type | |
SimpleProperty (const SimpleProperty &right) | |
copy constructor (must be!) | |
virtual | ~SimpleProperty () |
virtual Destructor | |
virtual SimpleProperty * | clone () const |
implementation of Property::clone | |
SimpleProperty & | operator= (const TYPE &value) |
assignement form the value | |
template<class OTHER> | |
SimpleProperty & | operator= (const PropertyWithValue< OTHER > &right) |
assignement form the other property type | |
VERIFIER & | verifier () |
const VERIFIER & | verifier () const |
bool | set (const TYPE &value) |
update the value of the property/check the verifier | |
virtual bool | setValue (const TYPE &value) |
implementation of PropertyWithValue::setValue | |
operator const TYPE & () const | |
const TYPE & | value () const |
get the access to the storage | |
virtual bool | assign (const Property &source) |
get the value from another property | |
template<> | |
bool | assign (const Property &source) |
import the property value form the source | |
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 | |
const std::string & | name () const |
property name | |
const std::string & | documentation () const |
property documentation | |
const std::type_info * | type_info () const |
property type-info | |
std::string | type () const |
property type | |
const PropertyCallbackFunctor * | readCallBack () const |
Call-back functor at reading: the functor is ownered by property! | |
const PropertyCallbackFunctor * | updateCallBack () const |
Call-back functor for update: the funtor is ownered by property! | |
virtual void | declareReadHandler (PropertyCallbackFunctor *pf) |
set new callback for reading | |
template<class HT> | |
void | declareReadHandler (void(HT::*MF)(Property &), HT *instance) |
virtual void | declareUpdateHandler (PropertyCallbackFunctor *pf) |
set new callback for update | |
template<class HT> | |
void | declareUpdateHandler (void(HT::*MF)(Property &), HT *instance) |
virtual void | useReadHandler () const |
use the call-back function at reading | |
virtual void | useUpdateHandler () |
use the call-back function at update | |
void | setName (const std::string &value) |
set the new value for the property name | |
void | setDocumentation (const std::string &documentation) |
set the documentation string | |
virtual std::ostream & | fillStream (std::ostream &) const |
the printout of the property value | |
Protected Member Functions | |
void | i_set (const TYPE &value) |
TYPE * | i_get () const |
Protected Attributes | |
PropertyCallbackFunctor * | m_readCallBack |
PropertyCallbackFunctor * | m_updateCallBack |
CTDay
Vanya BELYAEV ibelyaev@physics.syr.edu
Definition at line 459 of file Property.h.
SimpleProperty< TYPE, VERIFIER >::SimpleProperty | ( | VERIFIER | verifier = VERIFIER() |
) |
"Almost default" constructor from verifier
Definition at line 495 of file Property.h.
00496 : PropertyWithVerifier<TYPE,VERIFIER> 00497 ( "" , new TYPE() , true , verifier ) 00498 {}
SimpleProperty< TYPE, VERIFIER >::SimpleProperty | ( | const TYPE & | value, | |
VERIFIER | verifier = VERIFIER() | |||
) |
The constructor from the value and verifier (ATLAS needs it!).
Definition at line 504 of file Property.h.
00506 : PropertyWithVerifier<TYPE,VERIFIER> 00507 ( "" , new TYPE(value) , true , verifier ) 00508 {}
SimpleProperty< TYPE, VERIFIER >::SimpleProperty | ( | const std::string & | name, | |
const TYPE & | value, | |||
VERIFIER | verifier = VERIFIER() | |||
) |
The constructor from the name, value and verifier.
Definition at line 514 of file Property.h.
00517 : PropertyWithVerifier<TYPE,VERIFIER> 00518 ( name , new TYPE(value) , true , verifier ) 00519 {}
SimpleProperty< TYPE, VERIFIER >::SimpleProperty | ( | const PropertyWithValue< OTHER > & | right | ) |
constructor from other property type
Definition at line 526 of file Property.h.
00527 : PropertyWithVerifier<TYPE,VERIFIER> 00528 ( right.name() , new TYPE( right.value() ) , true , VERIFIER() ) 00529 {}
SimpleProperty< TYPE, VERIFIER >::SimpleProperty | ( | const SimpleProperty< TYPE, VERIFIER > & | right | ) |
copy constructor (must be!)
Definition at line 535 of file Property.h.
00536 : PropertyWithVerifier<TYPE,VERIFIER> 00537 ( right.name() , new TYPE( right.value() ) , true , right.verifier() ) 00538 {}
SimpleProperty< TYPE, VERIFIER >::~SimpleProperty | ( | ) | [virtual] |
SimpleProperty< TYPE, VERIFIER > * SimpleProperty< TYPE, VERIFIER >::clone | ( | ) | const [inline, virtual] |
implementation of Property::clone
Implements Property.
Definition at line 550 of file Property.h.
00551 { return new SimpleProperty(*this) ; }
SimpleProperty< TYPE, VERIFIER > & SimpleProperty< TYPE, VERIFIER >::operator= | ( | const TYPE & | value | ) | [inline] |
assignement form the value
Reimplemented from PropertyWithVerifier< TYPE, VERIFIER >.
Definition at line 558 of file Property.h.
00559 { 00560 PropertyWithVerifier<TYPE,VERIFIER>::operator=( value ); 00561 return *this ; 00562 }
SimpleProperty< TYPE, VERIFIER > & SimpleProperty< TYPE, VERIFIER >::operator= | ( | const PropertyWithValue< OTHER > & | right | ) | [inline] |
assignement form the other property type
Reimplemented from PropertyWithVerifier< TYPE, VERIFIER >.
Definition at line 571 of file Property.h.
00572 { 00573 PropertyWithVerifier<TYPE,VERIFIER>::operator=( right ); 00574 return *this ; 00575 }
VERIFIER& PropertyWithVerifier< TYPE, VERIFIER >::verifier | ( | ) | [inline, inherited] |
const VERIFIER& PropertyWithVerifier< TYPE, VERIFIER >::verifier | ( | ) | const [inline, inherited] |
bool PropertyWithVerifier< TYPE, VERIFIER >::set | ( | const TYPE & | value | ) | [inline, inherited] |
update the value of the property/check the verifier
use verifier!
update the value
invoke the update handler
Definition at line 402 of file Property.h.
00403 { 00405 if ( !m_verifier.isValid( &value ) ) { return false ; } 00407 i_set( value ) ; 00409 this->useUpdateHandler() ; 00410 return true ; 00411 }
virtual bool PropertyWithVerifier< TYPE, VERIFIER >::setValue | ( | const TYPE & | value | ) | [inline, virtual, inherited] |
implementation of PropertyWithValue::setValue
Implements PropertyWithValue< TYPE >.
Definition at line 379 of file Property.h.
PropertyWithValue< TYPE >::operator const TYPE & | ( | ) | const [inline, inherited] |
const TYPE & PropertyWithValue< TYPE >::value | ( | ) | const [inline, inherited] |
get the access to the storage
Definition at line 306 of file Property.h.
00307 { useReadHandler() ; return *m_value ; }
bool PropertyWithValue< TYPE >::assign | ( | const Property & | source | ) | [inline, virtual, inherited] |
get the value from another property
Implements Property.
Definition at line 247 of file Property.h.
00248 { 00249 // 1) Is the property of "the same" type? 00250 const PropertyWithValue<TYPE>* p = 00251 dynamic_cast<const PropertyWithValue<TYPE>*> ( &source ) ; 00252 if ( 0 != p ) { return setValue ( p->value() ) ; } // RETURN 00253 // 2) Else use the string representation 00254 return this->fromString( source.toString() ).isSuccess() ; 00255 }
bool PropertyWithValue< std::string >::assign | ( | const Property & | source | ) | [inline, virtual, inherited] |
import the property value form the source
Implements Property.
Definition at line 297 of file Property.h.
00298 { return this->fromString( source.toString() ).isSuccess() ; }
bool PropertyWithValue< TYPE >::load | ( | Property & | dest | ) | const [inline, virtual, inherited] |
set value for another property
Implements Property.
Definition at line 261 of file Property.h.
00262 { 00263 // gelegate to the 'opposite' method ; 00264 return dest.assign( *this ) ; 00265 }
StatusCode PropertyWithValue< TYPE >::fromString | ( | const std::string & | s | ) | [inline, virtual, inherited] |
string -> value
Implements Property.
Definition at line 281 of file Property.h.
00282 { 00283 TYPE tmp ; 00284 StatusCode sc = Gaudi::Parsers::parse ( tmp , source ) ; 00285 if ( sc.isFailure() ) { return sc ; } 00286 return setValue ( tmp ) ? StatusCode::SUCCESS : StatusCode::FAILURE ; 00287 }
std::string PropertyWithValue< TYPE >::toString | ( | ) | const [inline, virtual, inherited] |
value -> string
Implements Property.
Definition at line 271 of file Property.h.
00272 { 00273 useReadHandler(); 00274 return Gaudi::Utils::toString( *m_value ) ; 00275 }
std::string PropertyWithValue< std::string >::toString | ( | ) | const [inline, virtual, inherited] |
value -> string
Implements Property.
Definition at line 293 of file Property.h.
00294 { return this->value() ; }
void PropertyWithValue< TYPE >::i_set | ( | const TYPE & | value | ) | [inline, protected, inherited] |
TYPE * PropertyWithValue< TYPE >::i_get | ( | ) | const [inline, protected, inherited] |
const std::string& Property::name | ( | ) | const [inline, inherited] |
const std::string& Property::documentation | ( | ) | const [inline, inherited] |
const std::type_info* Property::type_info | ( | ) | const [inline, inherited] |
std::string Property::type | ( | ) | const [inline, inherited] |
const PropertyCallbackFunctor* Property::readCallBack | ( | ) | const [inherited] |
Call-back functor at reading: the functor is ownered by property!
const PropertyCallbackFunctor* Property::updateCallBack | ( | ) | const [inherited] |
Call-back functor for update: the funtor is ownered by property!
virtual void Property::declareReadHandler | ( | PropertyCallbackFunctor * | pf | ) | [virtual, inherited] |
set new callback for reading
void Property::declareReadHandler | ( | void(HT::*)(Property &) | MF, | |
HT * | instance | |||
) | [inline, inherited] |
Definition at line 131 of file Property.h.
00132 { declareReadHandler ( new PropertyCallbackMemberFunctor< HT >( MF , obj ) ) ; }
virtual void Property::declareUpdateHandler | ( | PropertyCallbackFunctor * | pf | ) | [virtual, inherited] |
set new callback for update
void Property::declareUpdateHandler | ( | void(HT::*)(Property &) | MF, | |
HT * | instance | |||
) | [inline, inherited] |
Definition at line 136 of file Property.h.
00137 { declareUpdateHandler ( new PropertyCallbackMemberFunctor< HT >( MF , obj ) ) ; }
virtual void Property::useReadHandler | ( | ) | const [virtual, inherited] |
use the call-back function at reading
virtual void Property::useUpdateHandler | ( | ) | [virtual, inherited] |
use the call-back function at update
void Property::setName | ( | const std::string & | value | ) | [inline, inherited] |
set the new value for the property name
Definition at line 91 of file Property.h.
00091 { m_name = value ; }
void Property::setDocumentation | ( | const std::string & | documentation | ) | [inline, inherited] |
set the documentation string
Definition at line 93 of file Property.h.
00093 { 00094 m_documentation = documentation; };
virtual std::ostream& Property::fillStream | ( | std::ostream & | ) | const [virtual, inherited] |
the printout of the property value
PropertyCallbackFunctor* Property::m_readCallBack [mutable, protected, inherited] |
Definition at line 122 of file Property.h.
PropertyCallbackFunctor* Property::m_updateCallBack [protected, inherited] |
Definition at line 124 of file Property.h.