aGrUM  0.16.0
gum::prm::PRMReferenceSlot< GUM_SCALAR > Class Template Reference

A PRMReferenceSlot represent a relation between two PRMClassElementContainer. More...

#include <PRMObject.h>

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

Public Member Functions

Protected constructors & destructor.
 PRMReferenceSlot (const std::string &name, PRMClassElementContainer< GUM_SCALAR > &type, bool isArray=false)
 Default constructor. More...
 
virtual ~PRMReferenceSlot ()
 Destructor. More...
 
Getters & setters
virtual PRMClassElement< GUM_SCALAR >::ClassElementType elt_type () const
 Implementation of the pure virtual method of PRMObject. More...
 
PRMClassElementContainer< GUM_SCALAR > & slotType ()
 Returns the type of this slot, which is a PRMClassElementContainer (it is not the type of PRMObject). More...
 
const PRMClassElementContainer< GUM_SCALAR > & slotType () const
 Returns the type of this slot, which is a PRMClassElementContainer (it is not the type of PRMObject). More...
 
bool isArray () const
 Returns true if this reference slot is an array. More...
 
virtual void addParent (const PRMClassElement< GUM_SCALAR > &elt)
 See gum::PRMClassElement::addParent(). More...
 
virtual void addChild (const PRMClassElement< GUM_SCALAR > &elt)
 See gum::PRMClassElement::addChild(). More...
 
Not allowed operations on a PRMReferenceSlot.
virtual PRMTypetype ()
 Raise an OperationNotAllowed. See gum::PRMClassElement::type(). More...
 
virtual const PRMTypetype () const
 Raise an OperationNotAllowed. See gum::PRMClassElement::type(). More...
 
virtual Potential< GUM_SCALAR > & cpf ()
 Raise an OperationNotAllowed. See gum::PRMClassElement::cpf(). More...
 
virtual const Potential< GUM_SCALAR > & cpf () const
 Raise an OperationNotAllowed. See gum::PRMClassElement::cpf(). More...
 
virtual PRMAttribute< GUM_SCALAR > * getCastDescendant () const
 Raise an OperationNotAllowed. See gum::PRMClassElement::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 &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< GUM_SCALAR > &elt)
 Returns true if obj_ptr is of type PRMReferenceSlot. More...
 
static INLINE bool isAttribute (const PRMClassElement< GUM_SCALAR > &elt)
 Returns true if obj_ptr is of type PRMAttribute. More...
 
static INLINE bool isAggregate (const PRMClassElement< GUM_SCALAR > &elt)
 Return true if obj is of type PRMAggregate. More...
 
static INLINE bool isSlotChain (const PRMClassElement< GUM_SCALAR > &elt)
 Return true if obj is of type PRMSlotChain. More...
 
static INLINE bool isParameter (const PRMClassElement< GUM_SCALAR > &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...
 

Detailed Description

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

A PRMReferenceSlot represent a relation between two PRMClassElementContainer.

A reference slot is a relation between two PRMClassElementContainer in a PRM. A PRMReferenceSlot is considered as an element of a PRMClassElementContainer which slot type is a PRMClassElementContainer.

A PRMReferenceSlot is defined by it's slot type (i.e. it's range), it's PRMClassElementContainer (it's domain), it's name and if it is a multiple reference (the isArray() flag).

See also
PRM PRMFactory PRMClassElementContainer PRMClassElement

Definition at line 223 of file PRMObject.h.

Member Enumeration Documentation

◆ ClassElementType

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 95 of file PRMClassElement.h.

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

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

Constructor & Destructor Documentation

◆ PRMReferenceSlot() [1/2]

template<typename GUM_SCALAR>
gum::prm::PRMReferenceSlot< GUM_SCALAR >::PRMReferenceSlot ( const std::string &  name,
PRMClassElementContainer< GUM_SCALAR > &  type,
bool  isArray = false 
)

Default constructor.

Parameters
nameThe name of this element.
typeThe type of this reference slot.
isArrayDetermine if this reference slot is multiple or not.

Definition at line 35 of file PRMReferenceSlot_tpl.h.

38  :
39  PRMClassElement< GUM_SCALAR >(name),
40  __slotType(type), __isArray(isArray) {
41  GUM_CONSTRUCTOR(PRMReferenceSlot);
42  this->_safeName =
44  }
const std::string & name() const
Returns the name of this object.
Definition: PRMType_inl.h:68
const std::string & name() const
Returns the name of this object.
Definition: PRMObject_inl.h:35
PRMClassElementContainer< GUM_SCALAR > & __slotType
The type of this PRMReferenceSlot.
PRMReferenceSlot(const std::string &name, PRMClassElementContainer< GUM_SCALAR > &type, bool isArray=false)
Default constructor.
bool __isArray
Flag indicating if this slot is an array.
static std::string LEFT_CAST()
Enumeration of the different types of objects handled by a PRM.
Definition: PRMObject.h:79
static std::string RIGHT_CAST()
Enumeration of the different types of objects handled by a PRM.
Definition: PRMObject.h:80
std::string _safeName
The safe name of this PRMClassElement.
virtual PRMType & type()
Raise an OperationNotAllowed. See gum::PRMClassElement::type().

◆ ~PRMReferenceSlot()

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

Destructor.

Definition at line 48 of file PRMReferenceSlot_tpl.h.

48  {
49  GUM_DESTRUCTOR(PRMReferenceSlot);
50  }
PRMReferenceSlot(const std::string &name, PRMClassElementContainer< GUM_SCALAR > &type, bool isArray=false)
Default constructor.

◆ PRMReferenceSlot() [2/2]

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

Copy constructor. Don't use it.

Definition at line 53 of file PRMReferenceSlot_tpl.h.

54  :
55  PRMClassElement< GUM_SCALAR >(source),
56  __slotType(source.__slotType), __isArray(source.__isArray) {
57  GUM_CONS_CPY(PRMReferenceSlot);
58  GUM_ERROR(FatalError,
59  "illegal call to gum::ReferenceSlot copy constructor.");
60  }
PRMClassElementContainer< GUM_SCALAR > & __slotType
The type of this PRMReferenceSlot.
PRMReferenceSlot(const std::string &name, PRMClassElementContainer< GUM_SCALAR > &type, bool isArray=false)
Default constructor.
bool __isArray
Flag indicating if this slot is an array.
#define GUM_ERROR(type, msg)
Definition: exceptions.h:55

Member Function Documentation

◆ addChild()

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

See gum::PRMClassElement::addChild().

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

Definition at line 125 of file PRMReferenceSlot_tpl.h.

126  {}

◆ addParent()

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

See gum::PRMClassElement::addParent().

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

Definition at line 121 of file PRMReferenceSlot_tpl.h.

122  {}

◆ cast()

template<typename GUM_SCALAR >
INLINE std::string gum::prm::PRMClassElement< GUM_SCALAR >::cast ( const PRMType 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 76 of file PRMClassElement_tpl.h.

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

76  {
77  if (type().isSubTypeOf(t)) {
78  return PRMObject::LEFT_CAST() + t.name() + PRMObject::RIGHT_CAST()
79  + name();
80  } else {
81  GUM_ERROR(OperationNotAllowed, "illegal cast");
82  }
83  }
const std::string & name() const
Returns the name of this object.
Definition: PRMObject_inl.h:35
virtual PRMType & type()=0
Return a reference over the gum::PRMType of this class element.
static std::string LEFT_CAST()
Enumeration of the different types of objects handled by a PRM.
Definition: PRMObject.h:79
static std::string RIGHT_CAST()
Enumeration of the different types of objects handled by a PRM.
Definition: PRMObject.h:80
#define GUM_ERROR(type, msg)
Definition: exceptions.h:55
+ Here is the caller graph for this function:

◆ cpf() [1/2]

template<typename GUM_SCALAR >
INLINE Potential< GUM_SCALAR > & gum::prm::PRMReferenceSlot< GUM_SCALAR >::cpf ( )
virtual

Raise an OperationNotAllowed. See gum::PRMClassElement::cpf().

Definition at line 103 of file PRMReferenceSlot_tpl.h.

103  {
104  GUM_ERROR(OperationNotAllowed, "This is a ReferenceSlot.");
105  }
#define GUM_ERROR(type, msg)
Definition: exceptions.h:55

◆ cpf() [2/2]

template<typename GUM_SCALAR >
INLINE const Potential< GUM_SCALAR > & gum::prm::PRMReferenceSlot< GUM_SCALAR >::cpf ( ) const
virtual

Raise an OperationNotAllowed. See gum::PRMClassElement::cpf().

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

Definition at line 109 of file PRMReferenceSlot_tpl.h.

109  {
110  GUM_ERROR(OperationNotAllowed, "This is a ReferenceSlot.");
111  }
#define GUM_ERROR(type, msg)
Definition: exceptions.h:55

◆ elt_type()

template<typename GUM_SCALAR >
INLINE PRMClassElement< GUM_SCALAR >::ClassElementType gum::prm::PRMReferenceSlot< GUM_SCALAR >::elt_type ( ) const
virtual

Implementation of the pure virtual method of PRMObject.

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

Definition at line 71 of file PRMReferenceSlot_tpl.h.

Referenced by gum::prm::PRMClass< double >::__checkRefInterface().

71  {
72  return this->prm_refslot;
73  }
+ Here is the caller graph for this function:

◆ enum2str() [1/2]

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.

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<<().

83  {
84  switch (type) {
85  case prm_type::CLASS: return "PRMType::CLASS";
86 
87  case prm_type::CLASS_ELT: return "PRMType::CLASS_ELT";
88 
89  case prm_type::TYPE: return "PRMType::TYPE";
90 
91  case prm_type::SYSTEM: return "PRMType::SYSTEM";
92 
93  case prm_type::INSTANCE: return "PRMType::INSTANCE";
94 
95  case prm_type::PRM_INTERFACE: return "PRMType::PRM_INTERFACE";
96 
97  default: return "unknown";
98  }
99  }
+ Here is the caller graph for this function:

◆ enum2str() [2/2]

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 103 of file PRMClassElement.h.

103  {
104  switch (type) {
105  case prm_attribute: return "prm_attribute";
106 
107  case prm_aggregate: return "prm_aggregate";
108 
109  case prm_refslot: return "prm_refslot";
110 
111  case prm_slotchain: return "prm_slotchain";
112 
113  case prm_parameter: return "prm_parameter";
114 
115  default: return "unknown";
116  }
117  }
virtual PRMType & type()=0
Return a reference over the gum::PRMType of this class element.

◆ getCastDescendant()

template<typename GUM_SCALAR >
INLINE PRMAttribute< GUM_SCALAR > * gum::prm::PRMReferenceSlot< GUM_SCALAR >::getCastDescendant ( ) const
virtual

Raise an OperationNotAllowed. See gum::PRMClassElement::getCastDescendant().

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

Definition at line 115 of file PRMReferenceSlot_tpl.h.

115  {
116  GUM_ERROR(OperationNotAllowed, "This is a ReferenceSlot.");
117  }
#define GUM_ERROR(type, msg)
Definition: exceptions.h:55

◆ id()

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 55 of file PRMClassElement_tpl.h.

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

55  {
56  return __id;
57  }
NodeId __id
The node&#39;s id of this element.
+ Here is the caller graph for this function:

◆ isAggregate()

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 131 of file PRMClassElement.h.

Referenced by gum::prm::StructuredInference< GUM_SCALAR >::CData::CData().

131  {
132  return elt.elt_type() == prm_aggregate;
133  }
+ Here is the caller graph for this function:

◆ isArray()

template<typename GUM_SCALAR >
INLINE bool gum::prm::PRMReferenceSlot< GUM_SCALAR >::isArray ( ) const

Returns true if this reference slot is an array.

Definition at line 88 of file PRMReferenceSlot_tpl.h.

88  {
89  return __isArray;
90  }
bool __isArray
Flag indicating if this slot is an array.

◆ isAttribute()

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 126 of file PRMClassElement.h.

126  {
127  return elt.elt_type() == prm_attribute;
128  }

◆ isClass()

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

Returns true if obj_ptr is of type Class.

Definition at line 102 of file PRMObject.h.

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

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

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

◆ isInstance()

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

Returns true if obj_ptr is of type PRMInstance.

Definition at line 112 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().

112  {
113  return obj.obj_type() == prm_type::INSTANCE;
114  }
+ 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 107 of file PRMObject.h.

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

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

◆ isParameter()

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 141 of file PRMClassElement.h.

141  {
142  return elt.elt_type() == prm_parameter;
143  }

◆ isReferenceSlot()

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 121 of file PRMClassElement.h.

121  {
122  return elt.elt_type() == prm_refslot;
123  }

◆ isSlotChain()

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 136 of file PRMClassElement.h.

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

136  {
137  return elt.elt_type() == prm_slotchain;
138  }
+ Here is the caller graph for this function:

◆ 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.

Referenced by gum::prm::decomposePath(), gum::prm::PRMFormAttribute< GUM_SCALAR >::PRMFormAttribute(), and gum::prm::PRMScalarAttribute< GUM_SCALAR >::PRMScalarAttribute().

79 { return "("; }
+ Here is the caller graph for this function:

◆ name() [1/2]

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

Returns the name of this object.

Definition at line 35 of file PRMObject_inl.h.

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

Referenced by gum::prm::SVE< GUM_SCALAR >::__addDelayedVariable(), gum::prm::PRMClass< double >::__addIOInterfaceFlags(), gum::prm::PRMFactory< GUM_SCALAR >::__addParent(), gum::prm::PRMInstance< GUM_SCALAR >::__addReferingInstance(), gum::prm::PRMClass< double >::__checkInterface(), gum::prm::PRMFactory< GUM_SCALAR >::__checkInterfaceImplementation(), gum::prm::PRMClass< double >::__checkInterfaces(), gum::prm::o3prm::O3ClassFactory< GUM_SCALAR >::__checkRawCPT(), gum::prm::PRMClass< double >::__checkRefInterface(), gum::prm::PRMClass< double >::__checkRefInterfaces(), gum::prm::o3prm::O3ClassFactory< GUM_SCALAR >::__checkRuleCPTSumsTo1(), gum::prm::PRMInstance< GUM_SCALAR >::__copyAggregates(), gum::prm::PRMInstance< GUM_SCALAR >::__copyAttribute(), gum::prm::PRMSlotChain< double >::__copyLastElt(), gum::prm::PRMSystem< double >::__groundAttr(), gum::prm::PRMSystem< double >::__groundPotential(), gum::prm::PRMSystem< double >::__groundRef(), gum::prm::PRMClass< double >::__inheritClass(), gum::prm::PRMInterface< double >::__overloadAttribute(), gum::prm::PRMClass< double >::__overloadAttribute(), gum::prm::PRMClass< double >::__overloadParameter(), gum::prm::PRMClass< double >::__overloadReference(), gum::prm::PRMInterface< double >::__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< double >::add(), gum::prm::PRMSystem< double >::add(), gum::prm::PRMClass< double >::add(), gum::prm::PRMFactory< GUM_SCALAR >::addAggregator(), gum::prm::PRMFormAttribute< GUM_SCALAR >::addParent(), gum::prm::PRMScalarAttribute< GUM_SCALAR >::addParent(), gum::prm::PRMFormAttribute< GUM_SCALAR >::copy(), gum::prm::PRMScalarAttribute< GUM_SCALAR >::copy(), gum::prm::o3prmr::O3prmrInterpreter::findAttributeName(), gum::prm::o3prmr::O3prmrInterpreter::findInstanceName(), gum::prm::PRMFormAttribute< GUM_SCALAR >::getCastDescendant(), gum::prm::PRMScalarAttribute< GUM_SCALAR >::getCastDescendant(), gum::prm::PRMClass< double >::inheritAggregates(), gum::prm::PRMClass< double >::isCastDescendant(), gum::prm::PRMObject::isInstance(), gum::prm::PRMObject::name(), gum::prm::PRMType::name(), gum::prm::PRMFormAttribute< GUM_SCALAR >::newFactory(), gum::prm::PRMScalarAttribute< GUM_SCALAR >::newFactory(), gum::prm::PRMType::operator!=(), gum::prm::PRMObject::operator!=(), operator<<(), gum::prm::PRMType::operator==(), gum::prm::PRMObject::operator==(), gum::prm::PRMClass< double >::overload(), gum::prm::PRMInterface< double >::overload(), gum::prm::PRMFormAttribute< GUM_SCALAR >::PRMFormAttribute(), gum::prm::PRMReferenceSlot< double >::PRMReferenceSlot(), gum::prm::PRMScalarAttribute< GUM_SCALAR >::PRMScalarAttribute(), gum::prm::PRMFactory< GUM_SCALAR >::startClass(), gum::prm::PRMFactory< GUM_SCALAR >::startInterface(), gum::prm::PRMFactory< GUM_SCALAR >::startSystem(), and gum::prm::PRMAggregate< double >::str2enum().

35 { return __name; }
std::string __name
Definition: PRMObject.h:200

◆ 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 wath you are doing !

Definition at line 39 of file PRMObject_inl.h.

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

39 { __name = name; }
const std::string & name() const
Returns the name of this object.
Definition: PRMObject_inl.h:35
std::string __name
Definition: PRMObject.h:200
+ Here is the call graph for this function:

◆ obj_type()

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 60 of file PRMClassElement_tpl.h.

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

+ Here is the caller graph for this function:

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

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

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

49  {
50  return __name != obj.name();
51  }
std::string __name
Definition: PRMObject.h:200
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ operator=()

template<typename GUM_SCALAR>
PRMReferenceSlot< GUM_SCALAR > & gum::prm::PRMReferenceSlot< GUM_SCALAR >::operator= ( const PRMReferenceSlot< GUM_SCALAR > &  from)
private

Copy operator. Don't use it.

Definition at line 65 of file PRMReferenceSlot_tpl.h.

65  {
66  GUM_ERROR(FatalError, "illegal call to gum::ReferenceSlot copy operator.");
67  }
#define GUM_ERROR(type, msg)
Definition: exceptions.h:55

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

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

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

43  {
44  return __name == obj.name();
45  }
std::string __name
Definition: PRMObject.h:200
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ 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.

Referenced by gum::prm::decomposePath(), gum::prm::PRMFormAttribute< GUM_SCALAR >::PRMFormAttribute(), and gum::prm::PRMScalarAttribute< GUM_SCALAR >::PRMScalarAttribute().

80 { return ")"; }
+ Here is the caller graph for this function:

◆ safeName()

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 70 of file PRMClassElement_tpl.h.

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

70  {
71  return _safeName;
72  }
std::string _safeName
The safe name of this PRMClassElement.
+ Here is the caller graph for this function:

◆ setId()

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 65 of file PRMClassElement_tpl.h.

Referenced by gum::prm::PRMClass< double >::__addCastDescendants(), gum::prm::PRMInterface< double >::__addCastDescendants(), gum::prm::PRMClass< double >::__checkInterface(), gum::prm::PRMClass< double >::__checkRefInterface(), gum::prm::PRMSlotChain< double >::__copyLastElt(), gum::prm::PRMClass< double >::__inheritClass(), gum::prm::PRMInterface< double >::__inheritInterface(), gum::prm::PRMInterface< double >::__overloadAttribute(), gum::prm::PRMClass< double >::__overloadAttribute(), gum::prm::PRMClass< double >::__overloadParameter(), gum::prm::PRMClass< double >::__overloadReference(), gum::prm::PRMInterface< double >::__overloadReferenceSlot(), gum::prm::PRMInterface< double >::add(), gum::prm::PRMClass< double >::add(), gum::prm::PRMClass< double >::inheritAggregates(), gum::prm::PRMClass< double >::inheritParameters(), gum::prm::PRMClass< double >::inheritReferenceSlots(), gum::prm::PRMClass< double >::inheritSlotChains(), and gum::prm::PRMClassElement< double >::isParameter().

65  {
66  __id = id;
67  }
NodeId id() const
Returns the NodeId of this element in it&#39;s class DAG.
NodeId __id
The node&#39;s id of this element.
+ Here is the caller graph for this function:

◆ slotType() [1/2]

template<typename GUM_SCALAR >
INLINE PRMClassElementContainer< GUM_SCALAR > & gum::prm::PRMReferenceSlot< GUM_SCALAR >::slotType ( )

Returns the type of this slot, which is a PRMClassElementContainer (it is not the type of PRMObject).

Definition at line 77 of file PRMReferenceSlot_tpl.h.

Referenced by gum::prm::PRMFactory< GUM_SCALAR >::__buildSlotChain(), gum::prm::PRMFactory< GUM_SCALAR >::__checkInterfaceImplementation(), gum::prm::PRMInterface< double >::__checkOverloadLegality(), gum::prm::PRMClass< double >::__checkRefInterface(), gum::prm::PRMClass< double >::__overloadReference(), gum::prm::PRMInstance< GUM_SCALAR >::add(), and gum::prm::PRMSlotChain< double >::end().

77  {
78  return __slotType;
79  }
PRMClassElementContainer< GUM_SCALAR > & __slotType
The type of this PRMReferenceSlot.
+ Here is the caller graph for this function:

◆ slotType() [2/2]

template<typename GUM_SCALAR >
INLINE const PRMClassElementContainer< GUM_SCALAR > & gum::prm::PRMReferenceSlot< GUM_SCALAR >::slotType ( ) const

Returns the type of this slot, which is a PRMClassElementContainer (it is not the type of PRMObject).

Definition at line 83 of file PRMReferenceSlot_tpl.h.

83  {
84  return __slotType;
85  }
PRMClassElementContainer< GUM_SCALAR > & __slotType
The type of this PRMReferenceSlot.

◆ type() [1/2]

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

Raise an OperationNotAllowed. See gum::PRMClassElement::type().

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

Definition at line 93 of file PRMReferenceSlot_tpl.h.

93  {
94  GUM_ERROR(OperationNotAllowed, "This is a ReferenceSlot.");
95  }
#define GUM_ERROR(type, msg)
Definition: exceptions.h:55

◆ type() [2/2]

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

Raise an OperationNotAllowed. See gum::PRMClassElement::type().

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

Definition at line 98 of file PRMReferenceSlot_tpl.h.

98  {
99  GUM_ERROR(OperationNotAllowed, "This is a ReferenceSlot.");
100  }
#define GUM_ERROR(type, msg)
Definition: exceptions.h:55

Member Data Documentation

◆ __isArray

template<typename GUM_SCALAR>
bool gum::prm::PRMReferenceSlot< GUM_SCALAR >::__isArray
private

Flag indicating if this slot is an array.

Definition at line 168 of file PRMReferenceSlot.h.

◆ __slotType

template<typename GUM_SCALAR>
PRMClassElementContainer< GUM_SCALAR >& gum::prm::PRMReferenceSlot< GUM_SCALAR >::__slotType
private

The type of this PRMReferenceSlot.

Definition at line 165 of file PRMReferenceSlot.h.

◆ _safeName

template<typename GUM_SCALAR>
std::string gum::prm::PRMClassElement< GUM_SCALAR >::_safeName
protectedinherited

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