Go to the documentation of this file.
25 #include <MemoryX/interface/core/EntityBase.h>
26 #include <MemoryX/interface/memorytypes/MemoryEntities.h>
54 Relation(
const std::string& name =
"",
const EntityRefList& entities = EntityRefList {},
bool sign =
true,
float prob = 1.f);
61 EntityRefList
getEntities(const ::Ice::Current& = Ice::emptyCurrent)
const override;
68 void setEntities(
const EntityRefList& entities, const ::Ice::Current& = Ice::emptyCurrent)
override;
75 bool getSign(const ::Ice::Current& = Ice::emptyCurrent)
const override;
82 void setSign(
bool sign, const ::Ice::Current& = Ice::emptyCurrent)
override;
96 void setProb(::
Ice::Float prob, const ::Ice::Current& = Ice::emptyCurrent)
override;
115 void output(std::ostream& stream)
const;
130 friend std::ostream&
operator<<(std::ostream& stream,
const RelationBasePtr& rhs)
132 stream << RelationPtr::dynamicCast(rhs);
const VariantTypeId Float
std::string getSourceAttributes() const
RelationPtr clone(const Ice::Current &c=Ice::emptyCurrent) const
void setAttributes(std::string const &attributes)
::Ice::Float getProb(const ::Ice::Current &=Ice::emptyCurrent) const override
Retrieve probability that this relation actually exists.
Relation class represents a directed relation between entities.
std::string getAttributes() const
void setSourceAttributes(std::string const &attributes)
friend std::ostream & operator<<(std::ostream &stream, const Relation &rhs)
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
friend std::ostream & operator<<(std::ostream &stream, const RelationBasePtr &rhs)
Ice::ObjectPtr ice_clone() const override
friend std::ostream & operator<<(std::ostream &stream, const RelationPtr &rhs)
void setSign(bool sign, const ::Ice::Current &=Ice::emptyCurrent) override
Set whether this relation is true or false.
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 setTargetAttributes(std::string const &attributes)
void setProb(::Ice::Float prob, const ::Ice::Current &=Ice::emptyCurrent) override
Set probability that this relation actually exists.