aGrUM  0.14.2
O3InterfaceFactory.h
Go to the documentation of this file.
1 /**************************************************************************
2  * Copyright (C) 2005 by Pierre-Henri WUILLEMIN et Christophe GONZALES *
3  * {prenom.nom}_at_lip6.fr *
4  * *
5  * This program is free software; you can redistribute it and/or modify *
6  * it under the terms of the GNU General Public License as published by *
7  * the Free Software Foundation; either version 2 of the License, or *
8  * (at your option) any later version. *
9  * *
10  * This program is distributed in the hope that it will be useful, *
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of *
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
13  * GNU General Public License for more details. *
14  * *
15  * You should have received a copy of the GNU General Public License *
16  * along with this program; if not, write to the *
17  * Free Software Foundation, Inc., *
18  * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
19  ***************************************************************************/
20 
29 #include <memory>
30 #include <string>
31 
32 #include <agrum/PRM/PRM.h>
33 #include <agrum/PRM/PRMFactory.h>
35 #include <agrum/PRM/o3prm/O3prm.h>
36 #include <agrum/PRM/o3prm/errors.h>
37 #include <agrum/core/hashTable.h>
38 #include <agrum/core/set.h>
39 
40 #ifndef GUM_PRM_O3PRM_O3INTERFACE_FACTORY_H
41 # define GUM_PRM_O3PRM_O3INTERFACE_FACTORY_H
42 
43 namespace gum {
44  namespace prm {
45  namespace o3prm {
46 
56  template < typename GUM_SCALAR >
58  public:
60  O3PRM& o3_prm,
62  ErrorsContainer& errors);
70 
71  void buildInterfaces();
72 
73  void buildElements();
74 
75  private:
80 
86  std::vector< O3Interface* > __o3Interface;
87 
88  bool __addInterface2Dag();
89 
90  bool __addArcs2Dag();
91 
93 
94  bool __checkO3Interfaces();
95 
97 
99 
101  O3InterfaceElement& elt);
102 
104  O3InterfaceElement& elt);
105 
107  };
108 
109  } // namespace o3prm
110  } // namespace prm
111 } // namespace gum
112 
113 // always include the implementation of the templates
115 
116 
117 # ifndef GUM_NO_EXTERN_TEMPLATE_CLASS
119 # endif
120 
121 
122 #endif // GUM_PRM_O3PRM_O3INTERFACE_FACTORY_H
Functions for error messages.
Sets of elements (i.e.
bool __checkReferenceOverloadLegality(O3Interface &i, O3InterfaceElement &elt)
bool __checkAttributeOverloadLegality(O3Interface &i, O3InterfaceElement &elt)
O3InterfaceFactory(PRM< GUM_SCALAR > &prm, O3PRM &o3_prm, O3NameSolver< GUM_SCALAR > &solver, ErrorsContainer &errors)
Headers of PRM.
Headers for the O3NameSolver class.
This class is used contain and manipulate gum::ParseError.
bool __checkOverloadLegality(O3Interface &i, O3InterfaceElement &elt)
gum is the global namespace for all aGrUM entities
Definition: agrum.h:25
O3InterfaceFactory< GUM_SCALAR > & operator=(const O3InterfaceFactory< GUM_SCALAR > &src)
HashTable< NodeId, O3Interface *> __nodeMap
O3NameSolver< GUM_SCALAR > * __solver
Bulds gum::prm:PRMInterface from gum::prm::o3prm::O3Interface.
Resolves names for the different O3PRM factories.
Definition: O3NameSolver.h:55
Headers for the AST of the O3PRM language.
This class represents a Probabilistic Relational PRMSystem<GUM_SCALAR>.
Definition: PRM.h:63
HashTable< std::string, gum::NodeId > __nameMap
bool __checkCyclicReference(O3Interface &i, O3InterfaceElement &elt)
HashTable< std::string, O3Interface *> __interfaceMap
The O3InterfaceElement is part of the AST of the O3PRM language.
Definition: O3prm.h:321
The O3PRM is part of the AST of the O3PRM language.
Definition: O3prm.h:890
bool __checkInterfaceElement(O3Interface &i, O3InterfaceElement &elt)
HashTable< std::string, std::string > __eltName
Implementation for the O3InterfaceFactory class.
The O3Interface is part of the AST of the O3PRM language.
Definition: O3prm.h:354
std::vector< O3Interface *> __o3Interface
Base class for dag.
Definition: DAG.h:99
Class hash tables iterators.
Headers of PRMFactory.