24 struct Nocase :
public std::binary_function<std::string,std::string,bool>
26 inline bool operator() (
const std::string& v1 ,
27 const std::string& v2 )
const
29 std::string::const_iterator i1 = v1.begin() ;
30 std::string::const_iterator i2 = v2.begin() ;
31 for ( ; v1.end() != i1 && v2.end() != i2 ; ++i1 , ++i2 )
33 return v1.size() == v2.size() ;
38 struct PropByName :
public std::unary_function<const Property*,bool>
40 PropByName (
const std::string& name ) : m_name ( name ) {} ;
41 inline bool operator() (
const Property* p )
const
42 {
return ( 0 == p ) ?
false : m_cmp ( p->
name() , m_name ) ; }
54 , m_remoteProperties ()
68 , m_properties ( right.m_properties )
69 , m_remoteProperties ( right.m_remoteProperties )
70 , m_todelete ( right.m_todelete )
71 , m_pOuter ( right.m_pOuter )
84 for ( Properties::iterator ip =
m_todelete.begin() ;
85 m_todelete.end() != ip ; ++ip ) {
delete *ip ; }
92 if ( &right ==
this ) {
return *this ; }
94 for ( Properties::iterator ip =
m_todelete.begin() ;
95 m_todelete.end() != ip ; ++ip ) {
delete *ip ; }
112 (
const std::string& name ,
114 const std::string& rname )
116 if ( 0 == rsvc ) {
return 0 ; }
117 const std::string& nam = rname.empty() ? name : rname ;
119 m_remoteProperties.push_back (
RemProperty ( name , std::make_pair ( rsvc , nam ) ) ) ;
126 (
const std::string& name ,
127 const std::vector<Property*>& props )
const
129 Properties::const_iterator it =
130 std::find_if ( props.begin() , props.end() , PropByName( name ) ) ;
131 if ( props.end() != it ) {
return *it ; }
138 (
const std::string& name )
const
141 Property* lp = property ( name , m_properties ) ;
142 if ( 0 != lp ) {
return lp ; }
145 for ( RemoteProperties::const_iterator it = m_remoteProperties.begin() ;
146 m_remoteProperties.end() != it ; ++it )
148 if ( !cmp(it->first,name) ) { continue ; }
150 if ( 0 == p ) { continue ; }
222 if ( 0 != p ) {
return *p ; }
224 throw std::out_of_range(
"Property "+name+
" not found." );
232 (
const std::string&
n ,
233 std::string& v )
const
246 const std::vector<Property*>&
253 StatusCode sc= base_class::queryInterface(iid, pinterface);