![]() |
aGrUM 2.3.2
a C++ library for (probabilistic) graphical models
|
<agrum/PRM/classElementContainer.h> More...
#include <PRMClassElementContainer.h>
Public Member Functions | |
Protected constructors & destructor. | |
| PRMClassElementContainer (const std::string &name) | |
| Default constructor. | |
| virtual | ~PRMClassElementContainer () |
| Destructor. | |
Getters on the gum::PRMClassElement<GUM_SCALAR>. | |
| virtual bool | belongsTo (const PRMClassElement< GUM_SCALAR > &elt) const |
| Returns true if elt belongs to this PRMClassElementContainer. | |
| virtual bool | exists (const std::string &name) const |
| Returns true if a member with the given name exists in this PRMClassElementContainer or in the PRMClassElementContainer hierarchy. | |
| virtual PRMClassElement< GUM_SCALAR > & | get (const std::string &name)=0 |
| Getter on a member of this PRMClassElementContainer. | |
| virtual const PRMClassElement< GUM_SCALAR > & | get (const std::string &name) const =0 |
| Constant getter on a member of this PRMClassElementContainer. | |
| virtual NodeId | add (PRMClassElement< GUM_SCALAR > *elt)=0 |
| Add a PRMClassElement<GUM_SCALAR> to this PRMClassElementContainer. | |
| virtual NodeId | overload (PRMClassElement< GUM_SCALAR > *elt)=0 |
| Add a PRMClassElement<GUM_SCALAR> which overload an inherited PRMClassElement<GUM_SCALAR>. | |
| virtual void | addArc (const std::string &tail, const std::string &head)=0 |
| Add an arc between two PRMClassElement<GUM_SCALAR>. | |
| virtual bool | isInputNode (const PRMClassElement< GUM_SCALAR > &elt) const |
| Returns true if the node is an input node. | |
| virtual void | setInputNode (const PRMClassElement< GUM_SCALAR > &elt, bool b) |
| Set the input flag value of id at b. | |
| virtual bool | isOutputNode (const PRMClassElement< GUM_SCALAR > &elt) const =0 |
| Returns true if the node is an output node. | |
| virtual void | setOutputNode (const PRMClassElement< GUM_SCALAR > &elt, bool b) |
| Set the output flag value of id at b. | |
| virtual bool | isInnerNode (const PRMClassElement< GUM_SCALAR > &elt) const |
| Returns true if the node is an inner node. | |
Graphical operator | |
| virtual const DAG & | containerDag () const |
| Returns the gum::DAG of this PRMClassElementContainer. | |
| virtual bool | exists (NodeId id) const |
| Returns true if a member with the given id exists in this PRMClassElementContainer or in the PRMClassElementContainer hierarchy. | |
| virtual PRMClassElement< GUM_SCALAR > & | get (NodeId id)=0 |
| Getter on a member of this PRMClassElementContainer. | |
| virtual const PRMClassElement< GUM_SCALAR > & | get (NodeId id) const =0 |
| Constant getter on a member of this PRMClassElementContainer. | |
Getters & setters operators | |
| virtual PRMClassElement< GUM_SCALAR > & | operator[] (NodeId id)=0 |
| Getter on a member of this PRMClassElementContainer. | |
| virtual const PRMClassElement< GUM_SCALAR > & | operator[] (NodeId id) const =0 |
| Constant getter on a member of this PRMClassElementContainer. | |
| virtual PRMClassElement< GUM_SCALAR > & | operator[] (const std::string &name)=0 |
| Getter on a member of this PRMClassElementContainer. | |
| virtual const PRMClassElement< GUM_SCALAR > & | operator[] (const std::string &name) const =0 |
| Constant getter on a member of this PRMClassElementContainer. | |
Inheritance getters and setters | |
| virtual bool | isSubTypeOf (const PRMClassElementContainer< GUM_SCALAR > &cec) const =0 |
| Test if this PRMClassElementContainer is a subtype of cec. | |
| virtual bool | isSuperTypeOf (const PRMClassElementContainer< GUM_SCALAR > &cec) const |
| Test if this PRMClassElementContainer is a super type of cec. | |
Getters & setters. | |
| const std::string & | name () const |
| Returns the name of this object. | |
| void | name (const std::string &name) |
| Change the name of the PRM Object. | |
| virtual prm_type | obj_type () const =0 |
| Returns the type of this object. | |
Operators | |
| bool | operator== (const PRMObject &obj) const |
| To PRMObject are equal if they have the same name (which is unique). | |
| bool | operator!= (const PRMObject &obj) const |
| To PRMObject are equal if they have the same name (which is unique). | |
Protected Member Functions | |
| PRMClassElementContainer< GUM_SCALAR > & | operator= (const PRMClassElementContainer< GUM_SCALAR > &source) |
| Copy operator. Don't use it. | |
| PRMClassElementContainer (const PRMClassElementContainer< GUM_SCALAR > &source) | |
| Copy constructor. Don't use it. | |
| virtual const DAG & | dag_ () const =0 |
| virtual DAG & | dag_ ()=0 |
| Returns a non constant reference over this PRMClassElementContainer's DAG. | |
| virtual void | findAllSubtypes_ (Set< PRMClassElementContainer< GUM_SCALAR > * > &set)=0 |
| Fills set with all the subtypes of this PRMInterface, this includes extensions and implementations. | |
| virtual std::pair< bool, bool > & | getIOFlag_ (const PRMClassElement< GUM_SCALAR > &elt) |
| Returns the IO flags of a PRMClassElement<GUM_SCALAR>. | |
| virtual const std::pair< bool, bool > & | getIOFlag_ (const PRMClassElement< GUM_SCALAR > &elt) const |
| Returns the IO flags of a PRMClassElement<GUM_SCALAR>. | |
| virtual void | setIOFlag_ (const PRMClassElement< GUM_SCALAR > &elt, const std::pair< bool, bool > &flags) |
| Defines the IO flags of a PRMClassElement<GUM_SCALAR>. | |
| virtual void | copyIOFlags_ (const PRMClassElementContainer< GUM_SCALAR > &c) |
| Copy the IO Flags of c in this PRMClassElementContainer. | |
| virtual void | updateDescendants_ (const PRMClassElement< GUM_SCALAR > &elt)=0 |
| When a PRMClassElement<GUM_SCALAR> becomes an Output node we must update any the IO flags of every descendant of this PRMClassElementContainer. Note that after its declaration, input flags can not be changed and output flags can only become true. | |
Private Attributes | |
| HashTable< std::string, std::pair< bool, bool > > | _IOFlags_ |
| input / output flags, useful when inheriting or copying. | |
Private members. | |
| std::string | _name_ |
Friends | |
| class | PRMClassElementContainterIterator |
| class | PRMClassElementContainterConstIterator |
Built-in types. | |
| enum class | prm_type : char { ALL , CLASS , PRM_INTERFACE , CLASS_ELT , TYPE , SYSTEM , INSTANCE } |
| Enumeration of the different types of objects handled by a PRM. More... | |
| static std::string | LEFT_CAST () |
| Enumeration of the different types of objects handled by a PRM. | |
| static std::string | RIGHT_CAST () |
| Enumeration of the different types of objects handled by a PRM. | |
| static std::string | enum2str (prm_type type) |
| Returns the string representation of a PRMObject. | |
| static INLINE bool | isClass (const PRMObject &obj) |
| Returns true if obj_ptr is of type Class. | |
| static INLINE bool | isInterface (const PRMObject &obj) |
| Returns true if obj_ptr is of type PRMInterface. | |
| static INLINE bool | isInstance (const PRMObject &obj) |
| Returns true if obj_ptr is of type PRMInstance. | |
<agrum/PRM/classElementContainer.h>
Abstract class for classes containing gum::PRMClassElement<GUM_SCALAR>.
To print a PRMClassElementContainer you can use the following operator: gum::operator<<(std::ostream&, const PRMClassElementContainer&) which print the PRMClassElementContainer in the graphviz-dot format.
Definition at line 79 of file PRMClassElementContainer.h.
|
stronginherited |
Enumeration of the different types of objects handled by a PRM.
The "all" type is used to tell that we want any kind of PRMType (useful with iterators for example). No PRMObject will ever have "all" as type.
| Enumerator | |
|---|---|
| ALL | |
| CLASS | |
| PRM_INTERFACE | |
| CLASS_ELT | |
| TYPE | |
| SYSTEM | |
| INSTANCE | |
Definition at line 88 of file PRMObject.h.
| INLINE gum::prm::PRMClassElementContainer< GUM_SCALAR >::PRMClassElementContainer | ( | const std::string & | name | ) |
Default constructor.
Definition at line 65 of file PRMClassElementContainer_tpl.h.
References PRMClassElementContainer(), gum::prm::PRMObject::PRMObject(), and gum::prm::PRMObject::name().
Referenced by gum::prm::PRMClass< GUM_SCALAR >::PRMClass(), gum::prm::PRMClass< GUM_SCALAR >::PRMClass(), gum::prm::PRMClass< GUM_SCALAR >::PRMClass(), gum::prm::PRMClass< GUM_SCALAR >::PRMClass(), PRMClassElementContainer(), PRMClassElementContainer(), gum::prm::PRMInterface< GUM_SCALAR >::PRMInterface(), gum::prm::PRMInterface< GUM_SCALAR >::PRMInterface(), gum::prm::PRMInterface< GUM_SCALAR >::PRMInterface(), ~PRMClassElementContainer(), copyIOFlags_(), gum::prm::PRMClass< GUM_SCALAR >::findAllSubtypes_(), findAllSubtypes_(), gum::prm::PRMInterface< GUM_SCALAR >::findAllSubtypes_(), gum::prm::PRMClass< GUM_SCALAR >::inheritReferenceSlots(), isSubTypeOf(), gum::prm::PRMInterface< GUM_SCALAR >::isSubTypeOf(), isSuperTypeOf(), gum::prm::PRMClass< GUM_SCALAR >::operator=(), and operator=().
|
virtual |
Destructor.
Definition at line 71 of file PRMClassElementContainer_tpl.h.
References PRMClassElementContainer().
|
protected |
Copy constructor. Don't use it.
Definition at line 83 of file PRMClassElementContainer_tpl.h.
References PRMClassElementContainer(), gum::prm::PRMObject::PRMObject(), and GUM_ERROR.
|
pure virtual |
Add a PRMClassElement<GUM_SCALAR> to this PRMClassElementContainer.
The pointer is "given" to this class, which will delete it when ~Class() is called.
The NodeId of elt is defined when it is added to this, discarding any previous value.
If you want to overload an inherited PRMClassElement<GUM_SCALAR> call Class::overload().
When adding an PRMAttribute or an PRMAggregate its type safe name is automatically added, the syntax is <type>name. So you can either use its type safe name or its real name. See the ref prm_typ_inh "type inheritance section" for further details.
| elt | The PRMClassElement<GUM_SCALAR> added to this Class. |
| DuplicateElement | Raised if elt's name is already used in this class. |
Implemented in gum::prm::PRMClass< GUM_SCALAR >, gum::prm::PRMClass< double >, and gum::prm::PRMInterface< GUM_SCALAR >.
Referenced by gum::prm::PRMFactory< GUM_SCALAR >::_addParent_(), gum::prm::PRMFactory< GUM_SCALAR >::addReferenceSlot(), and gum::prm::PRMFactory< GUM_SCALAR >::startAttribute().
|
pure virtual |
Add an arc between two PRMClassElement<GUM_SCALAR>.
Implemented in gum::prm::PRMClass< GUM_SCALAR >, gum::prm::PRMClass< double >, gum::prm::PRMInterface< GUM_SCALAR >, and gum::prm::PRMInterface< double >.
Referenced by gum::prm::PRMFactory< GUM_SCALAR >::_addParent_().
|
virtual |
Returns true if elt belongs to this PRMClassElementContainer.
| elt | A PRMClassElement<GUM_SCALAR>. |
Definition at line 190 of file PRMClassElementContainer_tpl.h.
References get(), and gum::prm::PRMClassElement< GUM_SCALAR >::safeName().
|
virtual |
Returns the gum::DAG of this PRMClassElementContainer.
Be very careful when using NodeId with PRMClassElement<GUM_SCALAR>: there is no guarantee that an inherited PRMClassElement<GUM_SCALAR> will have the same NodeId than its superclass counterpart.
When dealing with different classes and interfaces ALWAYS use safe-name as identifier.
Definition at line 198 of file PRMClassElementContainer_tpl.h.
References dag_().
Referenced by gum::prm::ClassDependencyGraph< GUM_SCALAR >::_addArcs_(), gum::prm::ClassBayesNet< GUM_SCALAR >::_init_(), gum::prm::SVE< GUM_SCALAR >::_initLiftedNodes_(), gum::prm::SVED< GUM_SCALAR >::_initLiftedNodes_(), gum::prm::PRMClass< GUM_SCALAR >::_overloadReference_(), gum::prm::PRMFactory< GUM_SCALAR >::addAttribute(), gum::prm::PRMClass< GUM_SCALAR >::completeInheritance(), exists(), and gum::prm::PRMClassElementContainer< double >::isInputNode().
|
protectedvirtual |
Copy the IO Flags of c in this PRMClassElementContainer.
| c | A PRMClassElementContainer. |
Definition at line 57 of file PRMClassElementContainer_tpl.h.
References PRMClassElementContainer(), _IOFlags_, get(), and setIOFlag_().
|
protectedpure virtual |
Implemented in gum::prm::PRMClass< GUM_SCALAR >, gum::prm::PRMClass< double >, gum::prm::PRMInterface< GUM_SCALAR >, and gum::prm::PRMInterface< double >.
Referenced by containerDag().
|
protectedpure virtual |
Returns a non constant reference over this PRMClassElementContainer's DAG.
Implemented in gum::prm::PRMClass< GUM_SCALAR >, and gum::prm::PRMInterface< GUM_SCALAR >.
|
inlinestaticinherited |
Returns the string representation of a PRMObject.
Definition at line 95 of file PRMObject.h.
References CLASS, CLASS_ELT, INSTANCE, PRM_INTERFACE, SYSTEM, and TYPE.
Referenced by gum::prm::operator<<().
|
virtual |
Returns true if a member with the given name exists in this PRMClassElementContainer or in the PRMClassElementContainer hierarchy.
Definition at line 182 of file PRMClassElementContainer_tpl.h.
References get(), and gum::prm::PRMObject::name().
Referenced by gum::prm::PRMClass< GUM_SCALAR >::_checkInterface_(), gum::prm::o3prm::O3ClassFactory< GUM_SCALAR >::_checkLocalParent_(), gum::prm::o3prm::O3SystemFactory< GUM_SCALAR >::_checkParameters_(), gum::prm::o3prm::O3ClassFactory< GUM_SCALAR >::_checkSlotChainLink_(), gum::prm::PRMFactory< GUM_SCALAR >::addNoisyOrCompound(), gum::prm::PRMFactory< GUM_SCALAR >::continueAggregator(), gum::prm::PRMFactory< GUM_SCALAR >::continueAttribute(), gum::prm::PRMClass< GUM_SCALAR >::overload(), gum::prm::PRMInterface< GUM_SCALAR >::overload(), setInputNode(), setOutputNode(), and gum::prm::PRMFactory< GUM_SCALAR >::startAttribute().
|
virtual |
Returns true if a member with the given id exists in this PRMClassElementContainer or in the PRMClassElementContainer hierarchy.
| id | A NodeId. |
Definition at line 177 of file PRMClassElementContainer_tpl.h.
References containerDag().
|
protectedpure virtual |
Fills set with all the subtypes of this PRMInterface, this includes extensions and implementations.
Implemented in gum::prm::PRMClass< GUM_SCALAR >, gum::prm::PRMClass< double >, and gum::prm::PRMInterface< GUM_SCALAR >.
References PRMClassElementContainer().
|
pure virtual |
Constant getter on a member of this PRMClassElementContainer.
| name | The member's name. |
| NotFound | Raised if no attribute matches name. |
Implemented in gum::prm::PRMClass< GUM_SCALAR >, and gum::prm::PRMInterface< GUM_SCALAR >.
References gum::prm::PRMObject::name().
|
pure virtual |
Getter on a member of this PRMClassElementContainer.
| name | The member's name. |
| NotFound | Raised if no attribute matches name. |
Implemented in gum::prm::PRMClass< GUM_SCALAR >, and gum::prm::PRMInterface< GUM_SCALAR >.
References gum::prm::PRMObject::name().
Referenced by gum::prm::ClassDependencyGraph< GUM_SCALAR >::_addArcs_(), gum::prm::PRMFactory< GUM_SCALAR >::_addParent_(), gum::prm::PRMFactory< GUM_SCALAR >::_buildSlotChain_(), belongsTo(), gum::prm::PRMFactory< GUM_SCALAR >::continueAggregator(), gum::prm::PRMFactory< GUM_SCALAR >::continueAttribute(), copyIOFlags_(), exists(), and gum::prm::PRMClassElementContainer< double >::isInputNode().
|
pure virtual |
Constant getter on a member of this PRMClassElementContainer.
| id | The member's id. |
| NotFound | Raised if no attribute matches name. |
Implemented in gum::prm::PRMClass< GUM_SCALAR >, and gum::prm::PRMInterface< GUM_SCALAR >.
|
pure virtual |
Getter on a member of this PRMClassElementContainer.
| id | The member's id. |
| NotFound | Raised if no attribute matches name. |
Implemented in gum::prm::PRMClass< GUM_SCALAR >, and gum::prm::PRMInterface< GUM_SCALAR >.
|
protectedvirtual |
Returns the IO flags of a PRMClassElement<GUM_SCALAR>.
| elt | The PRMClassElement<GUM_SCALAR>. |
| NotFound | Raised if elt does not have any IO flags. |
Definition at line 148 of file PRMClassElementContainer_tpl.h.
References _IOFlags_, GUM_ERROR, and gum::prm::PRMClassElement< GUM_SCALAR >::safeName().
Referenced by gum::prm::PRMClass< GUM_SCALAR >::_addIOInterfaceFlags_(), isInnerNode(), gum::prm::PRMClass< GUM_SCALAR >::isOutputNode(), gum::prm::PRMInterface< GUM_SCALAR >::isOutputNode(), and setOutputNode().
|
protectedvirtual |
Returns the IO flags of a PRMClassElement<GUM_SCALAR>.
| elt | The PRMClassElement<GUM_SCALAR>. |
| NotFound | Raised if elt does not have any IO flags. |
Definition at line 158 of file PRMClassElementContainer_tpl.h.
References _IOFlags_, GUM_ERROR, and gum::prm::PRMClassElement< GUM_SCALAR >::safeName().
Returns true if obj_ptr is of type Class.
Definition at line 114 of file PRMObject.h.
References PRMObject(), CLASS, and obj_type().
Referenced by gum::prm::PRMClass< GUM_SCALAR >::scope(), and gum::prm::PRMFactory< GUM_SCALAR >::startAttribute().
|
virtual |
Returns true if the node is an inner node.
PRMAttribute or PRMAggregate can either be input, output, both or internal nodes.
By defaut, attributes and aggregates are inner nodes.
| elt | A PRMClassElement<GUM_SCALAR>. |
| NotFound | Raised if NodeId does'nt match any PRMClassElement<GUM_SCALAR> in this. |
| WrongClassElement | Raised if NodeId is neither an PRMAttribute nor an PRMAggregate. |
Definition at line 134 of file PRMClassElementContainer_tpl.h.
References getIOFlag_().
Referenced by gum::prm::SVE< GUM_SCALAR >::_initLiftedNodes_().
|
virtual |
Returns true if the node is an input node.
PRMAttribute or PRMAggregate can either be input, output, both or internal nodes.
By defaut, attributes and aggregates are inner nodes.
| elt | A PRMClassElement<GUM_SCALAR>. |
Definition at line 90 of file PRMClassElementContainer_tpl.h.
Returns true if obj_ptr is of type PRMInstance.
Definition at line 122 of file PRMObject.h.
References PRMObject(), INSTANCE, and obj_type().
Returns true if obj_ptr is of type PRMInterface.
Definition at line 117 of file PRMObject.h.
References PRMObject(), obj_type(), and PRM_INTERFACE.
|
pure virtual |
Returns true if the node is an output node.
PRMAttribute or PRMAggregate can either be input, output, both or internal nodes.
By defaut, attributes and aggregates are inner nodes.
| elt | A PRMClassElement<GUM_SCALAR>. |
Implemented in gum::prm::PRMClass< GUM_SCALAR >, gum::prm::PRMClass< double >, and gum::prm::PRMInterface< GUM_SCALAR >.
|
pure virtual |
Test if this PRMClassElementContainer is a subtype of cec.
| cec |
Implemented in gum::prm::PRMClass< GUM_SCALAR >, gum::prm::PRMClass< double >, and gum::prm::PRMInterface< GUM_SCALAR >.
References PRMClassElementContainer().
Referenced by isSuperTypeOf().
|
virtual |
Test if this PRMClassElementContainer is a super type of cec.
This returns cec.isSubTypeOf(*this).
| cec |
Definition at line 142 of file PRMClassElementContainer_tpl.h.
References PRMClassElementContainer(), and isSubTypeOf().
|
inlinestaticinherited |
Enumeration of the different types of objects handled by a PRM.
The "all" type is used to tell that we want any kind of PRMType (useful with iterators for example). No PRMObject will ever have "all" as type.
Definition at line 90 of file PRMObject.h.
Referenced by gum::prm::PRMAggregate< GUM_SCALAR >::PRMAggregate(), gum::prm::PRMAggregate< GUM_SCALAR >::PRMAggregate(), gum::prm::PRMFormAttribute< GUM_SCALAR >::PRMFormAttribute(), gum::prm::PRMReferenceSlot< GUM_SCALAR >::PRMReferenceSlot(), gum::prm::PRMScalarAttribute< GUM_SCALAR >::PRMScalarAttribute(), gum::prm::PRMSlotChain< GUM_SCALAR >::PRMSlotChain(), gum::prm::PRMClassElement< GUM_SCALAR >::cast(), and gum::prm::decomposePath().
|
inherited |
Returns the name of this object.
Definition at line 54 of file PRMObject_inl.h.
References _name_.
Referenced by gum::prm::PRMAggregate< GUM_SCALAR >::PRMAggregate(), gum::prm::PRMAggregate< GUM_SCALAR >::PRMAggregate(), gum::prm::PRMAttribute< GUM_SCALAR >::PRMAttribute(), gum::prm::PRMClass< GUM_SCALAR >::PRMClass(), gum::prm::PRMClass< GUM_SCALAR >::PRMClass(), gum::prm::PRMClass< GUM_SCALAR >::PRMClass(), gum::prm::PRMClass< GUM_SCALAR >::PRMClass(), gum::prm::PRMClassElement< GUM_SCALAR >::PRMClassElement(), gum::prm::PRMClassElement< GUM_SCALAR >::PRMClassElement(), gum::prm::PRMClassElementContainer< GUM_SCALAR >::PRMClassElementContainer(), gum::prm::PRMFormAttribute< GUM_SCALAR >::PRMFormAttribute(), gum::prm::PRMFormAttribute< GUM_SCALAR >::PRMFormAttribute(), gum::prm::PRMFuncAttribute< GUM_SCALAR >::PRMFuncAttribute(), gum::prm::PRMInstance< GUM_SCALAR >::PRMInstance(), gum::prm::PRMInterface< GUM_SCALAR >::PRMInterface(), gum::prm::PRMInterface< GUM_SCALAR >::PRMInterface(), gum::prm::PRMInterface< GUM_SCALAR >::PRMInterface(), PRMObject(), gum::prm::PRMParameter< GUM_SCALAR >::PRMParameter(), gum::prm::PRMParameter< GUM_SCALAR >::PRMParameter(), gum::prm::PRMReferenceSlot< GUM_SCALAR >::PRMReferenceSlot(), gum::prm::PRMScalarAttribute< GUM_SCALAR >::PRMScalarAttribute(), gum::prm::PRMSlotChain< GUM_SCALAR >::PRMSlotChain(), gum::prm::PRMSlotChain< GUM_SCALAR >::PRMSlotChain(), gum::prm::PRMSlotChain< GUM_SCALAR >::PRMSlotChain(), gum::prm::PRMSlotChain< double >::PRMSlotChain(), gum::prm::PRMSystem< GUM_SCALAR >::PRMSystem(), gum::prm::__print_attribute__(), gum::prm::__print_instance__(), gum::prm::SVE< GUM_SCALAR >::_addDelayedVariable_(), gum::prm::PRMClass< GUM_SCALAR >::_addIOInterfaceFlags_(), gum::prm::PRMFactory< GUM_SCALAR >::_addParent_(), gum::prm::PRMInstance< GUM_SCALAR >::_addReferingInstance_(), gum::prm::PRMClass< GUM_SCALAR >::_checkInterface_(), gum::prm::PRMFactory< GUM_SCALAR >::_checkInterfaceImplementation_(), gum::prm::PRMClass< GUM_SCALAR >::_checkInterfaces_(), gum::prm::o3prm::O3ClassFactory< GUM_SCALAR >::_checkRawCPT_(), gum::prm::PRMClass< GUM_SCALAR >::_checkRefInterface_(), gum::prm::PRMClass< GUM_SCALAR >::_checkRefInterfaces_(), gum::prm::o3prm::O3ClassFactory< GUM_SCALAR >::_checkRuleCPTSumsTo1_(), gum::prm::PRMInstance< GUM_SCALAR >::_copyAggregates_(), gum::prm::PRMInstance< GUM_SCALAR >::_copyAttribute_(), gum::prm::PRMSystem< GUM_SCALAR >::_groundAgg_(), gum::prm::PRMSystem< double >::_groundAgg_(), gum::prm::PRMSystem< GUM_SCALAR >::_groundRef_(), gum::prm::PRMSystem< double >::_groundTensor_(), gum::prm::PRMClass< GUM_SCALAR >::_overloadAttribute_(), gum::prm::PRMClass< GUM_SCALAR >::_overloadParameter_(), gum::prm::PRMClass< GUM_SCALAR >::_overloadReference_(), gum::prm::PRMInterface< GUM_SCALAR >::_overloadReferenceSlot_(), gum::prm::gspan::StrictSearch< GUM_SCALAR >::_str_(), gum::prm::gspan::StrictSearch< GUM_SCALAR >::_str_(), gum::prm::gspan::StrictSearch< GUM_SCALAR >::_str_(), gum::prm::StructuredInference< GUM_SCALAR >::_str_(), gum::prm::StructuredInference< GUM_SCALAR >::_str_(), gum::prm::StructuredInference< GUM_SCALAR >::_str_(), gum::prm::PRMClass< GUM_SCALAR >::add(), gum::prm::PRMInterface< GUM_SCALAR >::add(), gum::prm::PRMSystem< GUM_SCALAR >::add(), gum::prm::PRMFactory< GUM_SCALAR >::addAggregator(), gum::prm::PRMFormAttribute< GUM_SCALAR >::addParent(), gum::prm::PRMScalarAttribute< GUM_SCALAR >::addParent(), gum::prm::PRMClassElement< GUM_SCALAR >::cast(), gum::prm::PRMClass< GUM_SCALAR >::completeInheritance(), gum::prm::PRMFormAttribute< GUM_SCALAR >::copy(), gum::prm::PRMScalarAttribute< GUM_SCALAR >::copy(), gum::prm::PRMClassElementContainer< GUM_SCALAR >::exists(), gum::prm::PRMInstance< GUM_SCALAR >::exists(), gum::prm::PRMSystem< GUM_SCALAR >::exists(), gum::prm::o3prmr::O3prmrInterpreter::findAttributeName(), gum::prm::o3prmr::O3prmrInterpreter::findInstanceName(), gum::prm::PRMClass< GUM_SCALAR >::get(), gum::prm::PRMClass< GUM_SCALAR >::get(), gum::prm::PRMClassElementContainer< GUM_SCALAR >::get(), gum::prm::PRMClassElementContainer< GUM_SCALAR >::get(), gum::prm::PRMInstance< GUM_SCALAR >::get(), gum::prm::PRMInstance< GUM_SCALAR >::get(), gum::prm::PRMInterface< GUM_SCALAR >::get(), gum::prm::PRMInterface< GUM_SCALAR >::get(), gum::prm::PRMSystem< GUM_SCALAR >::get(), gum::prm::PRMSystem< GUM_SCALAR >::get(), gum::prm::PRMSystem< GUM_SCALAR >::getArray(), gum::prm::PRMSystem< GUM_SCALAR >::getArrayType(), gum::prm::PRMSystem< GUM_SCALAR >::getArrayType(), gum::prm::PRMFormAttribute< GUM_SCALAR >::getCastDescendant(), gum::prm::PRMScalarAttribute< GUM_SCALAR >::getCastDescendant(), gum::prm::PRMSystem< GUM_SCALAR >::groundedBN(), gum::prm::PRMClass< GUM_SCALAR >::inheritAggregates(), gum::prm::PRMSystem< double >::instantiate(), gum::prm::PRMSystem< GUM_SCALAR >::isArray(), gum::prm::PRMClass< GUM_SCALAR >::isCastDescendant(), gum::prm::PRMSystem< GUM_SCALAR >::isInstance(), name(), gum::prm::PRMType::name(), gum::prm::PRMFormAttribute< GUM_SCALAR >::newFactory(), gum::prm::PRMScalarAttribute< GUM_SCALAR >::newFactory(), operator!=(), gum::prm::PRMClass< GUM_SCALAR >::operator=(), operator==(), gum::prm::PRMType::operator==(), gum::prm::PRMClass< GUM_SCALAR >::operator[](), gum::prm::PRMClass< GUM_SCALAR >::operator[](), gum::prm::PRMClassElementContainer< GUM_SCALAR >::operator[](), gum::prm::PRMClassElementContainer< GUM_SCALAR >::operator[](), gum::prm::PRMInterface< GUM_SCALAR >::operator[](), gum::prm::PRMClass< GUM_SCALAR >::overload(), gum::prm::PRMInterface< GUM_SCALAR >::overload(), gum::prm::PRMClassElementContainer< GUM_SCALAR >::PRMClassElementContainterConstIterator, gum::prm::PRMClassElementContainer< GUM_SCALAR >::setInputNode(), gum::prm::PRMClassElementContainer< GUM_SCALAR >::setOutputNode(), gum::prm::PRMFactory< GUM_SCALAR >::startClass(), gum::prm::PRMFactory< GUM_SCALAR >::startInterface(), and gum::prm::PRMFactory< GUM_SCALAR >::startSystem().
|
inherited |
|
pure virtualinherited |
Returns the type of this object.
Implemented in gum::prm::PRMClass< GUM_SCALAR >, gum::prm::PRMClass< double >, gum::prm::PRMClassElement< GUM_SCALAR >, gum::prm::PRMClassElement< double >, gum::prm::PRMInstance< GUM_SCALAR >, gum::prm::PRMInstance< double >, gum::prm::PRMInterface< GUM_SCALAR >, gum::prm::PRMInterface< double >, gum::prm::PRMSystem< GUM_SCALAR >, gum::prm::PRMSystem< double >, and gum::prm::PRMType.
References PRMObject().
Referenced by gum::prm::PRMClass< double >::_checkOverloadLegality_(), gum::prm::PRMFactory< GUM_SCALAR >::_checkStack_(), gum::prm::PRMFactory< GUM_SCALAR >::_checkStackContainter_(), isClass(), isInstance(), isInterface(), and gum::prm::PRMInterface< GUM_SCALAR >::isSubTypeOf().
To PRMObject are equal if they have the same name (which is unique).
Definition at line 66 of file PRMObject_inl.h.
References PRMObject(), _name_, and name().
|
protected |
Copy operator. Don't use it.
Definition at line 77 of file PRMClassElementContainer_tpl.h.
References PRMClassElementContainer(), and GUM_ERROR.
To PRMObject are equal if they have the same name (which is unique).
Definition at line 62 of file PRMObject_inl.h.
References PRMObject(), _name_, and name().
|
pure virtual |
Constant getter on a member of this PRMClassElementContainer.
| name | The member's name. |
| NotFound | Raised if no attribute matches name. |
Implemented in gum::prm::PRMClass< GUM_SCALAR >, and gum::prm::PRMInterface< GUM_SCALAR >.
References gum::prm::PRMObject::name().
|
pure virtual |
Getter on a member of this PRMClassElementContainer.
| name | The member's name. |
| NotFound | Raised if no attribute matches name. |
Implemented in gum::prm::PRMClass< GUM_SCALAR >, and gum::prm::PRMInterface< GUM_SCALAR >.
References gum::prm::PRMObject::name().
|
pure virtual |
Constant getter on a member of this PRMClassElementContainer.
| id | The member's id. |
| NotFound | Raised if no attribute matches name. |
Implemented in gum::prm::PRMClass< GUM_SCALAR >, and gum::prm::PRMInterface< GUM_SCALAR >.
|
pure virtual |
Getter on a member of this PRMClassElementContainer.
| id | The member's id. |
| NotFound | Raised if no attribute matches name. |
Implemented in gum::prm::PRMClass< GUM_SCALAR >, gum::prm::PRMClass< double >, gum::prm::PRMInterface< GUM_SCALAR >, and gum::prm::PRMInterface< double >.
|
pure virtual |
Add a PRMClassElement<GUM_SCALAR> which overload an inherited PRMClassElement<GUM_SCALAR>.
The pointer is "given" to this class, which will delete it when ~PRMClassElementContainer() is called.
The NodeId of elt is defined when it is added to this, discarding any previous value. There is no guaranty that elt will have the same NodeId than the PRMClassElement<GUM_SCALAR> it overloaded.
You can only overload inherited PRMClassElement<GUM_SCALAR> and only if elt is a subtype of the inherited PRMClassElement<GUM_SCALAR>. Thus you can only overload PRMReferenceSlot and PRMAttribute. In the case of PRMAttribute you can overload an inherited PRMAttribute even if they are of the same type: this is useful when you want to redefine the dependencies of an PRMAttribute or its CPF. You can also overload an PRMAttribute with an PRMAggregate, as long as their respective PRMType allow it.
| elt | The PRMClassElement<GUM_SCALAR> overloading an inherited PRMClassElement<GUM_SCALAR> in this PRMClassElementContainer. |
| OperationNotAllowed | Raised if overloading is illegal. |
Implemented in gum::prm::PRMClass< GUM_SCALAR >, gum::prm::PRMClass< double >, and gum::prm::PRMInterface< GUM_SCALAR >.
Referenced by gum::prm::PRMFactory< GUM_SCALAR >::addReferenceSlot(), and gum::prm::PRMFactory< GUM_SCALAR >::startAttribute().
|
inlinestaticinherited |
Enumeration of the different types of objects handled by a PRM.
The "all" type is used to tell that we want any kind of PRMType (useful with iterators for example). No PRMObject will ever have "all" as type.
Definition at line 92 of file PRMObject.h.
Referenced by gum::prm::PRMAggregate< GUM_SCALAR >::PRMAggregate(), gum::prm::PRMAggregate< GUM_SCALAR >::PRMAggregate(), gum::prm::PRMFormAttribute< GUM_SCALAR >::PRMFormAttribute(), gum::prm::PRMReferenceSlot< GUM_SCALAR >::PRMReferenceSlot(), gum::prm::PRMScalarAttribute< GUM_SCALAR >::PRMScalarAttribute(), gum::prm::PRMSlotChain< GUM_SCALAR >::PRMSlotChain(), gum::prm::PRMClassElement< GUM_SCALAR >::cast(), and gum::prm::decomposePath().
|
virtual |
Set the input flag value of id at b.
PRMAttribute or PRMAggregate can either be input, output, both or internal nodes.
By defaut, attributes and aggregates are inner nodes.
| elt | A PRMClassElement<GUM_SCALAR>. |
| b | The flag value. |
| NotFound | Raised if id does'nt match any PRMClassElement<GUM_SCALAR> in this. |
| WrongClassElement | Raised if NodeId is neither an PRMAttribute nor an PRMAggregate. |
Definition at line 98 of file PRMClassElementContainer_tpl.h.
References exists(), GUM_ERROR, gum::prm::PRMClassElement< GUM_SCALAR >::isAggregate(), gum::prm::PRMClassElement< GUM_SCALAR >::isAttribute(), gum::prm::PRMObject::name(), and gum::prm::PRMClassElement< GUM_SCALAR >::safeName().
Referenced by gum::prm::PRMClass< GUM_SCALAR >::addArc().
|
protectedvirtual |
Defines the IO flags of a PRMClassElement<GUM_SCALAR>.
| elt | The PRMClassElement<GUM_SCALAR>. |
| flags | The IO flags of elt. Overwrite any existing flags. |
| NotFound | Raised if elt does not have any IO flags. |
Definition at line 169 of file PRMClassElementContainer_tpl.h.
References _IOFlags_, and gum::prm::PRMClassElement< GUM_SCALAR >::safeName().
Referenced by gum::prm::PRMClass< GUM_SCALAR >::_addIOInterfaceFlags_(), copyIOFlags_(), and setOutputNode().
|
virtual |
Set the output flag value of id at b.
PRMAttribute or PRMAggregate can either be input, output, both or internal nodes.
By defaut, attributes and aggregates are inner nodes.
| elt | A PRMClassElement<GUM_SCALAR>. |
| b | The flag value. |
| NotFound | Raised if id does'nt match any PRMClassElement<GUM_SCALAR> in this. |
| WrongClassElement | Raised if NodeId is neither an PRMAttribute nor an PRMAggregate. |
Definition at line 114 of file PRMClassElementContainer_tpl.h.
References exists(), getIOFlag_(), GUM_ERROR, gum::prm::PRMClassElement< GUM_SCALAR >::isAggregate(), gum::prm::PRMClassElement< GUM_SCALAR >::isAttribute(), gum::prm::PRMObject::name(), gum::prm::PRMClassElement< GUM_SCALAR >::safeName(), setIOFlag_(), and updateDescendants_().
Referenced by gum::prm::PRMFactory< GUM_SCALAR >::_buildSlotChain_().
|
protectedpure virtual |
When a PRMClassElement<GUM_SCALAR> becomes an Output node we must update any the IO flags of every descendant of this PRMClassElementContainer. Note that after its declaration, input flags can not be changed and output flags can only become true.
| elt | A PRMClassElement<GUM_SCALAR>. |
Implemented in gum::prm::PRMClass< GUM_SCALAR >, gum::prm::PRMClass< double >, and gum::prm::PRMInterface< GUM_SCALAR >.
Referenced by setOutputNode().
|
friend |
Definition at line 81 of file PRMClassElementContainer.h.
References gum::prm::PRMObject::name(), and PRMClassElementContainterConstIterator.
Referenced by PRMClassElementContainterConstIterator.
|
friend |
Definition at line 80 of file PRMClassElementContainer.h.
References PRMClassElementContainterIterator.
Referenced by PRMClassElementContainterIterator.
|
private |
input / output flags, useful when inheriting or copying.
Definition at line 451 of file PRMClassElementContainer.h.
Referenced by copyIOFlags_(), getIOFlag_(), getIOFlag_(), and setIOFlag_().
|
privateinherited |
Definition at line 211 of file PRMObject.h.
Referenced by PRMObject(), PRMObject(), PRMObject(), name(), name(), operator!=(), operator=(), operator=(), and operator==().