38 #ifndef PI_PROPERTY_BAG 39 #define PI_PROPERTY_BAG 46 #ifdef ORO_PRAGMA_INTERFACE 119 typedef std::vector<std::string>
Names;
169 this->ownProperty( p );
208 void list(Names &names)
const;
221 return mproperties.empty();
244 const_iterator i( std::find_if(mproperties.begin(), mproperties.end(), std::bind2nd(
FindPropType<T>(), name ) ) );
245 if ( i != mproperties.end() )
256 if ( i < 0 || i >=
int(mproperties.size()) )
258 return mproperties[i];
264 size_t size()
const {
return mproperties.size(); }
296 for ( const_iterator i = mproperties.begin();
297 i != mproperties.end();
329 const std::string&
getType()
const {
return type;}
331 void setType(
const std::string& newtype) { type = newtype; }
346 Properties getProperties(
const std::string& name)
const;
353 iterator
begin() {
return mproperties.begin(); }
354 const_iterator
begin()
const {
return mproperties.begin(); }
355 iterator
end() {
return mproperties.end(); }
356 const_iterator
end()
const {
return mproperties.end(); }
365 struct FindPropType :
public std::binary_function<const base::PropertyBase*,const std::string, bool>
421 RTT_API std::vector<std::string>
listProperties(
const PropertyBag& bag,
const std::string& separator = std::string(
"."));
452 RTT_API
bool removeProperty(
PropertyBag& bag,
const std::string& path,
const std::string& separator = std::string(
".") );
bool removeProperty(PropertyBag &bag, const std::string &path, const std::string &separator)
bool updateProperty(PropertyBag &target, const PropertyBag &source, const std::string &name, const std::string &separator)
base::PropertyBase * findValue(const T &value) const
Property< T > * getPropertyType(const std::string &name) const
bool updateProperties(PropertyBag &target, const PropertyBag &source)
PropertyBag & operator<<(base::PropertyBase *item)
std::istream & operator>>(std::istream &is, BufferPolicy &bp)
const std::string & getType() const
bool operator()(const base::PropertyBase *b1, const std::string &b2) const
bool refreshProperties(const PropertyBag &target, const PropertyBag &source, bool allprops)
bool copyProperties(PropertyBag &target, const PropertyBag &source)
void setType(const std::string &newtype)
A container for holding references to properties.
void flattenPropertyBag(PropertyBag &target, const std::string &separator)
Names getPropertyNames() const
PropertyBase * findProperty(const PropertyBag &bag, const std::string &nameSequence, const std::string &separator)
void deletePropertyBag(PropertyBag &target)
Property< T > & addProperty(const std::string &name, T &attr)
Properties PropertyContainerType
const_iterator begin() const
A property represents a named value of any type with a description.
Properties & getProperties()
Properties::const_iterator const_iterator
bool refreshProperty(const PropertyBag &target, const PropertyBase &source)
boost::intrusive_ptr< AssignableDataSource< T > > shared_ptr
const Properties & getProperties() const
std::ostream & operator<<(std::ostream &os, const BufferPolicy &bp)
vector< string > listProperties(const PropertyBag &source, const std::string &separator)
bool storeProperty(PropertyBag &bag, const std::string &path, base::PropertyBase *item, const std::string &separator)
base::PropertyBase * getItem(int i) const
void deleteProperties(PropertyBag &target)
std::vector< std::string > Names
const std::string & getName() const
vector< string > listPropertyDescriptions(const PropertyBag &source, const std::string &separator)
Properties::iterator iterator
Contains TaskContext, Activity, OperationCaller, Operation, Property, InputPort, OutputPort, Attribute.
const_iterator end() const
std::vector< base::PropertyBase * > Properties