34 #include <agrum/PRM/PRM.h> 35 #include <agrum/PRM/PRMFactory.h> 36 #include <agrum/PRM/o3prm/O3NameSolver.h> 37 #include <agrum/PRM/o3prm/O3prm.h> 38 #include <agrum/tools/core/hashTable.h> 39 #include <agrum/tools/core/set.h> 41 #ifndef GUM_PRM_O3PRM_O3CLASS_FACTORY_H 42 # define GUM_PRM_O3PRM_O3CLASS_FACTORY_H 57 template <
typename GUM_SCALAR >
62 O3NameSolver< GUM_SCALAR >& solver,
63 ErrorsContainer& errors);
116 HashTable< std::string, O3Attribute* >& attrMap,
117 HashTable< std::string, O3Aggregate* >& aggMap,
118 HashTable< std::string, O3ReferenceSlot* >& refMap);
123 const PRMClassElementContainer< GUM_SCALAR >& type);
150 bool _checkParent_(
const PRMClass< GUM_SCALAR >& c,
const O3Label& prnt);
155 const O3Label& prnt);
157 bool _checkRawCPT_(
const PRMClass< GUM_SCALAR >& c, O3RawCPT& attr);
159 bool _checkRuleCPT_(
const PRMClass< GUM_SCALAR >& c, O3RuleCPT& attr);
164 const O3RuleCPT& attr,
165 const O3RuleCPT::O3Rule& rule);
168 const HashTable< std::string,
const PRMParameter< GUM_SCALAR >* >& scope,
169 O3RuleCPT::O3Rule& rule);
172 const O3RuleCPT& attr,
173 const O3RuleCPT::O3Rule& rule);
184 const O3Label& chain,
185 const std::string& s);
215 # include <agrum/PRM/o3prm/O3ClassFactory_tpl.h> 218 # ifndef GUM_NO_EXTERN_TEMPLATE_CLASS bool _checkLabelsValues_(const PRMClass< GUM_SCALAR > &c, const O3RuleCPT &attr, const O3RuleCPT::O3Rule &rule)
bool _checkLabelsNumber_(const O3RuleCPT &attr, const O3RuleCPT::O3Rule &rule)
void _completeAttribute_(PRMFactory< GUM_SCALAR > &factory, O3Class &c)
bool _checkReferenceSlot_(O3Class &c, O3ReferenceSlot &ref)
void completeAggregates()
const PRMType * _checkAggParents_(O3Class &o3class, O3Aggregate &agg)
O3ClassFactory< GUM_SCALAR > & operator=(O3ClassFactory< GUM_SCALAR > &&src)
bool _checkAndAddArcsToDag_()
void _addParamsToForms_(const HashTable< std::string, const PRMParameter< GUM_SCALAR > * > &scope, O3RuleCPT::O3Rule &rule)
PRM< GUM_SCALAR > * _prm_
void buildReferenceSlots()
INLINE void emplace(Args &&... args)
bool _checkRuleCPT_(const PRMClass< GUM_SCALAR > &c, O3RuleCPT &attr)
bool _checkParent_(const PRMClass< GUM_SCALAR > &c, const O3Label &prnt)
std::vector< O3Class *> _o3Classes_
O3ClassFactory(O3ClassFactory< GUM_SCALAR > &&src)
bool _checkAndAddNodesToDag_()
void _addReferenceSlots_(O3Class &c)
const PRMClassElement< GUM_SCALAR > * _resolveSlotChain_(const PRMClassElementContainer< GUM_SCALAR > &c, const O3Label &chain)
bool _checkAttributeForDeclaration_(O3Class &o3_c, O3Attribute &attr)
HashTable< NodeId, O3Class *> _nodeMap_
void buildImplementations()
bool _checkParametersNumber_(O3Aggregate &agg, Size n)
bool _checkSlotChainLink_(const PRMClassElementContainer< GUM_SCALAR > &c, const O3Label &chain, const std::string &s)
O3NameSolver< GUM_SCALAR > * _solver_
O3ClassFactory(PRM< GUM_SCALAR > &prm, O3PRM &o3_prm, O3NameSolver< GUM_SCALAR > &solver, ErrorsContainer &errors)
bool _checkImplementation_(O3Class &c, O3Label &i, HashTable< std::string, O3Attribute * > &attrMap, HashTable< std::string, O3Aggregate * > &aggMap, HashTable< std::string, O3ReferenceSlot * > &refMap)
bool _checkAggregateForCompletion_(O3Class &o3class, O3Aggregate &agg)
HashTable< std::string, gum::NodeId > _nameMap_
ParamScopeData(const std::string &s, const PRMReferenceSlot< GUM_SCALAR > &ref, Idx d)
void _setO3ClassCreationOrder_()
O3ClassFactory(const O3ClassFactory< GUM_SCALAR > &src)
Builds gum::prm::Class from gum::prm::o3prm::O3Class.
ErrorsContainer * _errors_
void _completeAggregates_(PRMFactory< GUM_SCALAR > &factory, O3Class &c)
bool _checkAggParameters_(O3Class &o3class, O3Aggregate &agg, const PRMType *t)
void _declareAggregates_(O3Class &c)
bool _checkParameterValue_(O3Aggregate &agg, const gum::prm::PRMType &t)
void _addParameters_(PRMFactory< GUM_SCALAR > &factory, O3Class &c)
HashTable< std::string, O3Class *> _classMap_
bool _checkRawCPT_(const PRMClass< GUM_SCALAR > &c, O3RawCPT &attr)
bool _checkRuleCPTSumsTo1_(const PRMClass< GUM_SCALAR > &c, const O3RuleCPT &attr, const O3RuleCPT::O3Rule &rule)
bool _checkAggregateForDeclaration_(O3Class &o3class, O3Aggregate &agg)
bool _checkRemoteParent_(const PRMClassElementContainer< GUM_SCALAR > &c, const O3Label &prnt)
bool _checkLocalParent_(const PRMClass< GUM_SCALAR > &c, const O3Label &prnt)
O3ClassFactory< GUM_SCALAR > & operator=(const O3ClassFactory< GUM_SCALAR > &src)
bool _checkAttributeForCompletion_(const O3Class &o3_c, O3Attribute &attr)
void completeAttributes()
bool _checkAggTypeLegality_(O3Class &o3class, O3Aggregate &agg)
void _declareAttribute_(O3Class &c)
bool _checkImplementation_(O3Class &c)
bool _checkImplementation_(O3Label &o3_type, const PRMClassElementContainer< GUM_SCALAR > &type)