28 #include "boost/algorithm/string/case_conv.hpp"
48 (
const std::type_info&
type ,
49 const std::string& name )
51 , m_documentation ( name )
52 , m_typeinfo ( &type )
53 , m_readCallBack ( 0 )
54 , m_updateCallBack ( 0 )
63 (
const std::string& name ,
64 const std::type_info& type )
66 , m_documentation ( name )
67 , m_typeinfo ( &type )
68 , m_readCallBack ( 0 )
69 , m_updateCallBack ( 0 )
79 , m_readCallBack ( 0 )
80 , m_updateCallBack ( 0 )
92 if ( &right ==
this ) {
return *this ; }
157 (*theCallBack)(
const_cast<Property&
>(p) ) ;
171 (*theCallBack)( *this ) ;
183 {
return stream <<
" '" <<
name() <<
"':" <<
toString() ; }
205 const std::string& name )
208 if ( 0 == p ) {
return false ; }
233 const std::string& name )
235 if ( 0 == p ) {
return false ; }
247 m_pValue->setPropertyName( name );
299 std::vector< std::string > tmp;
312 struct _ByName_ :
public std::unary_function<const Property*,bool>
315 _ByName_ (
const std::string& name )
316 : m_name ( boost::algorithm::to_lower_copy( name ) ) {}
318 bool operator () (
const Property* p )
const
320 if ( 0 == p ) {
return false ; }
321 return m_name == boost::algorithm::to_lower_copy( p->
name() ) ;
350 const std::string& name )
353 if ( 0 == p ) {
return 0 ; }
355 typedef std::vector<Property*> List ;
357 if ( lst.empty() ) {
return 0 ; }
359 List::const_iterator ifound =
360 std::find_if ( lst.begin() , lst.end() , _ByName_( name ) ) ;
361 if ( lst.end() == ifound ) {
return 0 ; }
388 if ( 0 == p ) {
return 0 ; }
391 if ( 0 == _i ) {
return 0 ; }
393 if ( !property ) {
return 0 ; }
421 (
const std::vector<const Property*>* p ,
422 const std::string& name )
452 (
const std::vector<const Property*>* p ,
453 const std::string& name )
456 if ( 0 == p ) {
return 0 ; }
457 std::vector<const Property*>::const_iterator ifound =
458 std::find_if ( p->begin() , p->end() , _ByName_( name ) ) ;
459 if ( p->end() == ifound ) {
return 0 ; }
480 const std::string& name ,
482 const std::string& doc )
484 const std::string val = std::string( value ) ;
503 const std::string& name ,
504 const std::string& value ,
505 const std::string& doc )
513 if ( 0 != p ) { p -> setDocumentation ( doc ) ; }
543 const std::string& name ,
545 const std::string& doc )
580 const std::string& name ,
582 const std::string& doc )
583 {
return setProperty ( component , name , &property , doc ) ; }
600 const std::string& name ,
601 const std::string& value ,
602 const std::string& doc )
607 return setProperty ( property , name , value , doc ) ;
625 const std::string& name ,
627 const std::string& doc )
629 const std::string val = std::string( value ) ;
630 return setProperty ( component , name , val , doc ) ;
657 const std::string& name ,
659 const std::string& doc )
664 return setProperty ( prop , name , property , doc ) ;
691 const std::string& name ,
693 const std::string& doc )
694 {
return setProperty ( component , name , &property , doc ) ; }