|
|
Attribute of MemoryX entities. More...
#include <MemoryX/core/entity/EntityAttribute.h>
Inheritance diagram for EntityAttribute:Public Member Functions | |
| void | addElement (const ::memoryx::AttributeElement &elem, const ::Ice::Current &=Ice::emptyCurrent) override |
| Adds attribute element (=value+uncertainty) to the attribute. | |
| void | addValue (const ::armarx::VariantBasePtr &val, const ::Ice::Current &=Ice::emptyCurrent) override |
| Adds value to the end of attribute values list. | |
| void | addValueWithUncertainty (const ::armarx::VariantBasePtr &val, const ::memoryx::ProbabilityMeasureBasePtr &uncertainty, const ::Ice::Current &=Ice::emptyCurrent) override |
| Adds value along with the corresponding uncertainty to the end of attribute values list. | |
| void | clear (const ::Ice::Current &=Ice::emptyCurrent) override |
| Clears all values. | |
| EntityAttributePtr | clone (const Ice::Current &c=Ice::emptyCurrent) const |
| void | deserialize (const armarx::ObjectSerializerBasePtr &serializer, const ::Ice::Current &=Ice::emptyCurrent) override |
| EntityAttribute (const EntityAttribute &other) | |
| Constructs a copy from another EntityAttribute instance. | |
| EntityAttribute (const std::string &name) | |
| Constructs a new EntityAttribute. | |
| EntityAttribute (const std::string &name, const armarx::VariantBasePtr &val) | |
| Constructs a new EntityAttribute and assigns a value. | |
| ::memoryx::AttributeElement | getElement (const ::Ice::Current &=Ice::emptyCurrent) const override |
| Retrieves the attribute element (=value+uncertainty). | |
| ::memoryx::AttributeElement | getElementAt (::Ice::Int index, const ::Ice::Current &=Ice::emptyCurrent) const override |
| Retrieves an attribute element (=value+uncertainty) with a given index. | |
| ::std::string | getName (const ::Ice::Current &=Ice::emptyCurrent) const override |
| Retrieve name of the attribute. | |
| ::memoryx::ProbabilityMeasureBasePtr | getUncertainty (const ::Ice::Current &=Ice::emptyCurrent) const override |
| Retrieves the uncertainty of the attribute value. | |
| ::memoryx::ProbabilityMeasureBasePtr | getUncertaintyAt (::Ice::Int index, const ::Ice::Current &=Ice::emptyCurrent) const override |
| Retrieve the uncertainty of the value at a given index from the list of values stored in the attribute. | |
| ::armarx::VariantBasePtr | getValue (const ::Ice::Current &=Ice::emptyCurrent) const override |
| Retrieves the value of the attribute. | |
| ::armarx::VariantBasePtr | getValueAt (::Ice::Int index, const ::Ice::Current &=Ice::emptyCurrent) const override |
| Retrieve the value at a given index from the list of values stored in the attribute. | |
| bool | hasValue (const ::armarx::VariantBasePtr &val, const ::Ice::Current &=Ice::emptyCurrent) const override |
| Checks whether the value val is currently stored in the attribute. | |
| Ice::ObjectPtr | ice_clone () const override |
| void | removeValueAt (::Ice::Int index, const ::Ice::Current &=Ice::emptyCurrent) override |
| Removes the value at a given index from the list of values stored in the attribute. | |
| void | serialize (const armarx::ObjectSerializerBasePtr &serializer, const ::Ice::Current &=Ice::emptyCurrent) const override |
| void | setElement (const ::memoryx::AttributeElement &elem, const ::Ice::Current &=Ice::emptyCurrent) override |
| Sets (single) attribute element (=value+uncertainty) to the attribute. | |
| void | setValue (const ::armarx::VariantBasePtr &val, const ::Ice::Current &=Ice::emptyCurrent) override |
| Sets (single) value of the attribute. | |
| void | setValueWithUncertainty (const ::armarx::VariantBasePtr &val, const ::memoryx::ProbabilityMeasureBasePtr &uncertainty, const ::Ice::Current &=Ice::emptyCurrent) override |
| Sets (single) value of the attribute along with the corresponding uncertainty. | |
| ::Ice::Int | size (const ::Ice::Current &=Ice::emptyCurrent) const override |
| Retrieve number of values stored with the attribute. | |
| ~EntityAttribute () override | |
Protected Attributes | |
| std::recursive_mutex | valuesMutex |
Friends | |
| template<class IceBaseClass, class DerivedClass> | |
| class | ::armarx::GenericFactory |
| std::ostream & | operator<< (std::ostream &stream, const EntityAttribute &rhs) |
| std::ostream & | operator<< (std::ostream &stream, const EntityAttributeBasePtr &rhs) |
| std::ostream & | operator<< (std::ostream &stream, const EntityAttributePtr &rhs) |
Attribute of MemoryX entities.
Each memory entity can have an arbitraty number of attributes, identified by their names. Essentially, they are stored as a map std::string -> EntityAttribute. EntityAttribute has one or many AttributeElements, each of them representing a value with uncertainty as a pair (value, probabilityMeasure). See documentation of memoryx::AttributeElement for details on what types are supported as values.
| EntityAttribute | ( | const std::string & | name | ) |
Constructs a new EntityAttribute.
| name | the attribute is identified via this name |
| EntityAttribute | ( | const std::string & | name, |
| const armarx::VariantBasePtr & | val ) |
Constructs a new EntityAttribute and assigns a value.
| name | the attribute is identified via this name |
| value | value for this attribute |
| EntityAttribute | ( | const EntityAttribute & | other | ) |
Constructs a copy from another EntityAttribute instance.
| other | EntityAttribute to copy from |
|
override |
|
override |
Adds attribute element (=value+uncertainty) to the attribute.
| elem | attribute element to add |
|
override |
Adds value to the end of attribute values list.
Uncertainty assumed to be empty (=unknown/not specified).
| val | value to add |
|
override |
Adds value along with the corresponding uncertainty to the end of attribute values list.
This is equivalent to clearing the attribute value list (clear()) and calling addValueWithUncertainty().
| val | value to set |
| uncertainty | probability distribution representing the value uncertainty |
|
override |
Clears all values.
The attribute will not contain any value after calling clear.
| EntityAttributePtr clone | ( | const Ice::Current & | c = Ice::emptyCurrent | ) | const |
|
override |
|
override |
Retrieves the attribute element (=value+uncertainty).
Corresponds to calling getElementAt(0).
|
override |
Retrieves an attribute element (=value+uncertainty) with a given index.
|
override |
Retrieve name of the attribute.
|
override |
Retrieves the uncertainty of the attribute value.
Corresponds to calling getUncertaintyAt(0)
|
override |
Retrieve the uncertainty of the value at a given index from the list of values stored in the attribute.
| index | of value |
|
override |
Retrieves the value of the attribute.
Corresponds to calling getValueAt(0)
|
override |
Retrieve the value at a given index from the list of values stored in the attribute.
| index | of value |
|
override |
Checks whether the value val is currently stored in the attribute.
If attribute stores multiple values, each of them will be compared with val and in case of at least one match the result will be positive.
NOTE: currently, this method can be used for String values ONLY! To make it applicable for other datatypes, general comparison method for armarx::Variant should be implemented in Core first.
|
override |
|
override |
Removes the value at a given index from the list of values stored in the attribute.
| index | of value |
|
override |
|
override |
Sets (single) attribute element (=value+uncertainty) to the attribute.
This is equivalent to clearing the attribute value list (clear()) and calling addValue().
| elem | attribute element to set |
|
override |
Sets (single) value of the attribute.
Uncertainty assumed to be empty (=unknown/not specified). This is equivalent to clearing the attribute value list (clear()) and calling addValue().
| val | value to set |
|
override |
Sets (single) value of the attribute along with the corresponding uncertainty.
This is equivalent to clearing the attribute values list (clear()) and calling addValueWithUncertainty().
| val | value to set |
| uncertainty | probability distribution representing the value uncertainty |
|
override |
Retrieve number of values stored with the attribute.
|
friend |
|
friend |
|
friend |
|
friend |
|
mutableprotected |