aGrUM  0.13.2
gum::prm::PRMSlotChain< GUM_SCALAR > Class Template Reference

A PRMSlotChain represents a sequence of gum::prm::PRMClassElement<GUM_SCALAR> where the n-1 first gum::prm::PRMClassElement<GUM_SCALAR> are gum::prm::PRMReferenceSlot and the last gum::prm::PRMClassElement<GUM_SCALAR> an gum::prm::PRMAttribute or an gum::prm::PRMAggregate. More...

#include <PRMObject.h>

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

Public Member Functions

Constructors & destructor
 PRMSlotChain (const std::string &name, const Sequence< PRMClassElement< GUM_SCALAR > * > &chain)
 Default constructor. More...
 
 PRMSlotChain (Sequence< PRMClassElement< GUM_SCALAR > * > *chain, const std::string &name)
 Tweak constructor. More...
 
 PRMSlotChain (const PRMSlotChain &source)
 Copy constructor. More...
 
virtual ~PRMSlotChain ()
 Destructor. More...
 
Getters & setters
virtual PRMClassElement< GUM_SCALAR >::ClassElementType elt_type () const
 See gum::PRMClassElement<GUM_SCALAR>::elt_type(). More...
 
virtual PRMType< GUM_SCALAR > & type ()
 This is similar to the following call: this->lastElt().type() More...
 
virtual const PRMType< GUM_SCALAR > & type () const
 This is similar to the following call: this->lastElt().type() More...
 
virtual const Potential< GUM_SCALAR > & cpf () const
 This is similar to the following call: this->lastElt().cpf() More...
 
bool isMultiple () const
 Return true if this slot chain contains at least one multiple reference slot. More...
 
PRMClassElementContainer< GUM_SCALAR > & end ()
 Returns the PRMClassElement<GUM_SCALAR>Container over which this slot chain ends. More...
 
const PRMClassElementContainer< GUM_SCALAR > & end () const
 Returns the PRMClassElement<GUM_SCALAR>Container over which this slot chain ends. More...
 
PRMClassElement< GUM_SCALAR > & lastElt ()
 Returns the last element of the slot chain, typically this is an gum::PRMAttribute or a gum::PRMAggregate. More...
 
const PRMClassElement< GUM_SCALAR > & lastElt () const
 Returns the last element of the slot chain, typically this is an gum::PRMAttribute or a gum::PRMAggregate. More...
 
Sequence< PRMClassElement< GUM_SCALAR > * > & chain ()
 Return the sequence representing the chain of elements in this PRMSlotChain. More...
 
const Sequence< PRMClassElement< GUM_SCALAR > * > & chain () const
 Return the sequence representing the chain of elements in this PRMSlotChain. More...
 
virtual void addParent (const PRMClassElement< GUM_SCALAR > &elt)
 See gum::PRMClassElement<GUM_SCALAR>::_addParent(). More...
 
virtual void addChild (const PRMClassElement< GUM_SCALAR > &elt)
 See gum::PRMClassElement<GUM_SCALAR>::_addChild(). More...
 
virtual PRMAttribute< GUM_SCALAR > * getCastDescendant () const
 Raise a gum::OperationNotAllowed exception See gum::PRMClassElement<GUM_SCALAR>::getCastDescendant() More...
 
Getters & setters
NodeId id () const
 Returns the NodeId of this element in it's class DAG. More...
 
virtual void setId (NodeId id)
 Used to assign the id of this element. More...
 
virtual PRMObject::prm_type obj_type () const
 
Fast access to random variable's properties
const std::string & safeName () const
 Returns the safe name of this PRMClassElement, if any. More...
 
virtual std::string cast (const PRMType< GUM_SCALAR > &t) const
 Returns the name of the cast descendant with PRMType t of this PRMClassElement. 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 Attributes

std::string _safeName
 The safe name of this PRMClassElement. More...
 

Built-in type

enum  ClassElementType {
  prm_attribute, prm_aggregate, prm_refslot, prm_slotchain,
  prm_parameter
}
 Returns true if obj_ptr is of type PRMReferenceSlot. More...
 
static std::string enum2str (ClassElementType type)
 Returns true if obj_ptr is of type PRMReferenceSlot. More...
 
static INLINE bool isReferenceSlot (const PRMClassElement &elt)
 Returns true if obj_ptr is of type PRMReferenceSlot. More...
 
static INLINE bool isAttribute (const PRMClassElement &elt)
 Returns true if obj_ptr is of type PRMAttribute. More...
 
static INLINE bool isAggregate (const PRMClassElement &elt)
 Return true if obj is of type PRMAggregate. More...
 
static INLINE bool isSlotChain (const PRMClassElement &elt)
 Return true if obj is of type PRMSlotChain. More...
 
static INLINE bool isParameter (const PRMClassElement &elt)
 Return true if obj is of type PRMParameter. 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 enum2str (prm_type type)
 Returns the string representation of a PRMObject. 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 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...
 

Private members of PRMSlotChain.

Sequence< PRMClassElement< GUM_SCALAR > * > * __chain
 The sequence of PRMClassElement<GUM_SCALAR> composing the slot chain. More...
 
bool __isMultiple
 Flag indicating if this slot chain is multiple or not. More...
 
void __copyLastElt ()
 Copy the last element, this prevents unwanted DuplicateElement exceptions. More...
 

Detailed Description

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

A PRMSlotChain represents a sequence of gum::prm::PRMClassElement<GUM_SCALAR> where the n-1 first gum::prm::PRMClassElement<GUM_SCALAR> are gum::prm::PRMReferenceSlot and the last gum::prm::PRMClassElement<GUM_SCALAR> an gum::prm::PRMAttribute or an gum::prm::PRMAggregate.

A PRMSlotChain behaves as an gum::prm::PRMAttribute or an gum::prm::PRMAggregate (depending the gum::prm::PRMClassElement<GUM_SCALAR> type of it's last element) regarding the following methods: gum::prm::PRMClassElement<GUM_SCALAR>::type() and gum::prm::PRMClassElement<GUM_SCALAR>::cpf().

Definition at line 219 of file PRMObject.h.

Member Enumeration Documentation

template<typename GUM_SCALAR>
enum gum::prm::PRMClassElement::ClassElementType
inherited

Returns true if obj_ptr is of type PRMReferenceSlot.

Enumerator
prm_attribute 
prm_aggregate 
prm_refslot 
prm_slotchain 
prm_parameter 

Definition at line 90 of file PRMClassElement.h.

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 66 of file PRMObject.h.

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

Constructor & Destructor Documentation

template<typename GUM_SCALAR>
gum::prm::PRMSlotChain< GUM_SCALAR >::PRMSlotChain ( const std::string &  name,
const Sequence< PRMClassElement< GUM_SCALAR > * > &  chain 
)

Default constructor.

Chain's n-1 first elements must be PRMReferenceSlot and the last element must either be an PRMAttribute or an PRMAggregate.

Warning: the last element in chain is copied !

Parameters
nameThe name of this PRMSlotChain.
chainThe chain of gum::prm::PRMClassElement<GUM_SCALAR> in this PRMSlotChain.
Exceptions
OperationNotAllowedRaised if the chain contains less than two PRMClassElement<GUM_SCALAR>.
WrongClassElement<GUM_SCALAR>Raised contains invalid PRMClassElement<GUM_SCALAR>.

Definition at line 35 of file PRMSlotChain_tpl.h.

References gum::prm::PRMSlotChain< GUM_SCALAR >::__chain, gum::prm::PRMSlotChain< GUM_SCALAR >::__copyLastElt(), gum::prm::PRMSlotChain< GUM_SCALAR >::__isMultiple, gum::prm::PRMClassElement< GUM_SCALAR >::_safeName, GUM_ERROR, gum::prm::PRMSlotChain< GUM_SCALAR >::lastElt(), gum::prm::PRMObject::LEFT_CAST(), gum::prm::PRMObject::name(), and gum::prm::PRMObject::RIGHT_CAST().

37  :
38  PRMClassElement< GUM_SCALAR >(name),
39  __chain(new Sequence< PRMClassElement< GUM_SCALAR >* >(chain)),
40  __isMultiple(false) {
41  GUM_CONSTRUCTOR(PRMSlotChain);
42 
43  if (__chain->size() < 2) {
44  GUM_ERROR(OperationNotAllowed,
45  "chain must contain at least two ClassElement");
46  }
47 
48  for (Size i = 0; i < __chain->size() - 1; ++i) {
49  if (__chain->atPos(i)->elt_type()
51  GUM_ERROR(WrongClassElement, "illegal ClassElement in chain");
52  } else {
53  __isMultiple =
55  || static_cast< PRMReferenceSlot< GUM_SCALAR >* >(__chain->atPos(i))
56  ->isArray();
57  }
58  }
59 
60  __copyLastElt();
61 
62  this->_safeName = PRMObject::LEFT_CAST() + lastElt().type().name()
64  this->lastElt().type().variable().setName(name);
65  }
unsigned long Size
In aGrUM, hashed values are unsigned long int.
Definition: types.h:50
void __copyLastElt()
Copy the last element, this prevents unwanted DuplicateElement exceptions.
const std::string & name() const
Returns the name of this object.
Definition: PRMObject_inl.h:32
Sequence< PRMClassElement< GUM_SCALAR > * > & chain()
Return the sequence representing the chain of elements in this PRMSlotChain.
static std::string LEFT_CAST()
Enumeration of the different types of objects handled by a PRM.
Definition: PRMObject.h:76
bool __isMultiple
Flag indicating if this slot chain is multiple or not.
Definition: PRMSlotChain.h:202
PRMSlotChain(const std::string &name, const Sequence< PRMClassElement< GUM_SCALAR > * > &chain)
Default constructor.
Sequence< PRMClassElement< GUM_SCALAR > * > * __chain
The sequence of PRMClassElement<GUM_SCALAR> composing the slot chain.
Definition: PRMSlotChain.h:199
PRMClassElement< GUM_SCALAR > & lastElt()
Returns the last element of the slot chain, typically this is an gum::PRMAttribute or a gum::PRMAggre...
static std::string RIGHT_CAST()
Enumeration of the different types of objects handled by a PRM.
Definition: PRMObject.h:77
std::string _safeName
The safe name of this PRMClassElement.
#define GUM_ERROR(type, msg)
Definition: exceptions.h:66

+ Here is the call graph for this function:

template<typename GUM_SCALAR>
gum::prm::PRMSlotChain< GUM_SCALAR >::PRMSlotChain ( Sequence< PRMClassElement< GUM_SCALAR > * > *  chain,
const std::string &  name 
)

Tweak constructor.

Chain's n-1 first elements must be PRMReferenceSlot and the last element must either be an PRMAttribute or an PRMAggregate.

Warning: the last element in chain is copied !

Parameters
nameThe name of this PRMSlotChain.
chainThe chain given to this PRMSlotChain, it is deleted when PRMSlotChain::~PRMSlotChain() is called.
Exceptions
OperationNotAllowedRaised if the chain contains less than two PRMClassElement<GUM_SCALAR>.
WrongClassElement<GUM_SCALAR>Raised contains invalid PRMClassElement<GUM_SCALAR>.

Definition at line 70 of file PRMSlotChain_tpl.h.

71  :
73  // No need to
74  // GUM_CONSTRUCTOR(PRMSlotChain);
75 
76  // if (__chain->size() < 2) {
77  // GUM_ERROR(OperationNotAllowed,
78  // "chain must containt at least two PRMClassElement");
79  //}
80 
81  // for (Size i = 0; i < __chain->size() - 1; ++i) {
82  // if (not(__chain->atPos(i)->elt_type() !=
83  // PRMClassElement<GUM_SCALAR>::prm_refslot)) {
84  // GUM_ERROR(WrongClassElement, "illegal PRMClassElement in chain");
85  // } else {
86  // __isMultiple =
87  // __isMultiple or
88  // static_cast<PRMReferenceSlot<GUM_SCALAR>
89  // *>(__chain->atPos(i))->isArray();
90  // }
91  //}
92 
93  //__copyLastElt();
94  // this->_safeName = PRMObject::LEFT_CAST() + lastElt().type().name() +
95  // PRMObject::RIGHT_CAST() + name;
96  }
const std::string & name() const
Returns the name of this object.
Definition: PRMObject_inl.h:32
Sequence< PRMClassElement< GUM_SCALAR > * > & chain()
Return the sequence representing the chain of elements in this PRMSlotChain.
PRMSlotChain(const std::string &name, const Sequence< PRMClassElement< GUM_SCALAR > * > &chain)
Default constructor.
template<typename GUM_SCALAR>
gum::prm::PRMSlotChain< GUM_SCALAR >::PRMSlotChain ( const PRMSlotChain< GUM_SCALAR > &  source)

Copy constructor.

This creates a copy of the slot chain.

Definition at line 142 of file PRMSlotChain_tpl.h.

References gum::prm::PRMSlotChain< GUM_SCALAR >::__copyLastElt(), and gum::prm::PRMSlotChain< GUM_SCALAR >::operator=().

143  :
144  PRMClassElement< GUM_SCALAR >(source.name()),
145  __chain(new Sequence< PRMClassElement< GUM_SCALAR >* >(source.chain())),
146  __isMultiple(source.isMultiple()) {
147  GUM_CONS_CPY(PRMSlotChain);
148  __copyLastElt();
149  }
void __copyLastElt()
Copy the last element, this prevents unwanted DuplicateElement exceptions.
bool __isMultiple
Flag indicating if this slot chain is multiple or not.
Definition: PRMSlotChain.h:202
PRMSlotChain(const std::string &name, const Sequence< PRMClassElement< GUM_SCALAR > * > &chain)
Default constructor.
Sequence< PRMClassElement< GUM_SCALAR > * > * __chain
The sequence of PRMClassElement<GUM_SCALAR> composing the slot chain.
Definition: PRMSlotChain.h:199

+ Here is the call graph for this function:

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

Destructor.

Definition at line 135 of file PRMSlotChain_tpl.h.

References gum::prm::PRMSlotChain< GUM_SCALAR >::__chain.

135  {
136  GUM_DESTRUCTOR(PRMSlotChain);
137  delete __chain->back();
138  delete __chain;
139  }
PRMSlotChain(const std::string &name, const Sequence< PRMClassElement< GUM_SCALAR > * > &chain)
Default constructor.
Sequence< PRMClassElement< GUM_SCALAR > * > * __chain
The sequence of PRMClassElement<GUM_SCALAR> composing the slot chain.
Definition: PRMSlotChain.h:199

Member Function Documentation

template<typename GUM_SCALAR >
void gum::prm::PRMSlotChain< GUM_SCALAR >::__copyLastElt ( )
private

Copy the last element, this prevents unwanted DuplicateElement exceptions.

Definition at line 99 of file PRMSlotChain_tpl.h.

References gum::prm::PRMSlotChain< GUM_SCALAR >::__chain, gum::prm::PRMAggregate< GUM_SCALAR >::agg_type(), GUM_ERROR, gum::prm::PRMClassElement< GUM_SCALAR >::id(), gum::prm::PRMObject::name(), gum::prm::PRMClassElement< GUM_SCALAR >::setId(), and gum::prm::PRMAggregate< GUM_SCALAR >::type().

Referenced by gum::prm::PRMSlotChain< GUM_SCALAR >::PRMSlotChain().

99  {
100  PRMClassElement< GUM_SCALAR >* new_elt = 0;
101 
102  switch (__chain->back()->elt_type()) {
104  auto old_attr =
105  static_cast< const PRMAttribute< GUM_SCALAR >* >(__chain->back());
106 
107  Bijection< const DiscreteVariable*, const DiscreteVariable* > bij;
108  for (auto var : old_attr->cpf().variablesSequence()) {
109  if (var != &(old_attr->type().variable())) { bij.insert(var, var); }
110  }
111 
112  new_elt = old_attr->copy(bij);
113  break;
114  }
115 
117  const PRMAggregate< GUM_SCALAR >* c_agg =
118  static_cast< const PRMAggregate< GUM_SCALAR >* >(__chain->back());
119  PRMAggregate< GUM_SCALAR >* agg = new PRMAggregate< GUM_SCALAR >(
120  c_agg->name(), c_agg->agg_type(), c_agg->type(), c_agg->id());
121  new_elt = agg;
122  break;
123  }
124 
125  default: {
126  GUM_ERROR(WrongClassElement, "last element of chain is not valid");
127  }
128  }
129 
130  new_elt->setId(__chain->back()->id());
131  __chain->setAtPos(__chain->size() - 1, new_elt);
132  }
Sequence< PRMClassElement< GUM_SCALAR > * > * __chain
The sequence of PRMClassElement<GUM_SCALAR> composing the slot chain.
Definition: PRMSlotChain.h:199
#define GUM_ERROR(type, msg)
Definition: exceptions.h:66

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

template<typename GUM_SCALAR>
INLINE void gum::prm::PRMSlotChain< GUM_SCALAR >::addChild ( const PRMClassElement< GUM_SCALAR > &  elt)
virtual

See gum::PRMClassElement<GUM_SCALAR>::_addChild().

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

Definition at line 223 of file PRMSlotChain_tpl.h.

224  {}
template<typename GUM_SCALAR>
INLINE void gum::prm::PRMSlotChain< GUM_SCALAR >::addParent ( const PRMClassElement< GUM_SCALAR > &  elt)
virtual

See gum::PRMClassElement<GUM_SCALAR>::_addParent().

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

Definition at line 219 of file PRMSlotChain_tpl.h.

220  {}
template<typename GUM_SCALAR>
INLINE std::string gum::prm::PRMClassElement< GUM_SCALAR >::cast ( const PRMType< GUM_SCALAR > &  t) const
virtualinherited

Returns the name of the cast descendant with PRMType t of this PRMClassElement.

Parameters
tThe type in which we want to cast this PRMClassElement.
Exceptions
OperationNotAllowedIf the cast is impossible.

Definition at line 71 of file PRMClassElement_tpl.h.

References GUM_ERROR, gum::prm::PRMObject::LEFT_CAST(), gum::prm::PRMObject::name(), gum::prm::PRMType< GUM_SCALAR >::name(), gum::prm::PRMObject::RIGHT_CAST(), and gum::prm::PRMClassElement< GUM_SCALAR >::type().

Referenced by gum::prm::PRMFactory< GUM_SCALAR >::addNoisyOrCompound(), gum::prm::PRMFormAttribute< GUM_SCALAR >::getCastDescendant(), gum::prm::PRMScalarAttribute< GUM_SCALAR >::getCastDescendant(), gum::prm::PRMAggregate< GUM_SCALAR >::getCastDescendant(), and gum::prm::PRMClassElement< double >::isParameter().

71  {
72  if (type().isSubTypeOf(t)) {
73  return PRMObject::LEFT_CAST() + t.name() + PRMObject::RIGHT_CAST()
74  + name();
75  } else {
76  GUM_ERROR(OperationNotAllowed, "illegal cast");
77  }
78  }
const std::string & name() const
Returns the name of this object.
Definition: PRMObject_inl.h:32
static std::string LEFT_CAST()
Enumeration of the different types of objects handled by a PRM.
Definition: PRMObject.h:76
static std::string RIGHT_CAST()
Enumeration of the different types of objects handled by a PRM.
Definition: PRMObject.h:77
virtual PRMType< GUM_SCALAR > & type()=0
Return a reference over the gum::PRMType of this class element.
#define GUM_ERROR(type, msg)
Definition: exceptions.h:66

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

template<typename GUM_SCALAR >
INLINE Sequence< PRMClassElement< GUM_SCALAR > * > & gum::prm::PRMSlotChain< GUM_SCALAR >::chain ( )

Return the sequence representing the chain of elements in this PRMSlotChain.

Definition at line 208 of file PRMSlotChain_tpl.h.

References gum::prm::PRMSlotChain< GUM_SCALAR >::__chain.

Referenced by gum::prm::PRMInstance< GUM_SCALAR >::__instantiateSlotChain(), and gum::prm::PRMFactory< GUM_SCALAR >::__retrieveInputs().

208  {
209  return *__chain;
210  }
Sequence< PRMClassElement< GUM_SCALAR > * > * __chain
The sequence of PRMClassElement<GUM_SCALAR> composing the slot chain.
Definition: PRMSlotChain.h:199

+ Here is the caller graph for this function:

template<typename GUM_SCALAR >
INLINE const Sequence< PRMClassElement< GUM_SCALAR > * > & gum::prm::PRMSlotChain< GUM_SCALAR >::chain ( ) const

Return the sequence representing the chain of elements in this PRMSlotChain.

Definition at line 214 of file PRMSlotChain_tpl.h.

References gum::prm::PRMSlotChain< GUM_SCALAR >::__chain.

214  {
215  return *__chain;
216  }
Sequence< PRMClassElement< GUM_SCALAR > * > * __chain
The sequence of PRMClassElement<GUM_SCALAR> composing the slot chain.
Definition: PRMSlotChain.h:199
template<typename GUM_SCALAR >
INLINE const Potential< GUM_SCALAR > & gum::prm::PRMSlotChain< GUM_SCALAR >::cpf ( ) const
virtual

This is similar to the following call: this->lastElt().cpf()

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

Definition at line 175 of file PRMSlotChain_tpl.h.

References gum::prm::PRMSlotChain< GUM_SCALAR >::__chain.

175  {
176  return __chain->back()->cpf();
177  }
Sequence< PRMClassElement< GUM_SCALAR > * > * __chain
The sequence of PRMClassElement<GUM_SCALAR> composing the slot chain.
Definition: PRMSlotChain.h:199
template<typename GUM_SCALAR >
INLINE PRMClassElement< GUM_SCALAR >::ClassElementType gum::prm::PRMSlotChain< GUM_SCALAR >::elt_type ( ) const
virtual

See gum::PRMClassElement<GUM_SCALAR>::elt_type().

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

Definition at line 160 of file PRMSlotChain_tpl.h.

References gum::prm::PRMClassElement< GUM_SCALAR >::prm_slotchain.

160  {
161  return this->prm_slotchain;
162  }
template<typename GUM_SCALAR >
INLINE PRMClassElementContainer< GUM_SCALAR > & gum::prm::PRMSlotChain< GUM_SCALAR >::end ( )

Returns the PRMClassElement<GUM_SCALAR>Container over which this slot chain ends.

Definition at line 181 of file PRMSlotChain_tpl.h.

References gum::prm::PRMSlotChain< GUM_SCALAR >::__chain, and gum::prm::PRMReferenceSlot< GUM_SCALAR >::slotType().

Referenced by gum::prm::ClassDependencyGraph< GUM_SCALAR >::__addArcs(), gum::prm::PRMInstance< GUM_SCALAR >::add(), and gum::prm::PRMClass< GUM_SCALAR >::addArc().

181  {
182  return static_cast< PRMReferenceSlot< GUM_SCALAR >* >(
183  __chain->atPos(__chain->size() - 2))
184  ->slotType();
185  }
Sequence< PRMClassElement< GUM_SCALAR > * > * __chain
The sequence of PRMClassElement<GUM_SCALAR> composing the slot chain.
Definition: PRMSlotChain.h:199

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

template<typename GUM_SCALAR >
INLINE const PRMClassElementContainer< GUM_SCALAR > & gum::prm::PRMSlotChain< GUM_SCALAR >::end ( ) const

Returns the PRMClassElement<GUM_SCALAR>Container over which this slot chain ends.

Definition at line 189 of file PRMSlotChain_tpl.h.

References gum::prm::PRMSlotChain< GUM_SCALAR >::__chain, and gum::prm::PRMReferenceSlot< GUM_SCALAR >::slotType().

189  {
190  return static_cast< PRMReferenceSlot< GUM_SCALAR >* >(
191  __chain->atPos(__chain->size() - 2))
192  ->slotType();
193  }
Sequence< PRMClassElement< GUM_SCALAR > * > * __chain
The sequence of PRMClassElement<GUM_SCALAR> composing the slot chain.
Definition: PRMSlotChain.h:199

+ Here is the call graph for this function:

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

Returns the string representation of a PRMObject.

Definition at line 80 of file PRMObject.h.

References gum::prm::PRMObject::CLASS, gum::prm::PRMObject::CLASS_ELT, gum::prm::PRMObject::INSTANCE, gum::prm::PRMObject::PRM_INTERFACE, gum::prm::PRMObject::SYSTEM, and gum::prm::PRMObject::TYPE.

Referenced by gum::prm::operator<<().

80  {
81  switch (type) {
82  case prm_type::CLASS: return "PRMType::CLASS";
83 
84  case prm_type::CLASS_ELT: return "PRMType::CLASS_ELT";
85 
86  case prm_type::TYPE: return "PRMType::TYPE";
87 
88  case prm_type::SYSTEM: return "PRMType::SYSTEM";
89 
90  case prm_type::INSTANCE: return "PRMType::INSTANCE";
91 
92  case prm_type::PRM_INTERFACE: return "PRMType::PRM_INTERFACE";
93 
94  default: return "unknown";
95  }
96  }

+ Here is the caller graph for this function:

template<typename GUM_SCALAR>
static std::string gum::prm::PRMClassElement< GUM_SCALAR >::enum2str ( ClassElementType  type)
inlinestaticinherited

Returns true if obj_ptr is of type PRMReferenceSlot.

Definition at line 98 of file PRMClassElement.h.

98  {
99  switch (type) {
100  case prm_attribute: return "prm_attribute";
101 
102  case prm_aggregate: return "prm_aggregate";
103 
104  case prm_refslot: return "prm_refslot";
105 
106  case prm_slotchain: return "prm_slotchain";
107 
108  case prm_parameter: return "prm_parameter";
109 
110  default: return "unknown";
111  }
112  }
virtual PRMType< GUM_SCALAR > & type()=0
Return a reference over the gum::PRMType of this class element.
template<typename GUM_SCALAR >
INLINE PRMAttribute< GUM_SCALAR > * gum::prm::PRMSlotChain< GUM_SCALAR >::getCastDescendant ( ) const
virtual

Raise a gum::OperationNotAllowed exception See gum::PRMClassElement<GUM_SCALAR>::getCastDescendant()

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

Definition at line 233 of file PRMSlotChain_tpl.h.

References GUM_ERROR.

233  {
234  GUM_ERROR(OperationNotAllowed, "This is a slotchain");
235  }
#define GUM_ERROR(type, msg)
Definition: exceptions.h:66
template<typename GUM_SCALAR >
INLINE NodeId gum::prm::PRMClassElement< GUM_SCALAR >::id ( ) const
inherited

Returns the NodeId of this element in it's class DAG.

Definition at line 50 of file PRMClassElement_tpl.h.

References gum::prm::PRMClassElement< GUM_SCALAR >::__id.

Referenced by gum::prm::PRMClass< GUM_SCALAR >::__addCastDescendants(), gum::prm::PRMInterface< GUM_SCALAR >::__addCastDescendants(), gum::prm::PRMClass< GUM_SCALAR >::__checkInterface(), gum::prm::PRMClass< GUM_SCALAR >::__checkRefInterface(), gum::prm::PRMInstance< GUM_SCALAR >::__copyAggregates(), gum::prm::PRMInstance< GUM_SCALAR >::__copyAttribute(), gum::prm::PRMSlotChain< GUM_SCALAR >::__copyLastElt(), gum::prm::SVE< GUM_SCALAR >::__getAggPotential(), gum::prm::PRMSystem< GUM_SCALAR >::__groundPotential(), gum::prm::PRMClass< GUM_SCALAR >::__inheritClass(), gum::prm::InstanceBayesNet< GUM_SCALAR >::__init(), gum::prm::ClassBayesNet< GUM_SCALAR >::__init(), gum::prm::PRMInstance< GUM_SCALAR >::__instantiateSlotChain(), gum::prm::PRMInterface< GUM_SCALAR >::__overloadAttribute(), 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::SVED< GUM_SCALAR >::_marginal(), gum::prm::SVE< GUM_SCALAR >::_marginal(), gum::prm::PRMInterface< GUM_SCALAR >::add(), gum::prm::PRMClass< GUM_SCALAR >::add(), gum::prm::PRMClass< GUM_SCALAR >::addArc(), gum::prm::PRMClass< GUM_SCALAR >::inheritAggregates(), gum::prm::PRMClassElement< double >::isParameter(), gum::prm::PRMInterface< GUM_SCALAR >::overload(), gum::prm::PRMClass< GUM_SCALAR >::overload(), gum::prm::PRMClassElement< GUM_SCALAR >::setId(), and gum::prm::PRMFactory< GUM_SCALAR >::startAttribute().

50  {
51  return __id;
52  }
NodeId __id
The node&#39;s id of this element.

+ Here is the caller graph for this function:

template<typename GUM_SCALAR>
static INLINE bool gum::prm::PRMClassElement< GUM_SCALAR >::isAggregate ( const PRMClassElement< GUM_SCALAR > &  elt)
inlinestaticinherited

Return true if obj is of type PRMAggregate.

Definition at line 125 of file PRMClassElement.h.

Referenced by gum::prm::PRMClass< GUM_SCALAR >::__checkInterface(), gum::prm::StructuredInference< GUM_SCALAR >::CData::CData(), gum::prm::PRMClassElementContainer< GUM_SCALAR >::setInputNode(), and gum::prm::PRMClassElementContainer< GUM_SCALAR >::setOutputNode().

125  {
126  return elt.elt_type() == prm_aggregate;
127  }

+ Here is the caller graph for this function:

template<typename GUM_SCALAR>
static INLINE bool gum::prm::PRMClassElement< GUM_SCALAR >::isAttribute ( const PRMClassElement< GUM_SCALAR > &  elt)
inlinestaticinherited

Returns true if obj_ptr is of type PRMAttribute.

Definition at line 120 of file PRMClassElement.h.

Referenced by gum::prm::PRMClass< GUM_SCALAR >::__checkInterface().

120  {
121  return elt.elt_type() == prm_attribute;
122  }

+ Here is the caller graph for this function:

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

Returns true if obj_ptr is of type Class.

Definition at line 99 of file PRMObject.h.

References gum::prm::PRMObject::CLASS, and gum::prm::PRMObject::obj_type().

Referenced by gum::prm::PRMClass< GUM_SCALAR >::scope(), and gum::prm::PRMFactory< GUM_SCALAR >::startAttribute().

99  {
100  return obj.obj_type() == prm_type::CLASS;
101  }

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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

Returns true if obj_ptr is of type PRMInstance.

Definition at line 109 of file PRMObject.h.

References gum::prm::PRMObject::INSTANCE, gum::prm::PRMObject::name(), gum::prm::PRMObject::obj_type(), gum::prm::PRMObject::operator!=(), gum::prm::PRMObject::operator=(), gum::prm::PRMObject::operator==(), gum::prm::PRMObject::PRMObject(), and gum::prm::PRMObject::~PRMObject().

109  {
110  return obj.obj_type() == prm_type::INSTANCE;
111  }

+ Here is the call graph for this function:

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

Returns true if obj_ptr is of type PRMInterface.

Definition at line 104 of file PRMObject.h.

References gum::prm::PRMObject::obj_type(), and gum::prm::PRMObject::PRM_INTERFACE.

104  {
105  return obj.obj_type() == prm_type::PRM_INTERFACE;
106  }

+ Here is the call graph for this function:

template<typename GUM_SCALAR >
INLINE bool gum::prm::PRMSlotChain< GUM_SCALAR >::isMultiple ( ) const

Return true if this slot chain contains at least one multiple reference slot.

Definition at line 227 of file PRMSlotChain_tpl.h.

References gum::prm::PRMSlotChain< GUM_SCALAR >::__isMultiple.

Referenced by gum::prm::PRMFactory< GUM_SCALAR >::__addParent(), and gum::prm::PRMInstance< GUM_SCALAR >::__instantiateSlotChain().

227  {
228  return __isMultiple;
229  }
bool __isMultiple
Flag indicating if this slot chain is multiple or not.
Definition: PRMSlotChain.h:202

+ Here is the caller graph for this function:

template<typename GUM_SCALAR>
static INLINE bool gum::prm::PRMClassElement< GUM_SCALAR >::isParameter ( const PRMClassElement< GUM_SCALAR > &  elt)
inlinestaticinherited

Return true if obj is of type PRMParameter.

Definition at line 135 of file PRMClassElement.h.

135  {
136  return elt.elt_type() == prm_parameter;
137  }
template<typename GUM_SCALAR>
static INLINE bool gum::prm::PRMClassElement< GUM_SCALAR >::isReferenceSlot ( const PRMClassElement< GUM_SCALAR > &  elt)
inlinestaticinherited

Returns true if obj_ptr is of type PRMReferenceSlot.

Definition at line 115 of file PRMClassElement.h.

115  {
116  return elt.elt_type() == prm_refslot;
117  }
template<typename GUM_SCALAR>
static INLINE bool gum::prm::PRMClassElement< GUM_SCALAR >::isSlotChain ( const PRMClassElement< GUM_SCALAR > &  elt)
inlinestaticinherited

Return true if obj is of type PRMSlotChain.

Definition at line 130 of file PRMClassElement.h.

Referenced by gum::prm::PRMFactory< GUM_SCALAR >::__retrieveInputs().

130  {
131  return elt.elt_type() == prm_slotchain;
132  }

+ Here is the caller graph for this function:

template<typename GUM_SCALAR >
INLINE PRMClassElement< GUM_SCALAR > & gum::prm::PRMSlotChain< GUM_SCALAR >::lastElt ( )

Returns the last element of the slot chain, typically this is an gum::PRMAttribute or a gum::PRMAggregate.

Definition at line 196 of file PRMSlotChain_tpl.h.

References gum::prm::PRMSlotChain< GUM_SCALAR >::__chain.

Referenced by gum::prm::ClassDependencyGraph< GUM_SCALAR >::__addArcs(), gum::prm::PRMInstance< GUM_SCALAR >::__addReferingInstance(), gum::prm::PRMSystem< GUM_SCALAR >::__groundPotential(), gum::prm::PRMInstance< GUM_SCALAR >::__instantiateSlotChain(), gum::prm::PRMClass< GUM_SCALAR >::__overloadReference(), gum::prm::PRMFactory< GUM_SCALAR >::__retrieveInputs(), gum::prm::gspan::StrictSearch< GUM_SCALAR >::__str(), gum::prm::StructuredInference< GUM_SCALAR >::__str(), gum::prm::PRMClass< GUM_SCALAR >::addArc(), and gum::prm::PRMSlotChain< GUM_SCALAR >::PRMSlotChain().

196  {
197  return *(__chain->back());
198  }
Sequence< PRMClassElement< GUM_SCALAR > * > * __chain
The sequence of PRMClassElement<GUM_SCALAR> composing the slot chain.
Definition: PRMSlotChain.h:199

+ Here is the caller graph for this function:

template<typename GUM_SCALAR >
INLINE const PRMClassElement< GUM_SCALAR > & gum::prm::PRMSlotChain< GUM_SCALAR >::lastElt ( ) const

Returns the last element of the slot chain, typically this is an gum::PRMAttribute or a gum::PRMAggregate.

Definition at line 202 of file PRMSlotChain_tpl.h.

References gum::prm::PRMSlotChain< GUM_SCALAR >::__chain.

202  {
203  return *(__chain->back());
204  }
Sequence< PRMClassElement< GUM_SCALAR > * > * __chain
The sequence of PRMClassElement<GUM_SCALAR> composing the slot chain.
Definition: PRMSlotChain.h:199
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 76 of file PRMObject.h.

Referenced by gum::prm::PRMClassElement< GUM_SCALAR >::cast(), gum::prm::decomposePath(), gum::prm::PRMAggregate< GUM_SCALAR >::PRMAggregate(), gum::prm::PRMFormAttribute< GUM_SCALAR >::PRMFormAttribute(), gum::prm::PRMReferenceSlot< GUM_SCALAR >::PRMReferenceSlot(), gum::prm::PRMScalarAttribute< GUM_SCALAR >::PRMScalarAttribute(), and gum::prm::PRMSlotChain< GUM_SCALAR >::PRMSlotChain().

76 { return "("; }

+ Here is the caller graph for this function:

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

Returns the name of this object.

Definition at line 32 of file PRMObject_inl.h.

References gum::prm::PRMObject::__name.

Referenced by 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::PRMSlotChain< GUM_SCALAR >::__copyLastElt(), gum::prm::PRMSystem< GUM_SCALAR >::__groundAttr(), gum::prm::PRMSystem< GUM_SCALAR >::__groundPotential(), gum::prm::PRMSystem< GUM_SCALAR >::__groundRef(), gum::prm::PRMClass< GUM_SCALAR >::__inheritClass(), gum::prm::PRMInterface< GUM_SCALAR >::__overloadAttribute(), 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::__print_attribute__(), gum::prm::__print_instance__(), gum::prm::gspan::StrictSearch< GUM_SCALAR >::__str(), gum::prm::StructuredInference< GUM_SCALAR >::__str(), gum::prm::PRMInterface< GUM_SCALAR >::add(), gum::prm::PRMSystem< GUM_SCALAR >::add(), gum::prm::PRMClass< 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::o3prmr::O3prmrInterpreter::findAttributeName(), gum::prm::o3prmr::O3prmrInterpreter::findInstanceName(), gum::prm::PRMInterface< GUM_SCALAR >::get(), gum::prm::PRMSystem< GUM_SCALAR >::get(), gum::prm::PRMClass< GUM_SCALAR >::get(), gum::prm::PRMSystem< GUM_SCALAR >::getArray(), gum::prm::PRMSystem< GUM_SCALAR >::getArrayType(), gum::prm::PRMFormAttribute< GUM_SCALAR >::getCastDescendant(), gum::prm::PRMScalarAttribute< GUM_SCALAR >::getCastDescendant(), gum::prm::PRMAggregate< GUM_SCALAR >::getCastDescendant(), gum::prm::PRMSystem< GUM_SCALAR >::groundedBN(), gum::prm::PRMClass< GUM_SCALAR >::inheritAggregates(), gum::prm::PRMClass< GUM_SCALAR >::isCastDescendant(), gum::prm::PRMObject::isInstance(), gum::prm::PRMObject::name(), gum::prm::PRMType< GUM_SCALAR >::name(), gum::prm::PRMFormAttribute< GUM_SCALAR >::newFactory(), gum::prm::PRMScalarAttribute< GUM_SCALAR >::newFactory(), gum::prm::PRMType< GUM_SCALAR >::operator!=(), gum::prm::PRMObject::operator!=(), operator<<(), gum::prm::PRMType< GUM_SCALAR >::operator==(), gum::prm::PRMObject::operator==(), gum::prm::PRMInterface< GUM_SCALAR >::operator[](), gum::prm::PRMClass< GUM_SCALAR >::operator[](), gum::prm::PRMInterface< GUM_SCALAR >::overload(), gum::prm::PRMClass< GUM_SCALAR >::overload(), gum::prm::PRMAggregate< GUM_SCALAR >::PRMAggregate(), gum::prm::PRMFormAttribute< GUM_SCALAR >::PRMFormAttribute(), 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::PRMClassElementContainer< GUM_SCALAR >::setInputNode(), gum::prm::PRMClassElementContainer< GUM_SCALAR >::setOutputNode(), and gum::prm::PRMAggregate< double >::str2enum().

32 { return __name; }
std::string __name
Definition: PRMObject.h:197
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 wath you are doing !

Definition at line 36 of file PRMObject_inl.h.

References gum::prm::PRMObject::__name, and gum::prm::PRMObject::name().

36 { __name = name; }
const std::string & name() const
Returns the name of this object.
Definition: PRMObject_inl.h:32
std::string __name
Definition: PRMObject.h:197

+ Here is the call graph for this function:

template<typename GUM_SCALAR >
INLINE PRMObject::prm_type gum::prm::PRMClassElement< GUM_SCALAR >::obj_type ( ) const
virtualinherited
See also
gum::PRMObject::obj_type().

Implements gum::prm::PRMObject.

Definition at line 55 of file PRMClassElement_tpl.h.

References gum::prm::PRMObject::CLASS_ELT.

Referenced by gum::prm::PRMClassElement< double >::isParameter().

+ Here is the caller graph for this function:

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::PRMObject::__name, and gum::prm::PRMObject::name().

Referenced by gum::prm::PRMObject::isInstance().

46  {
47  return __name != obj.name();
48  }
std::string __name
Definition: PRMObject.h:197

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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

Copy operator. Don't use it.

Definition at line 153 of file PRMSlotChain_tpl.h.

References GUM_ERROR.

Referenced by gum::prm::PRMSlotChain< GUM_SCALAR >::PRMSlotChain().

153  {
154  GUM_ERROR(FatalError,
155  "Illegal call to gum::SlotChain<GUM_SCALAR> copy constructor.");
156  }
#define GUM_ERROR(type, msg)
Definition: exceptions.h:66

+ Here is the caller graph for this function:

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 40 of file PRMObject_inl.h.

References gum::prm::PRMObject::__name, and gum::prm::PRMObject::name().

Referenced by gum::prm::PRMObject::isInstance().

40  {
41  return __name == obj.name();
42  }
std::string __name
Definition: PRMObject.h:197

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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 77 of file PRMObject.h.

Referenced by gum::prm::PRMClassElement< GUM_SCALAR >::cast(), gum::prm::decomposePath(), gum::prm::PRMAggregate< GUM_SCALAR >::PRMAggregate(), gum::prm::PRMFormAttribute< GUM_SCALAR >::PRMFormAttribute(), gum::prm::PRMReferenceSlot< GUM_SCALAR >::PRMReferenceSlot(), gum::prm::PRMScalarAttribute< GUM_SCALAR >::PRMScalarAttribute(), and gum::prm::PRMSlotChain< GUM_SCALAR >::PRMSlotChain().

77 { return ")"; }

+ Here is the caller graph for this function:

template<typename GUM_SCALAR >
INLINE const std::string & gum::prm::PRMClassElement< GUM_SCALAR >::safeName ( ) const
inherited

Returns the safe name of this PRMClassElement, if any.

This will only work if this PRMClassElement is an PRMAttribute or an PRMAggregate.

Returns
Returns the safe name of this PRMClassElement.
Exceptions
NotFound&Raised if this PRMClassElement does not have any safe name.

Definition at line 65 of file PRMClassElement_tpl.h.

References gum::prm::PRMClassElement< GUM_SCALAR >::_safeName.

Referenced by gum::prm::PRMClass< GUM_SCALAR >::__addCastDescendants(), gum::prm::PRMInterface< GUM_SCALAR >::__addCastDescendants(), gum::prm::PRMFactory< GUM_SCALAR >::__addParent(), gum::prm::PRMInstance< GUM_SCALAR >::__copyAttributeCPF(), gum::prm::SVED< GUM_SCALAR >::__getAggPotential(), gum::prm::PRMSystem< GUM_SCALAR >::__groundPotential(), gum::prm::PRMSystem< GUM_SCALAR >::__groundRef(), gum::prm::PRMClass< GUM_SCALAR >::__inheritClass(), gum::prm::PRMClass< GUM_SCALAR >::__overloadAggregate(), gum::prm::PRMInterface< GUM_SCALAR >::__overloadAttribute(), 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::__print_attribute__(), gum::prm::gspan::StrictSearch< GUM_SCALAR >::__str(), gum::prm::StructuredInference< GUM_SCALAR >::__str(), gum::prm::PRMClassElementContainer< GUM_SCALAR >::_getIOFlag(), gum::prm::PRMClassElementContainer< GUM_SCALAR >::_setIOFlag(), gum::prm::PRMInterface< GUM_SCALAR >::add(), gum::prm::PRMClass< GUM_SCALAR >::add(), gum::prm::PRMFactory< GUM_SCALAR >::addAggregator(), gum::prm::PRMFactory< GUM_SCALAR >::addAttribute(), gum::prm::PRMClassElementContainer< GUM_SCALAR >::belongsTo(), gum::prm::PRMClass< GUM_SCALAR >::inheritAggregates(), gum::prm::PRMClassElement< double >::isParameter(), gum::prm::PRMClassElementContainer< GUM_SCALAR >::setInputNode(), and gum::prm::PRMClassElementContainer< GUM_SCALAR >::setOutputNode().

65  {
66  return _safeName;
67  }
std::string _safeName
The safe name of this PRMClassElement.

+ Here is the caller graph for this function:

template<typename GUM_SCALAR >
INLINE void gum::prm::PRMClassElement< GUM_SCALAR >::setId ( NodeId  id)
virtualinherited

Used to assign the id of this element.

Definition at line 60 of file PRMClassElement_tpl.h.

References gum::prm::PRMClassElement< GUM_SCALAR >::__id, and gum::prm::PRMClassElement< GUM_SCALAR >::id().

Referenced by gum::prm::PRMClass< GUM_SCALAR >::__addCastDescendants(), gum::prm::PRMInterface< GUM_SCALAR >::__addCastDescendants(), gum::prm::PRMClass< GUM_SCALAR >::__checkInterface(), gum::prm::PRMClass< GUM_SCALAR >::__checkRefInterface(), gum::prm::PRMSlotChain< GUM_SCALAR >::__copyLastElt(), gum::prm::PRMClass< GUM_SCALAR >::__inheritClass(), gum::prm::PRMInterface< GUM_SCALAR >::__inheritInterface(), gum::prm::PRMInterface< GUM_SCALAR >::__overloadAttribute(), 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::PRMInterface< GUM_SCALAR >::add(), gum::prm::PRMClass< GUM_SCALAR >::add(), gum::prm::PRMClass< GUM_SCALAR >::inheritAggregates(), gum::prm::PRMClass< GUM_SCALAR >::inheritReferenceSlots(), and gum::prm::PRMClassElement< double >::isParameter().

60  {
61  __id = id;
62  }
NodeId __id
The node&#39;s id of this element.
NodeId id() const
Returns the NodeId of this element in it&#39;s class DAG.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

template<typename GUM_SCALAR >
INLINE PRMType< GUM_SCALAR > & gum::prm::PRMSlotChain< GUM_SCALAR >::type ( )
virtual

This is similar to the following call: this->lastElt().type()

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

Definition at line 165 of file PRMSlotChain_tpl.h.

References gum::prm::PRMSlotChain< GUM_SCALAR >::__chain.

Referenced by gum::prm::PRMClass< GUM_SCALAR >::__inheritClass(), and gum::prm::PRMInstance< GUM_SCALAR >::__instantiateSlotChain().

165  {
166  return __chain->back()->type();
167  }
Sequence< PRMClassElement< GUM_SCALAR > * > * __chain
The sequence of PRMClassElement<GUM_SCALAR> composing the slot chain.
Definition: PRMSlotChain.h:199

+ Here is the caller graph for this function:

template<typename GUM_SCALAR >
INLINE const PRMType< GUM_SCALAR > & gum::prm::PRMSlotChain< GUM_SCALAR >::type ( ) const
virtual

This is similar to the following call: this->lastElt().type()

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

Definition at line 170 of file PRMSlotChain_tpl.h.

References gum::prm::PRMSlotChain< GUM_SCALAR >::__chain.

170  {
171  return __chain->back()->type();
172  }
Sequence< PRMClassElement< GUM_SCALAR > * > * __chain
The sequence of PRMClassElement<GUM_SCALAR> composing the slot chain.
Definition: PRMSlotChain.h:199

Member Data Documentation

template<typename GUM_SCALAR>
bool gum::prm::PRMSlotChain< GUM_SCALAR >::__isMultiple
private

Flag indicating if this slot chain is multiple or not.

Definition at line 202 of file PRMSlotChain.h.

Referenced by gum::prm::PRMSlotChain< GUM_SCALAR >::isMultiple(), and gum::prm::PRMSlotChain< GUM_SCALAR >::PRMSlotChain().


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