29 #ifndef GUM_ATTRIBUTE_H 30 #define GUM_ATTRIBUTE_H 32 #include <agrum/PRM/elements/PRMClassElement.h> 33 #include <agrum/tools/multidim/implementations/multiDimImplementation.h> 59 template <
typename GUM_SCALAR >
79 copy(Bijection<
const DiscreteVariable*,
const DiscreteVariable* > bij)
const = 0;
81 virtual void copyCpf(
const Bijection<
const DiscreteVariable*,
const DiscreteVariable* >& bif,
98 virtual void addParent(
const PRMClassElement< GUM_SCALAR >& elt) = 0;
101 virtual void addChild(
const PRMClassElement< GUM_SCALAR >& elt) = 0;
163 virtual void swap(
const PRMType& old_type,
const PRMType& new_type) = 0;
175 virtual void type_(PRMType* t) = 0;
179 #ifndef GUM_NO_EXTERN_TEMPLATE_CLASS 187 #include <agrum/PRM/elements/PRMAttribute_tpl.h> PRMAttribute(const PRMAttribute< GUM_SCALAR > &source)
virtual PRMAttribute< GUM_SCALAR > * getCastDescendant() const =0
Returns a proper cast descendant of this PRMAttribute.
PRMAttribute(const std::string &name)
Destructor.
virtual void addParent(const PRMClassElement< GUM_SCALAR > &elt)=0
See gum::PRMClassElement::addParent_().
virtual PRMAttribute< GUM_SCALAR > * copy(Bijection< const DiscreteVariable *, const DiscreteVariable * > bij) const =0
See gum::PRMClassElement::elt_type().
virtual PRMAttribute< GUM_SCALAR > * newFactory(const PRMClass< GUM_SCALAR > &c) const =0
See gum::PRMClassElement::elt_type().
virtual PRMType & type()=0
See gum::PRMClassElement::type().
INLINE void emplace(Args &&... args)
virtual ~PRMAttribute()
Destructor.
virtual void becomeCastDescendant(PRMType &subtype)=0
Change this attribute to be a cast descendant of a an attribute with type subtype.
virtual void overload(PRMAttribute< GUM_SCALAR > *source)
Set this as overload of source (necessayr to preserver internal pointers for MultiDims).
virtual const Potential< GUM_SCALAR > & cpf() const =0
See gum::PRMClassElement::cpf().
ParamScopeData(const std::string &s, const PRMReferenceSlot< GUM_SCALAR > &ref, Idx d)
virtual PRMClassElement< GUM_SCALAR >::ClassElementType elt_type() const =0
See gum::PRMClassElement::elt_type().
virtual void addChild(const PRMClassElement< GUM_SCALAR > &elt)=0
See gum::PRMClassElement::addChild_().
virtual void swap(const PRMType &old_type, const PRMType &new_type)=0
Swap old_type with new_type in the PRMClassElement cpt.
virtual PRMType * type_()=0
virtual void setAsCastDescendant(PRMAttribute< GUM_SCALAR > *attr)=0
Define attr as a cast descendant of this PRMAttribute.
virtual void copyCpf(const Bijection< const DiscreteVariable *, const DiscreteVariable * > &bif, const PRMAttribute< GUM_SCALAR > &source)=0
See gum::PRMClassElement::elt_type().
virtual const PRMType & type() const =0
See gum::PRMClassElement::type().
virtual void type_(PRMType *t)=0