49#ifndef GUM_CLASS_ELEMENT_H
50#define GUM_CLASS_ELEMENT_H
60 template <
typename GUM_SCALAR >
74 template <
typename GUM_SCALAR >
129 default :
return "unknown";
243 const std::string&
safeName()
const;
268 virtual const Tensor< GUM_SCALAR >&
cpf()
const = 0;
282#ifndef GUM_NO_EXTERN_TEMPLATE_CLASS
Inline implementation of gum::PRMClassElement.
PRMAttribute is a member of a Class in a PRM.
static INLINE bool isParameter(const PRMClassElement< GUM_SCALAR > &elt)
Return true if obj is of type PRMParameter.
static INLINE bool isSlotChain(const PRMClassElement< GUM_SCALAR > &elt)
Return true if obj is of type PRMSlotChain.
virtual void addParent(const PRMClassElement< GUM_SCALAR > &elt)=0
Add a parent to this element.
virtual std::string cast(const PRMType &t) const
Returns the name of the cast descendant with PRMType t of this PRMClassElement.
virtual void addChild(const PRMClassElement< GUM_SCALAR > &elt)=0
Add a child to this element.
virtual PRMObject::prm_type obj_type() const
static INLINE bool isAggregate(const PRMClassElement< GUM_SCALAR > &elt)
Return true if obj is of type PRMAggregate.
virtual const Tensor< GUM_SCALAR > & cpf() const =0
Return a constant reference over the gum::Tensor of this class element.
static std::string enum2str(ClassElementType type)
Returns true if obj_ptr is of type PRMReferenceSlot.
NodeId _id_
The node's id of this element.
PRMClassElement(const std::string &name)
Default constructor of a PRMClassElement.
virtual void setId(NodeId id)
Used to assign the id of this element.
NodeId id() const
Returns the NodeId of this element in it's class DAG.
virtual ClassElementType elt_type() const =0
Return the type of class element this object is.
virtual PRMAttribute< GUM_SCALAR > * getCastDescendant() const =0
Returns a proper cast descendant of this PRMAttribute.
static INLINE bool isReferenceSlot(const PRMClassElement< GUM_SCALAR > &elt)
Returns true if obj_ptr is of type PRMReferenceSlot.
ClassElementType
Returns true if obj_ptr is of type PRMReferenceSlot.
virtual PRMType & type()=0
Return a reference over the gum::PRMType of this class element.
virtual const PRMType & type() const =0
Return a constant reference over the gum::PRMType of this class element.
const std::string & safeName() const
Returns the safe name of this PRMClassElement, if any.
virtual ~PRMClassElement()
Destructor of this class.
static INLINE bool isAttribute(const PRMClassElement< GUM_SCALAR > &elt)
Returns true if obj_ptr is of type PRMAttribute.
std::string safeName_
The safe name of this PRMClassElement.
const std::string & name() const
Returns the name of this object.
prm_type
Enumeration of the different types of objects handled by a PRM.
PRMObject(const std::string &name)
Constructor.
This is a decoration of the DiscreteVariable class.
Size NodeId
Type for node ids.
namespace for all probabilistic relational models entities
gum is the global namespace for all aGrUM entities