Go to the documentation of this file.
40 for (
const auto& entity : entities)
53 for (
int i = 0; i < ea->size(); i++)
55 result.push_back(armarx::VariantPtr::dynamicCast(ea->getValueAt(i))->get<EntityRefBase>());
66 for (
const auto& entity : entities)
96 return getAttribute(
"attributes")->getValue()->getString();
101 getAttribute(
"attributes")->getValue()->setString(attributes);
111 getAttribute(
"source")->getValue()->setString(attributes);
121 getAttribute(
"target")->getValue()->setString(attributes);
127 return this->
clone();
138 void Relation::output(std::ostream& stream)
const
The Variant class is described here: Variants.
ReaderT::InputType T & ret
const VariantTypeId Float
std::string getSourceAttributes() const
void putAttribute(const ::memoryx::EntityAttributeBasePtr &attr, const ::Ice::Current &=Ice::emptyCurrent) override
Store attribute in entity.
RelationPtr clone(const Ice::Current &c=Ice::emptyCurrent) const
EntityAttributeBasePtr getAttribute(const ::std::string &attrName, const ::Ice::Current &=Ice::emptyCurrent) const override
Retrieve attribute from entity.
void removeAttribute(const ::std::string &attrName, const ::Ice::Current &=Ice::emptyCurrent) override
Remove attribute with given name from entity.
void setAttributes(std::string const &attributes)
::Ice::Float getProb(const ::Ice::Current &=Ice::emptyCurrent) const override
Retrieve probability that this relation actually exists.
std::string getAttributes() const
void setSourceAttributes(std::string const &attributes)
void output(std::ostream &stream) const
Relation(const std::string &name="", const EntityRefList &entities=EntityRefList {}, bool sign=true, float prob=1.f)
Constucts a new Relation.
void setEntities(const EntityRefList &entities, const ::Ice::Current &=Ice::emptyCurrent) override
set the entities involved in this relation
std::string getTargetAttributes() const
Ice::ObjectPtr ice_clone() const override
void setSign(bool sign, const ::Ice::Current &=Ice::emptyCurrent) override
Set whether this relation is true or false.
Attribute of MemoryX entities.
bool getSign(const ::Ice::Current &=Ice::emptyCurrent) const override
Retrieve whether this relation is true or false.
std::shared_ptr< Object > ObjectPtr
EntityRefList getEntities(const ::Ice::Current &=Ice::emptyCurrent) const override
Retrieve the entities involved in this relation.
void setName(const ::std::string &name, const ::Ice::Current &=Ice::emptyCurrent) override
Set name of this entity.
void setTargetAttributes(std::string const &attributes)
void setProb(::Ice::Float prob, const ::Ice::Current &=Ice::emptyCurrent) override
Set probability that this relation actually exists.