aGrUM  0.20.3
a C++ library for (probabilistic) graphical models
O3NameSolver.h
Go to the documentation of this file.
1 /**
2  *
3  * Copyright (c) 2005-2021 by Pierre-Henri WUILLEMIN(@LIP6) & Christophe GONZALES(@AMU)
4  * info_at_agrum_dot_org
5  *
6  * This library is free software: you can redistribute it and/or modify
7  * it under the terms of the GNU Lesser General Public License as published by
8  * the Free Software Foundation, either version 3 of the License, or
9  * (at your option) any later version.
10  *
11  * This library is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  * GNU Lesser General Public License for more details.
15  *
16  * You should have received a copy of the GNU Lesser General Public License
17  * along with this library. If not, see <http://www.gnu.org/licenses/>.
18  *
19  */
20 
21 
22 /**
23  * @file
24  * @brief Headers for the O3NameSolver class.
25  *
26  * @author Christophe GONZALES(@AMU) and Pierre-Henri WUILLEMIN(@LIP6)
27  * @author Lionel TORTI
28  */
29 
30 #include <algorithm>
31 #include <string>
32 
33 #include <agrum/PRM/PRM.h>
34 #include <agrum/PRM/o3prm/O3prm.h>
35 #include <agrum/PRM/o3prm/errors.h>
36 #include <agrum/tools/core/hashTable.h>
37 #include <agrum/tools/core/utils_string.h>
38 
39 #ifndef GUM_PRM_O3PRM_O3NAMESOLVER_H
40 # define GUM_PRM_O3PRM_O3NAMESOLVER_H
41 
42 namespace gum {
43  namespace prm {
44  namespace o3prm {
45 
46  /**
47  * @class O3NameSolver
48  * @headerfile O3NameSolver.h <agrum/PRM/o3prm/O3NameSolver.h>
49  * @ingroup o3prm_group
50  *
51  * @brief Resolves names for the different O3PRM factories.
52  *
53  * @tparam GUM_SCALAR The scalar type used by the gum::prm::PRM.
54  */
55  template < typename GUM_SCALAR >
56  class O3NameSolver {
57  public:
58  O3NameSolver(PRM< GUM_SCALAR >& prm, O3PRM& o3_prm, ErrorsContainer& errors);
59 
60  O3NameSolver(const O3NameSolver< GUM_SCALAR >& src);
61 
62  O3NameSolver(O3NameSolver< GUM_SCALAR >&& src);
63 
64  ~O3NameSolver();
65 
66  O3NameSolver< GUM_SCALAR >& operator=(const O3NameSolver< GUM_SCALAR >& src);
67 
68  O3NameSolver< GUM_SCALAR >& operator=(O3NameSolver< GUM_SCALAR >&& src);
69 
70  bool resolveClassElement(O3Label& name);
71 
72  bool resolveType(O3Label& name);
73 
74  bool resolveInterface(O3Label& name);
75 
76  bool resolveClass(O3Label& name);
77 
78  bool resolveSlotType(O3Label& name);
79 
80  private:
84 
86 
92  };
93 
94  } // namespace o3prm
95  } // namespace prm
96 } // namespace gum
97 
98 
99 # ifndef GUM_NO_EXTERN_TEMPLATE_CLASS
100 extern template class gum::prm::o3prm::O3NameSolver< double >;
101 # endif
102 
103 
104 // always include the implementation of the templates
105 # include <agrum/PRM/o3prm/O3NameSolver_tpl.h>
106 
107 #endif // GUM_PRM_O3PRM_O3NAMESOLVER_H
ErrorsContainer * _errors_
Definition: O3NameSolver.h:83
INLINE void emplace(Args &&... args)
Definition: set_tpl.h:643
O3NameSolver(O3NameSolver< GUM_SCALAR > &&src)
bool resolveType(O3Label &name)
O3NameSolver< GUM_SCALAR > & operator=(const O3NameSolver< GUM_SCALAR > &src)
Resolves names for the different O3PRM factories.
Definition: O3NameSolver.h:56
bool resolveClassElement(O3Label &name)
ParamScopeData(const std::string &s, const PRMReferenceSlot< GUM_SCALAR > &ref, Idx d)
bool resolveSlotType(O3Label &name)
O3NameSolver(PRM< GUM_SCALAR > &prm, O3PRM &o3_prm, ErrorsContainer &errors)
PRM< GUM_SCALAR > * _prm_
Definition: O3NameSolver.h:81
O3NameSolver< GUM_SCALAR > & operator=(O3NameSolver< GUM_SCALAR > &&src)
bool resolveInterface(O3Label &name)
O3NameSolver(const O3NameSolver< GUM_SCALAR > &src)
bool resolveClass(O3Label &name)