aGrUM  0.20.3
a C++ library for (probabilistic) graphical models
gum::prm::PRMInterface< GUM_SCALAR > Class Template Reference

An PRMInterface is implemented by a Class<GUM_SCALAR> and defines a set of PRMReferenceSlot<GUM_SCALAR> and PRMAttribute<GUM_SCALAR> which the implementing Class<GUM_SCALAR> must contain. More...

#include <PRMClass.h>

+ Inheritance diagram for gum::prm::PRMInterface< GUM_SCALAR >:
+ Collaboration diagram for gum::prm::PRMInterface< GUM_SCALAR >:

Public Member Functions

Constructor & destructor.
 PRMInterface (const std::string &name)
 Default constructor. More...
 
 PRMInterface (const std::string &name, PRMInterface< GUM_SCALAR > &super, bool delayInheritance=false)
 Constructor for building a subclass of super. More...
 
 PRMInterface (const PRMInterface< GUM_SCALAR > &source)
 Copy constructor. More...
 
virtual ~PRMInterface ()
 Destructor. More...
 
Graphical model getters and setters
virtual PRMObject::prm_type obj_type () const
 Implementation of pure virtual method of PRMObject. More...
 
virtual PRMClassElement< GUM_SCALAR > & get (NodeId id)
 See gum::prm::PRMClassElementContainer<GUM_SCALAR>::get(NodeId). More...
 
virtual const PRMClassElement< GUM_SCALAR > & get (NodeId id) const
 Se gum::prm::PRMClassElementContainer<GUM_SCALAR>::get(NodeId). More...
 
void addArc (const std::string &tail, const std::string &head)
 An Interfance doesn't have any arc, this will raise an OperationNotAllowed exception. More...
 
PRMClassElement<GUM_SCALAR> getters and setters
virtual bool isOutputNode (const PRMClassElement< GUM_SCALAR > &elt) const
 See gum::prm::PRMClassElementContainer<GUM_SCALAR>::get(const std::string&). More...
 
virtual PRMClassElement< GUM_SCALAR > & get (const std::string &name)
 See gum::prm::PRMClassElementContainer<GUM_SCALAR>::get(const std::string&). More...
 
virtual const PRMClassElement< GUM_SCALAR > & get (const std::string &name) const
 See gum::prm::PRMClassElementContainer<GUM_SCALAR>::get(const std::string&). More...
 
const Set< PRMAttribute< GUM_SCALAR > *> & attributes () const
 Returns the set of PRMAttribute<GUM_SCALAR> of this Class<GUM_SCALAR>. More...
 
const Set< PRMReferenceSlot< GUM_SCALAR > *> & referenceSlots () const
 Returns the set of PRMAggregate of this Class<GUM_SCALAR>. More...
 
NodeId add (PRMClassElement< GUM_SCALAR > *elt)
 See gum::prm::PRMClassElementContainer<GUM_SCALAR>::add(PRMClassElement<GUM_SCALAR>*). More...
 
NodeId overload (PRMClassElement< GUM_SCALAR > *elt)
 Add a new PRMClassElement<GUM_SCALAR> which overload an inherited PRMClassElement<GUM_SCALAR>. More...
 
Inheritance methods
virtual bool isSubTypeOf (const PRMClassElementContainer< GUM_SCALAR > &cec) const
 Test if this PRMInterface is a sub PRMInterface of cec. More...
 
PRMInterface< GUM_SCALAR > & super ()
 Returns the superInterface of this PRMInterface. More...
 
const PRMInterface< GUM_SCALAR > & super () const
 Returns the superInterface of this PRMInterface. More...
 
Set< PRMClass< GUM_SCALAR > *> & implementations ()
 Returns the set of Class<GUM_SCALAR> implementing this PRMInterface. More...
 
const Set< PRMClass< GUM_SCALAR > *> & implementations () const
 Returns the set of Class<GUM_SCALAR> implementing this PRMInterface. More...
 
void inheritInterface ()
 Inherits from this interface super interface, this should only be done when this inteface inheritance was delayed. More...
 
Getters & setters operators
PRMClassElement< GUM_SCALAR > & operator[] (NodeId id)
 See gum::prm::PRMClassElementContainer<GUM_SCALAR>::operator[](NodeId). More...
 
const PRMClassElement< GUM_SCALAR > & operator[] (NodeId id) const
 See gum::prm::PRMClassElementContainer<GUM_SCALAR>::operator[](NodeId). More...
 
PRMClassElement< GUM_SCALAR > & operator[] (const std::string &name)
 See gum::prm::PRMClassElementContainer<GUM_SCALAR>::operator[](const std::string&). More...
 
const PRMClassElement< GUM_SCALAR > & operator[] (const std::string &name) const
 See gum::prm::PRMClassElementContainer<GUM_SCALAR>::operator[](const std::string&). More...
 
Getters on the gum::PRMClassElement<GUM_SCALAR>.
virtual bool belongsTo (const PRMClassElement< GUM_SCALAR > &elt) const
 Returns true if elt belongs to this PRMClassElementContainer. More...
 
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. More...
 
virtual bool isInputNode (const PRMClassElement< GUM_SCALAR > &elt) const
 Returns true if the node is an input node. More...
 
virtual void setInputNode (const PRMClassElement< GUM_SCALAR > &elt, bool b)
 Set the input flag value of id at b. More...
 
virtual void setOutputNode (const PRMClassElement< GUM_SCALAR > &elt, bool b)
 Set the output flag value of id at b. More...
 
virtual bool isInnerNode (const PRMClassElement< GUM_SCALAR > &elt) const
 Returns true if the node is an inner node. More...
 
Graphical operator
virtual bool exists (NodeId id) const
 Returns true if a member with the given id exists in this PRMClassElementContainer or in the PRMClassElementContainer hierarchy. More...
 
virtual const DAGcontainerDag () const
 Returns the gum::DAG of this PRMClassElementContainer. More...
 
Inheritance getters and setters
virtual bool isSuperTypeOf (const PRMClassElementContainer< GUM_SCALAR > &cec) const
 Test if this PRMClassElementContainer is a super type of cec. More...
 
Getters & setters.
const std::string & name () const
 Returns the name of this object. More...
 
void name (const std::string &name)
 Change the name of the PRM Object. More...
 
Operators
bool operator== (const PRMObject &obj) const
 To PRMObject are equal if they have the same name (which is unique). More...
 
bool operator!= (const PRMObject &obj) const
 To PRMObject are equal if they have the same name (which is unique). More...
 

Protected Member Functions

const DAGdag_ () const
 Returns a constant reference over this PRMInterface's DAG. More...
 
DAGdag_ ()
 Returns a non constant reference over this PRMInterface's DAG. More...
 
void findAllSubtypes_ (Set< PRMClassElementContainer< GUM_SCALAR > * > &set)
 Fills set with all the subtypes of this PRMInterface, this includes extensions and implementations. More...
 
void updateDescendants_ (const PRMClassElement< GUM_SCALAR > &elt)
 See gum::prm::PRMClassElementContainer<GUM_SCALAR>(const PRMClassElement<GUM_SCALAR>&). More...
 
virtual std::pair< bool, bool > & getIOFlag_ (const PRMClassElement< GUM_SCALAR > &elt)
 Returns the IO flags of a PRMClassElement<GUM_SCALAR>. More...
 
virtual const std::pair< bool, bool > & getIOFlag_ (const PRMClassElement< GUM_SCALAR > &elt) const
 Returns the IO flags of a PRMClassElement<GUM_SCALAR>. More...
 
virtual void setIOFlag_ (const PRMClassElement< GUM_SCALAR > &elt, const std::pair< bool, bool > &flags)
 Defines the IO flags of a PRMClassElement<GUM_SCALAR>. More...
 
virtual void copyIOFlags_ (const PRMClassElementContainer< GUM_SCALAR > &c)
 Copy the IO Flags of c in this PRMClassElementContainer. More...
 

Friends

class PRMClass< GUM_SCALAR >
 

Iterators

typedef NodeProperty< PRMClassElement< GUM_SCALAR > *>::iterator ClassEltIterator
 
typedef NodeProperty< PRMClassElement< GUM_SCALAR > *>::const_iterator const_ClassEltIterator
 
ClassEltIterator begin ()
 
const ClassEltIteratorend ()
 
const_ClassEltIterator begin () const
 
const const_ClassEltIteratorend () const
 

Inheritance members

PRMInterface< GUM_SCALAR > * _superInterface_
 The alternate PRMClassElementContainer<GUM_SCALAR> searched for elements defined in this. Note that this is first searched for gum::PRMClassElement<GUM_SCALAR>. More...
 
Set< PRMClass< GUM_SCALAR > *> _implementations_
 The set of Class<GUM_SCALAR> which implements this PRMInterface. More...
 
Set< PRMInterface< GUM_SCALAR > *> _extensions_
 The set of Class<GUM_SCALAR> which implements this PRMInterface. More...
 
void _addImplementation_ (PRMClass< GUM_SCALAR > *c)
 Add an Class<GUM_SCALAR> to the set of Class<GUM_SCALAR> which implements this PRMInterface. More...
 
void _addExtension_ (PRMInterface< GUM_SCALAR > *c)
 Add an Class<GUM_SCALAR> to the set of Class<GUM_SCALAR> which implements this PRMInterface. More...
 
bool _checkOverloadLegality_ (const PRMClassElement< GUM_SCALAR > *overloaded, const PRMClassElement< GUM_SCALAR > *overloader)
 The alternate PRMClassElementContainer<GUM_SCALAR> searched for elements defined in this. Note that this is first searched for gum::PRMClassElement<GUM_SCALAR>. More...
 
void _overloadAttribute_ (PRMAttribute< GUM_SCALAR > *overloader, PRMAttribute< GUM_SCALAR > *overloaded)
 The alternate PRMClassElementContainer<GUM_SCALAR> searched for elements defined in this. Note that this is first searched for gum::PRMClassElement<GUM_SCALAR>. More...
 
void _overloadReferenceSlot_ (PRMReferenceSlot< GUM_SCALAR > *overloader, PRMReferenceSlot< GUM_SCALAR > *overloaded)
 The alternate PRMClassElementContainer<GUM_SCALAR> searched for elements defined in this. Note that this is first searched for gum::PRMClassElement<GUM_SCALAR>. More...
 
void _addCastDescendants_ (PRMAttribute< GUM_SCALAR > *start, PRMAttribute< GUM_SCALAR > *end)
 The alternate PRMClassElementContainer<GUM_SCALAR> searched for elements defined in this. Note that this is first searched for gum::PRMClassElement<GUM_SCALAR>. More...
 

Built-in types.

enum  prm_type : char {
  prm_type::ALL, prm_type::CLASS, prm_type::PRM_INTERFACE, prm_type::CLASS_ELT,
  prm_type::TYPE, prm_type::SYSTEM, prm_type::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. More...
 
static std::string RIGHT_CAST ()
 Enumeration of the different types of objects handled by a PRM. More...
 
static std::string enum2str (prm_type type)
 Returns the string representation of a PRMObject. More...
 
static INLINE bool isClass (const PRMObject &obj)
 Returns true if obj_ptr is of type Class. More...
 
static INLINE bool isInterface (const PRMObject &obj)
 Returns true if obj_ptr is of type PRMInterface. More...
 
static INLINE bool isInstance (const PRMObject &obj)
 Returns true if obj_ptr is of type PRMInstance. More...
 

Detailed Description

template<typename GUM_SCALAR>
class gum::prm::PRMInterface< GUM_SCALAR >

An PRMInterface is implemented by a Class<GUM_SCALAR> and defines a set of PRMReferenceSlot<GUM_SCALAR> and PRMAttribute<GUM_SCALAR> which the implementing Class<GUM_SCALAR> must contain.

See also
PRM Class<GUM_SCALAR> PRMClassElement<GUM_SCALAR>

Definition at line 53 of file PRMClass.h.

Member Typedef Documentation

◆ ClassEltIterator

template<typename GUM_SCALAR>
typedef NodeProperty< PRMClassElement< GUM_SCALAR >* >::iterator gum::prm::PRMInterface< GUM_SCALAR >::ClassEltIterator

Definition at line 280 of file PRMInterface.h.

◆ const_ClassEltIterator

template<typename GUM_SCALAR>
typedef NodeProperty< PRMClassElement< GUM_SCALAR >* >::const_iterator gum::prm::PRMInterface< GUM_SCALAR >::const_ClassEltIterator

Definition at line 285 of file PRMInterface.h.

Member Enumeration Documentation

◆ prm_type

enum gum::prm::PRMObject::prm_type : char
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 68 of file PRMObject.h.

68  : char
69  {
70  ALL,
71  CLASS,
72  PRM_INTERFACE,
73  CLASS_ELT,
74  TYPE,
75  SYSTEM,
76  INSTANCE
77  };

Constructor & Destructor Documentation

◆ PRMInterface() [1/3]

template<typename GUM_SCALAR >
gum::prm::PRMInterface< GUM_SCALAR >::PRMInterface ( const std::string &  name)
explicit

Default constructor.

Parameters
nameThe interface name.

Definition at line 36 of file PRMInterface_tpl.h.

36  :
37  PRMClassElementContainer< GUM_SCALAR >(name), _superInterface_(0) {
38  GUM_CONSTRUCTOR(PRMInterface);
39  }
PRMInterface< GUM_SCALAR > * _superInterface_
The alternate PRMClassElementContainer<GUM_SCALAR> searched for elements defined in this...
Definition: PRMInterface.h:352
const std::string & name() const
Returns the name of this object.
Definition: PRMObject_inl.h:34
PRMInterface(const std::string &name)
Default constructor.

◆ PRMInterface() [2/3]

template<typename GUM_SCALAR>
gum::prm::PRMInterface< GUM_SCALAR >::PRMInterface ( const std::string &  name,
PRMInterface< GUM_SCALAR > &  super,
bool  delayInheritance = false 
)

Constructor for building a subclass of super.

Parameters
nameThe sub-interface name.
superThe super PRMInterface of this.
delayInheritanceIf true, inheritance will be delayed.

Definition at line 42 of file PRMInterface_tpl.h.

44  :
45  PRMClassElementContainer< GUM_SCALAR >(name),
47  GUM_CONSTRUCTOR(PRMInterface);
48  if (!delayInheritance) { _inheritInterface_(super); }
49  }
PRMInterface< GUM_SCALAR > * _superInterface_
The alternate PRMClassElementContainer<GUM_SCALAR> searched for elements defined in this...
Definition: PRMInterface.h:352
void _inheritInterface_(const PRMInterface< GUM_SCALAR > &i)
Proceed with the copy of i in this.
const std::string & name() const
Returns the name of this object.
Definition: PRMObject_inl.h:34
PRMInterface(const std::string &name)
Default constructor.
PRMInterface< GUM_SCALAR > & super()
Returns the superInterface of this PRMInterface.

◆ PRMInterface() [3/3]

template<typename GUM_SCALAR>
gum::prm::PRMInterface< GUM_SCALAR >::PRMInterface ( const PRMInterface< GUM_SCALAR > &  source)

Copy constructor.

Definition at line 52 of file PRMInterface_tpl.h.

52  :
53  PRMClassElementContainer< GUM_SCALAR >(source.name()), _dag_(source._dag_),
54  _superInterface_(source._superInterface_) {
55  GUM_CONS_CPY(PRMInterface);
56  GUM_ERROR(FatalError, "don't copy an interface")
57  }
PRMInterface< GUM_SCALAR > * _superInterface_
The alternate PRMClassElementContainer<GUM_SCALAR> searched for elements defined in this...
Definition: PRMInterface.h:352
PRMInterface(const std::string &name)
Default constructor.
DAG _dag_
The dag representing dependencies between formal attributes and slots.
Definition: PRMInterface.h:320
#define GUM_ERROR(type, msg)
Definition: exceptions.h:51

◆ ~PRMInterface()

template<typename GUM_SCALAR >
gum::prm::PRMInterface< GUM_SCALAR >::~PRMInterface ( )
virtual

Destructor.

Definition at line 60 of file PRMInterface_tpl.h.

60  {
61  GUM_DESTRUCTOR(PRMInterface);
62 
63  for (const auto& elt: _nodeIdMap_) {
64  delete elt.second;
65  }
66  }
NodeProperty< PRMClassElement< GUM_SCALAR > *> _nodeIdMap_
Mapping between node&#39;s id and their name (being an attribute or a slot). Used for fast access to a me...
Definition: PRMInterface.h:324
PRMInterface(const std::string &name)
Default constructor.

Member Function Documentation

◆ _addCastDescendants_()

template<typename GUM_SCALAR>
void gum::prm::PRMInterface< GUM_SCALAR >::_addCastDescendants_ ( PRMAttribute< GUM_SCALAR > *  start,
PRMAttribute< GUM_SCALAR > *  end 
)
private

The alternate PRMClassElementContainer<GUM_SCALAR> searched for elements defined in this. Note that this is first searched for gum::PRMClassElement<GUM_SCALAR>.

Definition at line 232 of file PRMInterface_tpl.h.

233  {
234  PRMAttribute< GUM_SCALAR >* parent = start;
235  PRMAttribute< GUM_SCALAR >* child = nullptr;
236 
237  while (parent->type().superType() != end->type()) {
238  child = parent->getCastDescendant();
239  child->setId(nextNodeId());
240  _dag_.addNodeWithId(child->id());
241  _nodeIdMap_.insert(child->id(), child);
242  // Only use child's safe name when adding to the name map!
243  _nameMap_.insert(child->safeName(), child);
244  _attributes_.insert(child);
245  // Do ! use Class<GUM_SCALAR>::insertArc(), child's CPF is already
246  // initialized properly
247  parent = child;
248  }
249 
250  parent->setAsCastDescendant(end);
251  }
virtual void addNodeWithId(const NodeId id)
try to insert a node with the given id
NodeProperty< PRMClassElement< GUM_SCALAR > *> _nodeIdMap_
Mapping between node&#39;s id and their name (being an attribute or a slot). Used for fast access to a me...
Definition: PRMInterface.h:324
HashTable< std::string, PRMClassElement< GUM_SCALAR > *> _nameMap_
Mapping between a member&#39;s name and itself. Used for fast access to a member given it&#39;s name...
Definition: PRMInterface.h:334
DAG _dag_
The dag representing dependencies between formal attributes and slots.
Definition: PRMInterface.h:320
NodeId nextNodeId()
Returns the next value of an unique counter for PRM&#39;s node id.
Definition: utils_prm.cpp:64
const ClassEltIterator & end()
Set< PRMAttribute< GUM_SCALAR > *> _attributes_
The sequence of PRMAttribute<GUM_SCALAR>s.
Definition: PRMInterface.h:337

◆ _addExtension_()

template<typename GUM_SCALAR>
INLINE void gum::prm::PRMInterface< GUM_SCALAR >::_addExtension_ ( PRMInterface< GUM_SCALAR > *  c)
private

Add an Class<GUM_SCALAR> to the set of Class<GUM_SCALAR> which implements this PRMInterface.

Definition at line 363 of file PRMInterface_tpl.h.

363  {
364  _extensions_.insert(i);
365  }
Set< PRMInterface< GUM_SCALAR > *> _extensions_
The set of Class<GUM_SCALAR> which implements this PRMInterface.
Definition: PRMInterface.h:363

◆ _addImplementation_()

template<typename GUM_SCALAR>
INLINE void gum::prm::PRMInterface< GUM_SCALAR >::_addImplementation_ ( PRMClass< GUM_SCALAR > *  c)
private

Add an Class<GUM_SCALAR> to the set of Class<GUM_SCALAR> which implements this PRMInterface.

Definition at line 358 of file PRMInterface_tpl.h.

358  {
359  _implementations_.insert(c);
360  }
Set< PRMClass< GUM_SCALAR > *> _implementations_
The set of Class<GUM_SCALAR> which implements this PRMInterface.
Definition: PRMInterface.h:355

◆ _checkOverloadLegality_()

template<typename GUM_SCALAR>
bool gum::prm::PRMInterface< GUM_SCALAR >::_checkOverloadLegality_ ( const PRMClassElement< GUM_SCALAR > *  overloaded,
const PRMClassElement< GUM_SCALAR > *  overloader 
)
private

The alternate PRMClassElementContainer<GUM_SCALAR> searched for elements defined in this. Note that this is first searched for gum::PRMClassElement<GUM_SCALAR>.

Definition at line 254 of file PRMInterface_tpl.h.

256  {
257  if (overloaded->elt_type() != overloader->elt_type()) { return false; }
258 
259  if (overloaded->elt_type() == PRMClassElement< GUM_SCALAR >::prm_attribute) {
260  if (!overloader->type().isSubTypeOf(overloaded->type())) { return false; }
261  } else if (overloaded->elt_type() == PRMClassElement< GUM_SCALAR >::prm_refslot) {
262  auto ref_overloader = static_cast< const PRMReferenceSlot< GUM_SCALAR >* >(overloader);
263  auto ref_overloaded = static_cast< const PRMReferenceSlot< GUM_SCALAR >* >(overloaded);
264  if (!ref_overloader->slotType().isSubTypeOf(ref_overloaded->slotType())) { return false; }
265  } else {
266  return false;
267  }
268  return true;
269  }

◆ _inheritInterface_()

template<typename GUM_SCALAR>
void gum::prm::PRMInterface< GUM_SCALAR >::_inheritInterface_ ( const PRMInterface< GUM_SCALAR > &  i)
private

Proceed with the copy of i in this.

Definition at line 74 of file PRMInterface_tpl.h.

74  {
75  // Copying attributes
76  for (const auto i_attr: i._attributes_) {
77  auto attr = new PRMScalarAttribute< GUM_SCALAR >(i_attr->name(), i_attr->type());
78  attr->setId(i_attr->id());
79  _nodeIdMap_.insert(attr->id(), attr);
80  _attributes_.insert(attr);
81 
82  if (i._nameMap_[i_attr->name()] == i._nameMap_[i_attr->safeName()]) {
83  _nameMap_.insert(attr->name(), attr);
84  }
85 
86  _nameMap_.insert(attr->safeName(), attr);
87  _dag_.addNodeWithId(attr->id());
88  }
89 
90  // Copying reference slots
91  for (const auto i_ref: i._referenceSlots_) {
92  auto ref = new PRMReferenceSlot< GUM_SCALAR >(
93  i_ref->name(),
94  const_cast< PRMClassElementContainer< GUM_SCALAR >& >(i_ref->slotType()),
95  i_ref->isArray());
96 
97  ref->setId(i_ref->id());
98  _nodeIdMap_.insert(ref->id(), ref);
99  _referenceSlots_.insert(ref);
100 
101  if (i._nameMap_.exists(ref->name())) { _nameMap_.insert(ref->name(), ref); }
102 
103  _nameMap_.insert(ref->safeName(), ref);
104  _dag_.addNodeWithId(ref->id());
105  }
106  }
virtual void addNodeWithId(const NodeId id)
try to insert a node with the given id
Set< PRMReferenceSlot< GUM_SCALAR > *> _referenceSlots_
The sequence of PRMReferenceSlot<GUM_SCALAR>.
Definition: PRMInterface.h:340
NodeProperty< PRMClassElement< GUM_SCALAR > *> _nodeIdMap_
Mapping between node&#39;s id and their name (being an attribute or a slot). Used for fast access to a me...
Definition: PRMInterface.h:324
HashTable< std::string, PRMClassElement< GUM_SCALAR > *> _nameMap_
Mapping between a member&#39;s name and itself. Used for fast access to a member given it&#39;s name...
Definition: PRMInterface.h:334
DAG _dag_
The dag representing dependencies between formal attributes and slots.
Definition: PRMInterface.h:320
Set< PRMAttribute< GUM_SCALAR > *> _attributes_
The sequence of PRMAttribute<GUM_SCALAR>s.
Definition: PRMInterface.h:337

◆ _overloadAttribute_()

template<typename GUM_SCALAR>
void gum::prm::PRMInterface< GUM_SCALAR >::_overloadAttribute_ ( PRMAttribute< GUM_SCALAR > *  overloader,
PRMAttribute< GUM_SCALAR > *  overloaded 
)
private

The alternate PRMClassElementContainer<GUM_SCALAR> searched for elements defined in this. Note that this is first searched for gum::PRMClassElement<GUM_SCALAR>.

Definition at line 190 of file PRMInterface_tpl.h.

191  {
192  if (overloader->type() != overloaded->type()) {
193  overloader->setId(nextNodeId());
194  _dag_.addNodeWithId(overloader->id());
195  _nodeIdMap_.insert(overloader->id(), overloader);
196  _nameMap_[overloader->name()] = overloader;
197  _nameMap_.insert(overloader->safeName(), overloader);
198  _attributes_.insert(overloader);
199  _addCastDescendants_(overloader, overloaded);
200  } else {
201  overloader->setId(overloaded->id());
202  _nodeIdMap_[overloader->id()] = overloader;
203  _nameMap_[overloader->name()] = overloader;
204  _nameMap_[overloader->safeName()] = overloader;
205  _attributes_.erase(overloaded);
206  _attributes_.insert(overloader);
207  // Swapping types, ugly but necessary to preserve the
208  // PRMType<GUM_SCALAR>
209  // pointer of overloaded
210  overloader->overload(overloaded);
211  delete overloaded;
212  }
213  }
virtual void addNodeWithId(const NodeId id)
try to insert a node with the given id
NodeProperty< PRMClassElement< GUM_SCALAR > *> _nodeIdMap_
Mapping between node&#39;s id and their name (being an attribute or a slot). Used for fast access to a me...
Definition: PRMInterface.h:324
void _addCastDescendants_(PRMAttribute< GUM_SCALAR > *start, PRMAttribute< GUM_SCALAR > *end)
The alternate PRMClassElementContainer<GUM_SCALAR> searched for elements defined in this...
HashTable< std::string, PRMClassElement< GUM_SCALAR > *> _nameMap_
Mapping between a member&#39;s name and itself. Used for fast access to a member given it&#39;s name...
Definition: PRMInterface.h:334
DAG _dag_
The dag representing dependencies between formal attributes and slots.
Definition: PRMInterface.h:320
NodeId nextNodeId()
Returns the next value of an unique counter for PRM&#39;s node id.
Definition: utils_prm.cpp:64
Set< PRMAttribute< GUM_SCALAR > *> _attributes_
The sequence of PRMAttribute<GUM_SCALAR>s.
Definition: PRMInterface.h:337

◆ _overloadReferenceSlot_()

template<typename GUM_SCALAR>
void gum::prm::PRMInterface< GUM_SCALAR >::_overloadReferenceSlot_ ( PRMReferenceSlot< GUM_SCALAR > *  overloader,
PRMReferenceSlot< GUM_SCALAR > *  overloaded 
)
private

The alternate PRMClassElementContainer<GUM_SCALAR> searched for elements defined in this. Note that this is first searched for gum::PRMClassElement<GUM_SCALAR>.

Definition at line 216 of file PRMInterface_tpl.h.

218  {
219  // Adding overloading reference
220  overloader->setId(overloaded->id());
221  _nodeIdMap_[overloader->id()] = overloader;
222  _nameMap_[overloader->name()] = overloader;
223  _nameMap_.insert(overloader->safeName(), overloader);
224  _referenceSlots_.insert(overloader);
225  // Removing overloaded PRMReferenceSlot<GUM_SCALAR>
226  _referenceSlots_.erase(overloaded);
227  _nameMap_.erase(overloaded->safeName());
228  delete overloaded;
229  }
Set< PRMReferenceSlot< GUM_SCALAR > *> _referenceSlots_
The sequence of PRMReferenceSlot<GUM_SCALAR>.
Definition: PRMInterface.h:340
NodeProperty< PRMClassElement< GUM_SCALAR > *> _nodeIdMap_
Mapping between node&#39;s id and their name (being an attribute or a slot). Used for fast access to a me...
Definition: PRMInterface.h:324
HashTable< std::string, PRMClassElement< GUM_SCALAR > *> _nameMap_
Mapping between a member&#39;s name and itself. Used for fast access to a member given it&#39;s name...
Definition: PRMInterface.h:334

◆ add()

template<typename GUM_SCALAR>
NodeId gum::prm::PRMInterface< GUM_SCALAR >::add ( PRMClassElement< GUM_SCALAR > *  elt)
virtual

See gum::prm::PRMClassElementContainer<GUM_SCALAR>::add(PRMClassElement<GUM_SCALAR>*).

Implements gum::prm::PRMClassElementContainer< GUM_SCALAR >.

Definition at line 109 of file PRMInterface_tpl.h.

109  {
110  if (_nameMap_.exists(elt->name())) {
111  GUM_ERROR(DuplicateElement,
112  "name '" << elt->name() << "' is already used by another ClassElement");
113  }
114 
116  PRMAttribute< GUM_SCALAR >* attr = static_cast< PRMAttribute< GUM_SCALAR >* >(elt);
117  _nameMap_.insert(attr->name(), attr);
118 
119  while (true) {
120  attr->setId(nextNodeId());
121  _dag_.addNodeWithId(attr->id());
122  _nodeIdMap_.insert(attr->id(), attr);
123  _nameMap_.insert(attr->safeName(), attr);
124  _attributes_.insert(attr);
125 
126  if (attr->type().isSubType()) {
127  attr = attr->getCastDescendant();
128  } else {
129  break;
130  }
131  }
133  elt->setId(nextNodeId());
134  _dag_.addNodeWithId(elt->id());
135  _nodeIdMap_.insert(elt->id(), elt);
136  _referenceSlots_.insert(static_cast< PRMReferenceSlot< GUM_SCALAR >* >(elt));
137  _nameMap_.insert(elt->name(), elt);
138  _nameMap_.insert(elt->safeName(), elt);
139  } else {
140  GUM_ERROR(WrongClassElement, "illegal ClassElement<GUM_SCALAR> for an Interface")
141  }
142 
143  return elt->id();
144  }
virtual void addNodeWithId(const NodeId id)
try to insert a node with the given id
static INLINE bool isAttribute(const PRMClassElement< GUM_SCALAR > &elt)
Returns true if obj_ptr is of type PRMAttribute.
Set< PRMReferenceSlot< GUM_SCALAR > *> _referenceSlots_
The sequence of PRMReferenceSlot<GUM_SCALAR>.
Definition: PRMInterface.h:340
NodeProperty< PRMClassElement< GUM_SCALAR > *> _nodeIdMap_
Mapping between node&#39;s id and their name (being an attribute or a slot). Used for fast access to a me...
Definition: PRMInterface.h:324
static INLINE bool isReferenceSlot(const PRMClassElement< GUM_SCALAR > &elt)
Returns true if obj_ptr is of type PRMReferenceSlot.
HashTable< std::string, PRMClassElement< GUM_SCALAR > *> _nameMap_
Mapping between a member&#39;s name and itself. Used for fast access to a member given it&#39;s name...
Definition: PRMInterface.h:334
DAG _dag_
The dag representing dependencies between formal attributes and slots.
Definition: PRMInterface.h:320
NodeId nextNodeId()
Returns the next value of an unique counter for PRM&#39;s node id.
Definition: utils_prm.cpp:64
Set< PRMAttribute< GUM_SCALAR > *> _attributes_
The sequence of PRMAttribute<GUM_SCALAR>s.
Definition: PRMInterface.h:337
#define GUM_ERROR(type, msg)
Definition: exceptions.h:51

◆ addArc()

template<typename GUM_SCALAR >
INLINE void gum::prm::PRMInterface< GUM_SCALAR >::addArc ( const std::string &  tail,
const std::string &  head 
)
virtual

An Interfance doesn't have any arc, this will raise an OperationNotAllowed exception.

Parameters
tailThe tail of the added arc.
headThe head of the added arc.
Exceptions
OperationNotAllowedSystematically throws an OperationNotAllowed.

Implements gum::prm::PRMClassElementContainer< GUM_SCALAR >.

Definition at line 336 of file PRMInterface_tpl.h.

337  {
338  GUM_ERROR(OperationNotAllowed, "an Interface does ! have arcs")
339  }
#define GUM_ERROR(type, msg)
Definition: exceptions.h:51

◆ attributes()

template<typename GUM_SCALAR >
INLINE const Set< PRMAttribute< GUM_SCALAR > *> & gum::prm::PRMInterface< GUM_SCALAR >::attributes ( ) const

Returns the set of PRMAttribute<GUM_SCALAR> of this Class<GUM_SCALAR>.

Returns
Returns the set of PRMAttribute<GUM_SCALAR> of this Class<GUM_SCALAR>.

Definition at line 440 of file PRMInterface_tpl.h.

440  {
441  return _attributes_;
442  }
Set< PRMAttribute< GUM_SCALAR > *> _attributes_
The sequence of PRMAttribute<GUM_SCALAR>s.
Definition: PRMInterface.h:337

◆ begin() [1/2]

template<typename GUM_SCALAR >
INLINE PRMInterface< GUM_SCALAR >::ClassEltIterator gum::prm::PRMInterface< GUM_SCALAR >::begin ( )

Definition at line 313 of file PRMInterface_tpl.h.

313  {
314  return _nodeIdMap_.begin();
315  }
NodeProperty< PRMClassElement< GUM_SCALAR > *> _nodeIdMap_
Mapping between node&#39;s id and their name (being an attribute or a slot). Used for fast access to a me...
Definition: PRMInterface.h:324

◆ begin() [2/2]

template<typename GUM_SCALAR >
INLINE PRMInterface< GUM_SCALAR >::const_ClassEltIterator gum::prm::PRMInterface< GUM_SCALAR >::begin ( ) const

Definition at line 325 of file PRMInterface_tpl.h.

325  {
326  return _nodeIdMap_.begin();
327  }
NodeProperty< PRMClassElement< GUM_SCALAR > *> _nodeIdMap_
Mapping between node&#39;s id and their name (being an attribute or a slot). Used for fast access to a me...
Definition: PRMInterface.h:324

◆ belongsTo()

template<typename GUM_SCALAR>
INLINE bool gum::prm::PRMClassElementContainer< GUM_SCALAR >::belongsTo ( const PRMClassElement< GUM_SCALAR > &  elt) const
virtualinherited

Returns true if elt belongs to this PRMClassElementContainer.

Parameters
eltA PRMClassElement<GUM_SCALAR>.
Returns
true if elt beglons to this PRMClassElementContainer.

Definition at line 170 of file PRMClassElementContainer_tpl.h.

171  {
172  try {
173  return &elt == &(get(elt.safeName()));
174  } catch (NotFound&) { return false; }
175  }

◆ containerDag()

template<typename GUM_SCALAR >
INLINE const DAG & gum::prm::PRMClassElementContainer< GUM_SCALAR >::containerDag ( ) const
virtualinherited

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.

Returns
the DAG of this PRMClassElementContainer.

Definition at line 178 of file PRMClassElementContainer_tpl.h.

178  {
179  return dag_();
180  }
virtual const DAG & dag_() const =0

◆ copyIOFlags_()

template<typename GUM_SCALAR>
void gum::prm::PRMClassElementContainer< GUM_SCALAR >::copyIOFlags_ ( const PRMClassElementContainer< GUM_SCALAR > &  c)
protectedvirtualinherited

Copy the IO Flags of c in this PRMClassElementContainer.

Parameters
cA PRMClassElementContainer.

Definition at line 36 of file PRMClassElementContainer_tpl.h.

37  {
38  for (const auto& flag: c._IOFlags_)
39  setIOFlag_(get(flag.first), flag.second);
40  }
virtual void setIOFlag_(const PRMClassElement< GUM_SCALAR > &elt, const std::pair< bool, bool > &flags)
Defines the IO flags of a PRMClassElement<GUM_SCALAR>.

◆ dag_() [1/2]

template<typename GUM_SCALAR >
INLINE const DAG & gum::prm::PRMInterface< GUM_SCALAR >::dag_ ( ) const
protectedvirtual

Returns a constant reference over this PRMInterface's DAG.

Implements gum::prm::PRMClassElementContainer< GUM_SCALAR >.

Definition at line 396 of file PRMInterface_tpl.h.

396  {
397  return _dag_;
398  }
DAG _dag_
The dag representing dependencies between formal attributes and slots.
Definition: PRMInterface.h:320

◆ dag_() [2/2]

template<typename GUM_SCALAR >
INLINE DAG & gum::prm::PRMInterface< GUM_SCALAR >::dag_ ( )
protectedvirtual

Returns a non constant reference over this PRMInterface's DAG.

Implements gum::prm::PRMClassElementContainer< GUM_SCALAR >.

Definition at line 401 of file PRMInterface_tpl.h.

401  {
402  return _dag_;
403  }
DAG _dag_
The dag representing dependencies between formal attributes and slots.
Definition: PRMInterface.h:320

◆ end() [1/2]

template<typename GUM_SCALAR >
INLINE const PRMInterface< GUM_SCALAR >::ClassEltIterator & gum::prm::PRMInterface< GUM_SCALAR >::end ( )

Definition at line 319 of file PRMInterface_tpl.h.

319  {
320  return _nodeIdMap_.end();
321  }
NodeProperty< PRMClassElement< GUM_SCALAR > *> _nodeIdMap_
Mapping between node&#39;s id and their name (being an attribute or a slot). Used for fast access to a me...
Definition: PRMInterface.h:324

◆ end() [2/2]

template<typename GUM_SCALAR >
INLINE const PRMInterface< GUM_SCALAR >::const_ClassEltIterator & gum::prm::PRMInterface< GUM_SCALAR >::end ( ) const

Definition at line 331 of file PRMInterface_tpl.h.

331  {
332  return _nodeIdMap_.end();
333  }
NodeProperty< PRMClassElement< GUM_SCALAR > *> _nodeIdMap_
Mapping between node&#39;s id and their name (being an attribute or a slot). Used for fast access to a me...
Definition: PRMInterface.h:324

◆ enum2str()

static std::string gum::prm::PRMObject::enum2str ( prm_type  type)
inlinestaticinherited

Returns the string representation of a PRMObject.

Definition at line 83 of file PRMObject.h.

83  {
84  switch (type) {
85  case prm_type::CLASS:
86  return "PRMType::CLASS";
87 
89  return "PRMType::CLASS_ELT";
90 
91  case prm_type::TYPE:
92  return "PRMType::TYPE";
93 
94  case prm_type::SYSTEM:
95  return "PRMType::SYSTEM";
96 
97  case prm_type::INSTANCE:
98  return "PRMType::INSTANCE";
99 
101  return "PRMType::PRM_INTERFACE";
102 
103  default:
104  return "unknown";
105  }
106  }

◆ exists() [1/2]

template<typename GUM_SCALAR >
INLINE bool gum::prm::PRMClassElementContainer< GUM_SCALAR >::exists ( const std::string &  name) const
virtualinherited

Returns true if a member with the given name exists in this PRMClassElementContainer or in the PRMClassElementContainer hierarchy.

Definition at line 162 of file PRMClassElementContainer_tpl.h.

162  {
163  try {
164  get(name);
165  return true;
166  } catch (NotFound&) { return false; }
167  }
const std::string & name() const
Returns the name of this object.
Definition: PRMObject_inl.h:34

◆ exists() [2/2]

template<typename GUM_SCALAR >
INLINE bool gum::prm::PRMClassElementContainer< GUM_SCALAR >::exists ( NodeId  id) const
virtualinherited

Returns true if a member with the given id exists in this PRMClassElementContainer or in the PRMClassElementContainer hierarchy.

Parameters
idA NodeId.
Returns
true if id matches a PRMClassElement<GUM_SCALAR>.

Definition at line 157 of file PRMClassElementContainer_tpl.h.

157  {
158  return containerDag().exists(id);
159  }
bool exists(const NodeId id) const
alias for existsNode
virtual const DAG & containerDag() const
Returns the gum::DAG of this PRMClassElementContainer.

◆ findAllSubtypes_()

template<typename GUM_SCALAR>
void gum::prm::PRMInterface< GUM_SCALAR >::findAllSubtypes_ ( Set< PRMClassElementContainer< GUM_SCALAR > * > &  set)
protectedvirtual

Fills set with all the subtypes of this PRMInterface, this includes extensions and implementations.

Implements gum::prm::PRMClassElementContainer< GUM_SCALAR >.

Definition at line 462 of file PRMInterface_tpl.h.

463  {
464  for (const auto impl: _implementations_) {
465  set.insert(impl);
466  impl->findAllSubtypes_(set);
467  }
468 
469  for (const auto ext: _extensions_) {
470  set.insert(ext);
471  ext->findAllSubtypes_(set);
472  }
473  }
Set< PRMClass< GUM_SCALAR > *> _implementations_
The set of Class<GUM_SCALAR> which implements this PRMInterface.
Definition: PRMInterface.h:355
Set< PRMInterface< GUM_SCALAR > *> _extensions_
The set of Class<GUM_SCALAR> which implements this PRMInterface.
Definition: PRMInterface.h:363

◆ get() [1/4]

template<typename GUM_SCALAR >
INLINE PRMClassElement< GUM_SCALAR > & gum::prm::PRMInterface< GUM_SCALAR >::get ( NodeId  id)
virtual

See gum::prm::PRMClassElementContainer<GUM_SCALAR>::get(NodeId).

Implements gum::prm::PRMClassElementContainer< GUM_SCALAR >.

Definition at line 406 of file PRMInterface_tpl.h.

406  {
407  try {
408  return *(_nodeIdMap_[id]);
409  } catch (NotFound&) {
410  GUM_ERROR(NotFound, "no ClassElement<GUM_SCALAR> with the given NodeId")
411  }
412  }
NodeProperty< PRMClassElement< GUM_SCALAR > *> _nodeIdMap_
Mapping between node&#39;s id and their name (being an attribute or a slot). Used for fast access to a me...
Definition: PRMInterface.h:324
#define GUM_ERROR(type, msg)
Definition: exceptions.h:51

◆ get() [2/4]

template<typename GUM_SCALAR >
INLINE const PRMClassElement< GUM_SCALAR > & gum::prm::PRMInterface< GUM_SCALAR >::get ( NodeId  id) const
virtual

Se gum::prm::PRMClassElementContainer<GUM_SCALAR>::get(NodeId).

Implements gum::prm::PRMClassElementContainer< GUM_SCALAR >.

Definition at line 415 of file PRMInterface_tpl.h.

415  {
416  try {
417  return *(_nodeIdMap_[id]);
418  } catch (NotFound&) {
419  GUM_ERROR(NotFound, "no ClassElement<GUM_SCALAR> with the given NodeId")
420  }
421  }
NodeProperty< PRMClassElement< GUM_SCALAR > *> _nodeIdMap_
Mapping between node&#39;s id and their name (being an attribute or a slot). Used for fast access to a me...
Definition: PRMInterface.h:324
#define GUM_ERROR(type, msg)
Definition: exceptions.h:51

◆ get() [3/4]

template<typename GUM_SCALAR >
INLINE PRMClassElement< GUM_SCALAR > & gum::prm::PRMInterface< GUM_SCALAR >::get ( const std::string &  name)
virtual

See gum::prm::PRMClassElementContainer<GUM_SCALAR>::get(const std::string&).

Implements gum::prm::PRMClassElementContainer< GUM_SCALAR >.

Definition at line 424 of file PRMInterface_tpl.h.

424  {
425  try {
426  return *(_nameMap_[name]);
427  } catch (NotFound&) { GUM_ERROR(NotFound, "no ClassElement<GUM_SCALAR> with the given name") }
428  }
const std::string & name() const
Returns the name of this object.
Definition: PRMObject_inl.h:34
HashTable< std::string, PRMClassElement< GUM_SCALAR > *> _nameMap_
Mapping between a member&#39;s name and itself. Used for fast access to a member given it&#39;s name...
Definition: PRMInterface.h:334
#define GUM_ERROR(type, msg)
Definition: exceptions.h:51

◆ get() [4/4]

template<typename GUM_SCALAR >
INLINE const PRMClassElement< GUM_SCALAR > & gum::prm::PRMInterface< GUM_SCALAR >::get ( const std::string &  name) const
virtual

See gum::prm::PRMClassElementContainer<GUM_SCALAR>::get(const std::string&).

Implements gum::prm::PRMClassElementContainer< GUM_SCALAR >.

Definition at line 432 of file PRMInterface_tpl.h.

432  {
433  try {
434  return *(_nameMap_[name]);
435  } catch (NotFound&) { GUM_ERROR(NotFound, "no ClassElement<GUM_SCALAR> with the given name") }
436  }
const std::string & name() const
Returns the name of this object.
Definition: PRMObject_inl.h:34
HashTable< std::string, PRMClassElement< GUM_SCALAR > *> _nameMap_
Mapping between a member&#39;s name and itself. Used for fast access to a member given it&#39;s name...
Definition: PRMInterface.h:334
#define GUM_ERROR(type, msg)
Definition: exceptions.h:51

◆ getIOFlag_() [1/2]

template<typename GUM_SCALAR>
INLINE std::pair< bool, bool > & gum::prm::PRMClassElementContainer< GUM_SCALAR >::getIOFlag_ ( const PRMClassElement< GUM_SCALAR > &  elt)
protectedvirtualinherited

Returns the IO flags of a PRMClassElement<GUM_SCALAR>.

Parameters
eltThe PRMClassElement<GUM_SCALAR>.
Returns
elt's IO flags.
Exceptions
NotFoundRaised if elt does not have any IO flags.

Definition at line 128 of file PRMClassElementContainer_tpl.h.

129  {
130  try {
131  return _IOFlags_[elt.safeName()];
132  } catch (NotFound&) {
133  GUM_ERROR(NotFound, "this ClassElement<GUM_SCALAR> does not have any IO flags")
134  }
135  }
HashTable< std::string, std::pair< bool, bool > > _IOFlags_
input / output flags, useful when inheriting or copying.
#define GUM_ERROR(type, msg)
Definition: exceptions.h:51

◆ getIOFlag_() [2/2]

template<typename GUM_SCALAR>
INLINE const std::pair< bool, bool > & gum::prm::PRMClassElementContainer< GUM_SCALAR >::getIOFlag_ ( const PRMClassElement< GUM_SCALAR > &  elt) const
protectedvirtualinherited

Returns the IO flags of a PRMClassElement<GUM_SCALAR>.

Parameters
eltThe PRMClassElement<GUM_SCALAR>.
Returns
elt's IO flags.
Exceptions
NotFoundRaised if elt does not have any IO flags.

Definition at line 138 of file PRMClassElementContainer_tpl.h.

139  {
140  try {
141  return _IOFlags_[elt.safeName()];
142  } catch (NotFound&) {
143  GUM_ERROR(NotFound, "this ClassElement<GUM_SCALAR> does not have any IO flags")
144  }
145  }
HashTable< std::string, std::pair< bool, bool > > _IOFlags_
input / output flags, useful when inheriting or copying.
#define GUM_ERROR(type, msg)
Definition: exceptions.h:51

◆ implementations() [1/2]

template<typename GUM_SCALAR >
INLINE Set< PRMClass< GUM_SCALAR > *> & gum::prm::PRMInterface< GUM_SCALAR >::implementations ( )

Returns the set of Class<GUM_SCALAR> implementing this PRMInterface.

Definition at line 451 of file PRMInterface_tpl.h.

451  {
452  return _implementations_;
453  }
Set< PRMClass< GUM_SCALAR > *> _implementations_
The set of Class<GUM_SCALAR> which implements this PRMInterface.
Definition: PRMInterface.h:355

◆ implementations() [2/2]

template<typename GUM_SCALAR >
INLINE const Set< PRMClass< GUM_SCALAR > *> & gum::prm::PRMInterface< GUM_SCALAR >::implementations ( ) const

Returns the set of Class<GUM_SCALAR> implementing this PRMInterface.

Definition at line 457 of file PRMInterface_tpl.h.

457  {
458  return _implementations_;
459  }
Set< PRMClass< GUM_SCALAR > *> _implementations_
The set of Class<GUM_SCALAR> which implements this PRMInterface.
Definition: PRMInterface.h:355

◆ inheritInterface()

template<typename GUM_SCALAR >
void gum::prm::PRMInterface< GUM_SCALAR >::inheritInterface ( )

Inherits from this interface super interface, this should only be done when this inteface inheritance was delayed.

Definition at line 69 of file PRMInterface_tpl.h.

69  {
71  }
PRMInterface< GUM_SCALAR > * _superInterface_
The alternate PRMClassElementContainer<GUM_SCALAR> searched for elements defined in this...
Definition: PRMInterface.h:352
void _inheritInterface_(const PRMInterface< GUM_SCALAR > &i)
Proceed with the copy of i in this.

◆ isClass()

static INLINE bool gum::prm::PRMObject::isClass ( const PRMObject obj)
inlinestaticinherited

Returns true if obj_ptr is of type Class.

Definition at line 109 of file PRMObject.h.

References gum::prm::PRMObject::PRMObject().

109 { return obj.obj_type() == prm_type::CLASS; }
+ Here is the call graph for this function:

◆ isInnerNode()

template<typename GUM_SCALAR>
INLINE bool gum::prm::PRMClassElementContainer< GUM_SCALAR >::isInnerNode ( const PRMClassElement< GUM_SCALAR > &  elt) const
virtualinherited

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.

Parameters
eltA PRMClassElement<GUM_SCALAR>.
Returns
true if elt is an inner node.
Exceptions
NotFoundRaised if NodeId does'nt match any PRMClassElement<GUM_SCALAR> in this.
WrongClassElementRaised if NodeId is neither an PRMAttribute nor an PRMAggregate.

Definition at line 114 of file PRMClassElementContainer_tpl.h.

115  {
116  try {
117  return !(getIOFlag_(elt).first || getIOFlag_(elt).second);
118  } catch (NotFound&) { return true; }
119  }
virtual std::pair< bool, bool > & getIOFlag_(const PRMClassElement< GUM_SCALAR > &elt)
Returns the IO flags of a PRMClassElement<GUM_SCALAR>.

◆ isInputNode()

template<typename GUM_SCALAR>
INLINE bool gum::prm::PRMClassElementContainer< GUM_SCALAR >::isInputNode ( const PRMClassElement< GUM_SCALAR > &  elt) const
virtualinherited

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.

Parameters
eltA PRMClassElement<GUM_SCALAR>.
Returns
Returns true if id is an input node.

Definition at line 70 of file PRMClassElementContainer_tpl.h.

71  {
72  try {
73  return getIOFlag_(elt).first;
74  } catch (NotFound&) { return false; }
75  }
virtual std::pair< bool, bool > & getIOFlag_(const PRMClassElement< GUM_SCALAR > &elt)
Returns the IO flags of a PRMClassElement<GUM_SCALAR>.

◆ isInstance()

static INLINE bool gum::prm::PRMObject::isInstance ( const PRMObject obj)
inlinestaticinherited

Returns true if obj_ptr is of type PRMInstance.

Definition at line 117 of file PRMObject.h.

References gum::prm::PRMObject::PRMObject().

117  {
118  return obj.obj_type() == prm_type::INSTANCE;
119  }
+ Here is the call graph for this function:

◆ isInterface()

static INLINE bool gum::prm::PRMObject::isInterface ( const PRMObject obj)
inlinestaticinherited

Returns true if obj_ptr is of type PRMInterface.

Definition at line 112 of file PRMObject.h.

References gum::prm::PRMObject::PRMObject().

112  {
113  return obj.obj_type() == prm_type::PRM_INTERFACE;
114  }
+ Here is the call graph for this function:

◆ isOutputNode()

template<typename GUM_SCALAR>
INLINE bool gum::prm::PRMInterface< GUM_SCALAR >::isOutputNode ( const PRMClassElement< GUM_SCALAR > &  elt) const
virtual

See gum::prm::PRMClassElementContainer<GUM_SCALAR>::get(const std::string&).

Implements gum::prm::PRMClassElementContainer< GUM_SCALAR >.

Definition at line 477 of file PRMInterface_tpl.h.

477  {
478  try {
479  if (!this->getIOFlag_(elt).second) {
480  for (auto i: _implementations_) {
481  if (i->isOutputNode(elt)) { return true; }
482  }
483 
484  if (_superInterface_ && _superInterface_->isOutputNode(elt)) { return true; }
485 
486  } else {
487  return true;
488  }
489  } catch (NotFound&) {}
490  return false;
491  }
PRMInterface< GUM_SCALAR > * _superInterface_
The alternate PRMClassElementContainer<GUM_SCALAR> searched for elements defined in this...
Definition: PRMInterface.h:352
virtual std::pair< bool, bool > & getIOFlag_(const PRMClassElement< GUM_SCALAR > &elt)
Returns the IO flags of a PRMClassElement<GUM_SCALAR>.
Set< PRMClass< GUM_SCALAR > *> _implementations_
The set of Class<GUM_SCALAR> which implements this PRMInterface.
Definition: PRMInterface.h:355

◆ isSubTypeOf()

template<typename GUM_SCALAR>
bool gum::prm::PRMInterface< GUM_SCALAR >::isSubTypeOf ( const PRMClassElementContainer< GUM_SCALAR > &  cec) const
virtual

Test if this PRMInterface is a sub PRMInterface of cec.

PRMInterface can not be a sub PRMInterface of a Class<GUM_SCALAR>, so if cec is a Class<GUM_SCALAR> this method will return false.

If cec is an PRMInterface then this PRMInterface is a sub PRMInterface of cec if they are equal or there exists a super PRMInterface of this PRMInterface which is equal to cec.

Parameters
cecThe PRMClassElementContainer<GUM_SCALAR> for which we determine if this PRMInterface is a sub PRMInterface of it.
Returns
Returns true if this Class<GUM_SCALAR> is a subclass of cec.

Implements gum::prm::PRMClassElementContainer< GUM_SCALAR >.

Definition at line 272 of file PRMInterface_tpl.h.

273  {
274  switch (cec.obj_type()) {
276  return false;
277  }
278 
280  const PRMInterface* current = this;
281 
282  while (current != 0) {
283  if (current == &(cec)) return true;
284 
285  current = current->_superInterface_;
286  }
287 
288  return false;
289  }
290 
291  default: {
292  GUM_ERROR(FatalError, "unknown ClassElementContainer<GUM_SCALAR>")
293  }
294  }
295  }
PRMInterface(const std::string &name)
Default constructor.
#define GUM_ERROR(type, msg)
Definition: exceptions.h:51

◆ isSuperTypeOf()

template<typename GUM_SCALAR>
INLINE bool gum::prm::PRMClassElementContainer< GUM_SCALAR >::isSuperTypeOf ( const PRMClassElementContainer< GUM_SCALAR > &  cec) const
virtualinherited

Test if this PRMClassElementContainer is a super type of cec.

This returns cec.isSubTypeOf(*this).

Parameters
cec
Returns
return true if this PRMClassElementContainer is a super type of cec.

Definition at line 122 of file PRMClassElementContainer_tpl.h.

123  {
124  return cec.isSubTypeOf(*this);
125  }

◆ LEFT_CAST()

static std::string gum::prm::PRMObject::LEFT_CAST ( )
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 79 of file PRMObject.h.

79 { return "("; }

◆ name() [1/2]

INLINE const std::string & gum::prm::PRMObject::name ( ) const
inherited

Returns the name of this object.

Definition at line 34 of file PRMObject_inl.h.

References gum::prm::ParamScopeData< GUM_SCALAR >::ParamScopeData().

34 { return _name_; }
std::string _name_
Definition: PRMObject.h:205
+ Here is the call graph for this function:

◆ name() [2/2]

INLINE void gum::prm::PRMObject::name ( const std::string &  name)
inherited

Change the name of the PRM Object.

Warning
Don't do this unless you know what you are doing !

Definition at line 38 of file PRMObject_inl.h.

References gum::prm::ParamScopeData< GUM_SCALAR >::ParamScopeData().

38 { _name_ = name; }
const std::string & name() const
Returns the name of this object.
Definition: PRMObject_inl.h:34
std::string _name_
Definition: PRMObject.h:205
+ Here is the call graph for this function:

◆ obj_type()

template<typename GUM_SCALAR >
INLINE PRMObject::prm_type gum::prm::PRMInterface< GUM_SCALAR >::obj_type ( ) const
virtual

Implementation of pure virtual method of PRMObject.

Implements gum::prm::PRMObject.

Definition at line 391 of file PRMInterface_tpl.h.

◆ operator!=()

INLINE bool gum::prm::PRMObject::operator!= ( const PRMObject obj) const
inherited

To PRMObject are equal if they have the same name (which is unique).

Definition at line 46 of file PRMObject_inl.h.

References gum::prm::ParamScopeData< GUM_SCALAR >::ParamScopeData().

46 { return _name_ != obj.name(); }
std::string _name_
Definition: PRMObject.h:205
+ Here is the call graph for this function:

◆ operator=()

template<typename GUM_SCALAR>
PRMInterface< GUM_SCALAR >& gum::prm::PRMInterface< GUM_SCALAR >::operator= ( const PRMInterface< GUM_SCALAR > &  source)
private

Copy operator. Don't use it.

◆ operator==()

INLINE bool gum::prm::PRMObject::operator== ( const PRMObject obj) const
inherited

To PRMObject are equal if they have the same name (which is unique).

Definition at line 42 of file PRMObject_inl.h.

References gum::prm::ParamScopeData< GUM_SCALAR >::ParamScopeData().

42 { return _name_ == obj.name(); }
std::string _name_
Definition: PRMObject.h:205
+ Here is the call graph for this function:

◆ operator[]() [1/4]

template<typename GUM_SCALAR >
INLINE PRMClassElement< GUM_SCALAR > & gum::prm::PRMInterface< GUM_SCALAR >::operator[] ( NodeId  id)
virtual

◆ operator[]() [2/4]

template<typename GUM_SCALAR >
INLINE const PRMClassElement< GUM_SCALAR > & gum::prm::PRMInterface< GUM_SCALAR >::operator[] ( NodeId  id) const
virtual

◆ operator[]() [3/4]

template<typename GUM_SCALAR >
INLINE PRMClassElement< GUM_SCALAR > & gum::prm::PRMInterface< GUM_SCALAR >::operator[] ( const std::string &  name)
virtual

See gum::prm::PRMClassElementContainer<GUM_SCALAR>::operator[](const std::string&).

Implements gum::prm::PRMClassElementContainer< GUM_SCALAR >.

Definition at line 380 of file PRMInterface_tpl.h.

380  {
381  return get(name);
382  }
const std::string & name() const
Returns the name of this object.
Definition: PRMObject_inl.h:34

◆ operator[]() [4/4]

template<typename GUM_SCALAR >
INLINE const PRMClassElement< GUM_SCALAR > & gum::prm::PRMInterface< GUM_SCALAR >::operator[] ( const std::string &  name) const
virtual

See gum::prm::PRMClassElementContainer<GUM_SCALAR>::operator[](const std::string&).

Implements gum::prm::PRMClassElementContainer< GUM_SCALAR >.

Definition at line 386 of file PRMInterface_tpl.h.

386  {
387  return get(name);
388  }
const std::string & name() const
Returns the name of this object.
Definition: PRMObject_inl.h:34

◆ overload()

template<typename GUM_SCALAR>
NodeId gum::prm::PRMInterface< GUM_SCALAR >::overload ( PRMClassElement< GUM_SCALAR > *  elt)
virtual

Add a new PRMClassElement<GUM_SCALAR> which overload an inherited PRMClassElement<GUM_SCALAR>.

The pointer is "given" to this class, which will delete it when ~Class<GUM_SCALAR>() is called.

The NodeId of elt is defined when it is added to this, discarding any previous value. There is no garanty 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>. You do not define dependencies in an PRMInterface so it is useless to overload an PRMAttribute<GUM_SCALAR> with another sharing the same type, and if tried it will raise an OperationNotAllowed exception.

Parameters
eltThe new PRMClassElement<GUM_SCALAR> overloading an inherited PRMClassElement<GUM_SCALAR> in this.
Returns
the NodeId assigned to elt.
Exceptions
NotFoundRaised if no overloaded PRMClassElement<GUM_SCALAR> is found.
OperationNotAllowedRaised if the overloading is impossible.

Implements gum::prm::PRMClassElementContainer< GUM_SCALAR >.

Definition at line 147 of file PRMInterface_tpl.h.

147  {
148  try {
149  if (!super().exists(overloader->name()))
150  GUM_ERROR(OperationNotAllowed, "found no ClassElement<GUM_SCALAR> to overload")
151 
152  } catch (NotFound&) {
153  GUM_ERROR(OperationNotAllowed, "overload is possible only with sub interfaces")
154  }
155 
156  PRMClassElement< GUM_SCALAR >* overloaded = _nameMap_[overloader->name()];
157  if (overloaded == overloader)
158  GUM_ERROR(DuplicateElement, "duplicate ClassElement '" << overloader->name() << "'")
159 
160  if (!_checkOverloadLegality_(overloaded, overloader))
161  GUM_ERROR(OperationNotAllowed, "illegal overload")
162 
163  switch (overloader->elt_type()) {
165  auto attr_overloader = static_cast< PRMAttribute< GUM_SCALAR >* >(overloader);
166  auto attr_overloaded = static_cast< PRMAttribute< GUM_SCALAR >* >(overloaded);
167  _overloadAttribute_(attr_overloader, attr_overloaded);
168  break;
169  }
170 
172  auto ref_overloader = static_cast< PRMReferenceSlot< GUM_SCALAR >* >(overloader);
173  auto ref_overloaded = static_cast< PRMReferenceSlot< GUM_SCALAR >* >(overloaded);
174  _overloadReferenceSlot_(ref_overloader, ref_overloaded);
175  break;
176  }
177 
180  GUM_ERROR(OperationNotAllowed,
181  "Element " << overloader->name() << " can not be overloaded")
182  default:
183  GUM_ERROR(FatalError, "Unknown ClassElement<GUM_SCALAR> type for " << overloader->name())
184  }
185 
186  return overloader->id();
187  }
bool _checkOverloadLegality_(const PRMClassElement< GUM_SCALAR > *overloaded, const PRMClassElement< GUM_SCALAR > *overloader)
The alternate PRMClassElementContainer<GUM_SCALAR> searched for elements defined in this...
void _overloadAttribute_(PRMAttribute< GUM_SCALAR > *overloader, PRMAttribute< GUM_SCALAR > *overloaded)
The alternate PRMClassElementContainer<GUM_SCALAR> searched for elements defined in this...
virtual bool exists(const std::string &name) const
Returns true if a member with the given name exists in this PRMClassElementContainer or in the PRMCla...
void _overloadReferenceSlot_(PRMReferenceSlot< GUM_SCALAR > *overloader, PRMReferenceSlot< GUM_SCALAR > *overloaded)
The alternate PRMClassElementContainer<GUM_SCALAR> searched for elements defined in this...
HashTable< std::string, PRMClassElement< GUM_SCALAR > *> _nameMap_
Mapping between a member&#39;s name and itself. Used for fast access to a member given it&#39;s name...
Definition: PRMInterface.h:334
PRMInterface< GUM_SCALAR > & super()
Returns the superInterface of this PRMInterface.
#define GUM_ERROR(type, msg)
Definition: exceptions.h:51

◆ referenceSlots()

template<typename GUM_SCALAR >
INLINE const Set< PRMReferenceSlot< GUM_SCALAR > *> & gum::prm::PRMInterface< GUM_SCALAR >::referenceSlots ( ) const

Returns the set of PRMAggregate of this Class<GUM_SCALAR>.

Returns
Returns the set of PRMAggregate of this Class<GUM_SCALAR>.

Definition at line 446 of file PRMInterface_tpl.h.

446  {
447  return _referenceSlots_;
448  }
Set< PRMReferenceSlot< GUM_SCALAR > *> _referenceSlots_
The sequence of PRMReferenceSlot<GUM_SCALAR>.
Definition: PRMInterface.h:340

◆ RIGHT_CAST()

static std::string gum::prm::PRMObject::RIGHT_CAST ( )
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 80 of file PRMObject.h.

80 { return ")"; }

◆ setInputNode()

template<typename GUM_SCALAR>
INLINE void gum::prm::PRMClassElementContainer< GUM_SCALAR >::setInputNode ( const PRMClassElement< GUM_SCALAR > &  elt,
bool  b 
)
virtualinherited

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.

Parameters
eltA PRMClassElement<GUM_SCALAR>.
bThe flag value.
Exceptions
NotFoundRaised if id does'nt match any PRMClassElement<GUM_SCALAR> in this.
WrongClassElementRaised if NodeId is neither an PRMAttribute nor an PRMAggregate.

Definition at line 78 of file PRMClassElementContainer_tpl.h.

80  {
81  if (!exists(elt.safeName())) {
82  GUM_ERROR(NotFound, ": <" + elt.safeName() + "> is not in <" + name() + ">")
85  try {
86  getIOFlag_(elt).first = b;
87  } catch (NotFound&) { setIOFlag_(elt, std::make_pair(b, false)); }
88  } else {
89  GUM_ERROR(WrongClassElement, "given id is not an PRMAttribute or an PRMAggregate")
90  }
91  }
virtual std::pair< bool, bool > & getIOFlag_(const PRMClassElement< GUM_SCALAR > &elt)
Returns the IO flags of a PRMClassElement<GUM_SCALAR>.
const std::string & name() const
Returns the name of this object.
Definition: PRMObject_inl.h:34
virtual bool exists(const std::string &name) const
Returns true if a member with the given name exists in this PRMClassElementContainer or in the PRMCla...
static INLINE bool isAttribute(const PRMClassElement< GUM_SCALAR > &elt)
Returns true if obj_ptr is of type PRMAttribute.
virtual void setIOFlag_(const PRMClassElement< GUM_SCALAR > &elt, const std::pair< bool, bool > &flags)
Defines the IO flags of a PRMClassElement<GUM_SCALAR>.
static INLINE bool isAggregate(const PRMClassElement< GUM_SCALAR > &elt)
Return true if obj is of type PRMAggregate.
#define GUM_ERROR(type, msg)
Definition: exceptions.h:51

◆ setIOFlag_()

template<typename GUM_SCALAR>
INLINE void gum::prm::PRMClassElementContainer< GUM_SCALAR >::setIOFlag_ ( const PRMClassElement< GUM_SCALAR > &  elt,
const std::pair< bool, bool > &  flags 
)
protectedvirtualinherited

Defines the IO flags of a PRMClassElement<GUM_SCALAR>.

Parameters
eltThe PRMClassElement<GUM_SCALAR>.
flagsThe IO flags of elt. Overwrite any existing flags.
Returns
elt's IO flags.
Exceptions
NotFoundRaised if elt does not have any IO flags.

Definition at line 149 of file PRMClassElementContainer_tpl.h.

150  {
151  try {
152  _IOFlags_[elt.safeName()] = flags;
153  } catch (NotFound&) { _IOFlags_.insert(elt.safeName(), flags); }
154  }
HashTable< std::string, std::pair< bool, bool > > _IOFlags_
input / output flags, useful when inheriting or copying.
value_type & insert(const Key &key, const Val &val)
Adds a new element (actually a copy of this element) into the hash table.

◆ setOutputNode()

template<typename GUM_SCALAR>
INLINE void gum::prm::PRMClassElementContainer< GUM_SCALAR >::setOutputNode ( const PRMClassElement< GUM_SCALAR > &  elt,
bool  b 
)
virtualinherited

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.

Parameters
eltA PRMClassElement<GUM_SCALAR>.
bThe flag value.
Exceptions
NotFoundRaised if id does'nt match any PRMClassElement<GUM_SCALAR> in this.
WrongClassElementRaised if NodeId is neither an PRMAttribute nor an PRMAggregate.

Definition at line 94 of file PRMClassElementContainer_tpl.h.

96  {
97  if (!exists(elt.safeName())) {
98  GUM_ERROR(NotFound, "<" + elt.safeName() + "> is not in <" + name() + ">")
101  try {
102  getIOFlag_(elt).second = b;
103  } catch (NotFound&) { setIOFlag_(elt, std::make_pair(false, b)); }
104 
105  if (b) { updateDescendants_(elt); }
106  } else {
107  GUM_ERROR(WrongClassElement,
108  "given ClassElement<GUM_SCALAR> is not an "
109  "PRMAttribute or an PRMAggregate");
110  }
111  }
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 de...
virtual std::pair< bool, bool > & getIOFlag_(const PRMClassElement< GUM_SCALAR > &elt)
Returns the IO flags of a PRMClassElement<GUM_SCALAR>.
const std::string & name() const
Returns the name of this object.
Definition: PRMObject_inl.h:34
virtual bool exists(const std::string &name) const
Returns true if a member with the given name exists in this PRMClassElementContainer or in the PRMCla...
static INLINE bool isAttribute(const PRMClassElement< GUM_SCALAR > &elt)
Returns true if obj_ptr is of type PRMAttribute.
virtual void setIOFlag_(const PRMClassElement< GUM_SCALAR > &elt, const std::pair< bool, bool > &flags)
Defines the IO flags of a PRMClassElement<GUM_SCALAR>.
static INLINE bool isAggregate(const PRMClassElement< GUM_SCALAR > &elt)
Return true if obj is of type PRMAggregate.
#define GUM_ERROR(type, msg)
Definition: exceptions.h:51

◆ super() [1/2]

template<typename GUM_SCALAR >
INLINE PRMInterface< GUM_SCALAR > & gum::prm::PRMInterface< GUM_SCALAR >::super ( )

Returns the superInterface of this PRMInterface.

Returns
Returns the super PRMInterface of this PRMInterface.
Exceptions
NotFoundRaised if this has no super PRMInterface.

Definition at line 342 of file PRMInterface_tpl.h.

342  {
343  if (_superInterface_)
344  return *_superInterface_;
345  else
346  GUM_ERROR(NotFound, "this Interface is ! a sub interface")
347  }
PRMInterface< GUM_SCALAR > * _superInterface_
The alternate PRMClassElementContainer<GUM_SCALAR> searched for elements defined in this...
Definition: PRMInterface.h:352
#define GUM_ERROR(type, msg)
Definition: exceptions.h:51

◆ super() [2/2]

template<typename GUM_SCALAR >
INLINE const PRMInterface< GUM_SCALAR > & gum::prm::PRMInterface< GUM_SCALAR >::super ( ) const

Returns the superInterface of this PRMInterface.

Returns
Returns the super PRMInterface of this PRMInterface.
Exceptions
NotFoundRaised if this has no super PRMInterface.

Definition at line 350 of file PRMInterface_tpl.h.

350  {
351  if (_superInterface_)
352  return *_superInterface_;
353  else
354  GUM_ERROR(NotFound, "this Interface is ! a sub interface")
355  }
PRMInterface< GUM_SCALAR > * _superInterface_
The alternate PRMClassElementContainer<GUM_SCALAR> searched for elements defined in this...
Definition: PRMInterface.h:352
#define GUM_ERROR(type, msg)
Definition: exceptions.h:51

◆ updateDescendants_()

template<typename GUM_SCALAR>
void gum::prm::PRMInterface< GUM_SCALAR >::updateDescendants_ ( const PRMClassElement< GUM_SCALAR > &  elt)
protectedvirtual

See gum::prm::PRMClassElementContainer<GUM_SCALAR>(const PRMClassElement<GUM_SCALAR>&).

Implements gum::prm::PRMClassElementContainer< GUM_SCALAR >.

Definition at line 298 of file PRMInterface_tpl.h.

298  {
299  // for ( const auto ext : _extensions_ )
300  // if ( !ext->isOutputNode( elt ) ) ext->setOutputNode( elt, true );
301 
302  // for ( const auto impl : _implementations_ ) {
303  // // Because of cyclic dependencies we must use a reinterpret cast.
304  // PRMClassElementContainer<GUM_SCALAR>* c =
305  // reinterpret_cast<PRMClassElementContainer<GUM_SCALAR>*>( impl );
306 
307  // if ( ! c->isOutputNode( elt ) ) c->setOutputNode( elt, true );
308  //}
309  }

Friends And Related Function Documentation

◆ PRMClass< GUM_SCALAR >

template<typename GUM_SCALAR>
friend class PRMClass< GUM_SCALAR >
friend

Definition at line 68 of file PRMInterface.h.

Member Data Documentation

◆ _attributes_

template<typename GUM_SCALAR>
Set< PRMAttribute< GUM_SCALAR >* > gum::prm::PRMInterface< GUM_SCALAR >::_attributes_
private

The sequence of PRMAttribute<GUM_SCALAR>s.

Definition at line 337 of file PRMInterface.h.

◆ _dag_

template<typename GUM_SCALAR>
DAG gum::prm::PRMInterface< GUM_SCALAR >::_dag_
private

The dag representing dependencies between formal attributes and slots.

Definition at line 320 of file PRMInterface.h.

◆ _extensions_

template<typename GUM_SCALAR>
Set< PRMInterface< GUM_SCALAR >* > gum::prm::PRMInterface< GUM_SCALAR >::_extensions_
private

The set of Class<GUM_SCALAR> which implements this PRMInterface.

Definition at line 363 of file PRMInterface.h.

◆ _implementations_

template<typename GUM_SCALAR>
Set< PRMClass< GUM_SCALAR >* > gum::prm::PRMInterface< GUM_SCALAR >::_implementations_
private

The set of Class<GUM_SCALAR> which implements this PRMInterface.

Definition at line 355 of file PRMInterface.h.

◆ _nameMap_

template<typename GUM_SCALAR>
HashTable< std::string, PRMClassElement< GUM_SCALAR >* > gum::prm::PRMInterface< GUM_SCALAR >::_nameMap_
private

Mapping between a member's name and itself. Used for fast access to a member given it's name.

Definition at line 334 of file PRMInterface.h.

◆ _nodeIdMap_

template<typename GUM_SCALAR>
NodeProperty< PRMClassElement< GUM_SCALAR >* > gum::prm::PRMInterface< GUM_SCALAR >::_nodeIdMap_
private

Mapping between node's id and their name (being an attribute or a slot). Used for fast access to a member given it's node id.

Definition at line 324 of file PRMInterface.h.

◆ _referenceSlots_

template<typename GUM_SCALAR>
Set< PRMReferenceSlot< GUM_SCALAR >* > gum::prm::PRMInterface< GUM_SCALAR >::_referenceSlots_
private

The sequence of PRMReferenceSlot<GUM_SCALAR>.

Definition at line 340 of file PRMInterface.h.

◆ _superInterface_

template<typename GUM_SCALAR>
PRMInterface< GUM_SCALAR >* gum::prm::PRMInterface< GUM_SCALAR >::_superInterface_
private

The alternate PRMClassElementContainer<GUM_SCALAR> searched for elements defined in this. Note that this is first searched for gum::PRMClassElement<GUM_SCALAR>.

Definition at line 352 of file PRMInterface.h.


The documentation for this class was generated from the following files: