31 #ifndef GUM_PRM_O3PRM_O3PRM_FACTORY_H 32 #define GUM_PRM_O3PRM_O3PRM_FACTORY_H 48 #include <agrum/PRM/o3prm/cocoR/Parser.h> 49 #include <agrum/PRM/o3prm/cocoR/Scanner.h> 68 template <
typename GUM_SCALAR >
81 Size readFile(
const std::string& file,
const std::string& module =
"");
89 std::string module =
"");
155 const std::string& file,
156 std::string module =
"");
161 const std::string& filename,
162 const std::string& module);
166 std::string
__clean(std::string text)
const;
179 #ifndef GUM_NO_EXTERN_TEMPLATE_CLASS 184 #endif // GUM_PRM_O3PRM_O3PRM_FACTORY_H Copyright 2005-2019 Pierre-Henri WUILLEMIN et Christophe GONZALES (LIP6) {prenom.nom}_at_lip6.fr.
std::string __clean(std::string text) const
Size warnings() const
of errors
std::string errMsg(Idx i) const
message of ith error or warning
std::wstring errFilename(Idx i) const
filename of ith error or warning
void setClassPath(const std::string &class_path)
This methods defines the list of paths to look for o3prm files.
void __readStream(std::istream &input, const std::string &file, std::string module="")
Size readFile(const std::string &file, const std::string &module="")
Read file and load its content using a PRMFactory. The package parameter set the file's content packa...
Copyright 2005-2019 Pierre-Henri WUILLEMIN et Christophe GONZALES (LIP6) {prenom.nom}_at_lip6.fr.
void parseStream(std::istream &input, std::ostream &output, std::string module="")
Copyright 2005-2019 Pierre-Henri WUILLEMIN et Christophe GONZALES (LIP6) {prenom.nom}_at_lip6.fr.
gum::prm::PRM< GUM_SCALAR > * prm()
Copyright 2005-2019 Pierre-Henri WUILLEMIN et Christophe GONZALES (LIP6) {prenom.nom}_at_lip6.fr.
std::vector< std::string > __class_path
This class is used to represent parsing errors for the different parser implemented in aGrUM...
std::unique_ptr< O3PRM > __o3_prm
Copyright 2005-2019 Pierre-Henri WUILLEMIN et Christophe GONZALES (LIP6) {prenom.nom}_at_lip6.fr.
void showErrorCounts(std::ostream &o=std::cerr) const
send on std::cerr the number of errors and the number of warnings
const ErrorsContainer & errorsContainer() const
publishing Errors API
Copyright 2005-2019 Pierre-Henri WUILLEMIN et Christophe GONZALES (LIP6) {prenom.nom}_at_lip6.fr.
This class is used contain and manipulate gum::ParseError.
Idx errCol(Idx i) const
col of ith error or warning
Copyright 2005-2019 Pierre-Henri WUILLEMIN et Christophe GONZALES (LIP6) {prenom.nom}_at_lip6.fr.
The O3Import is part of the AST of the O3PRM language.
O3prmReader & operator=(const O3prmReader &src)
This class read O3PRM files and creates the corresponding gum::prm::PRM.
void showElegantErrorsAndWarnings(std::ostream &o=std::cerr) const
send on std::cerr the list of errors or warnings
std::vector< const O3Import *> __copyImports()
Size errors() const
publishing Errors API
void showElegantErrors(std::ostream &o=std::cerr) const
send on std::cerr the list of errors
const gum::prm::PRM< GUM_SCALAR > * prm() const
Copyright 2005-2019 Pierre-Henri WUILLEMIN et Christophe GONZALES (LIP6) {prenom.nom}_at_lip6.fr.
Idx errLine(Idx i) const
line of ith error or warning
void __parseImport(const O3Import &i, const std::string &module_path)
Copyright 2005-2019 Pierre-Henri WUILLEMIN et Christophe GONZALES (LIP6) {prenom.nom}_at_lip6.fr.
void addClassPath(const std::string &class_path)
Add a list of paths to look for o3prm files.
Set< std::string > __imported
This class represents a Probabilistic Relational PRMSystem<GUM_SCALAR>.
std::string __print(const ParseError &err) const
bool errIsError(Idx i) const
type of ith error or warning
Size readString(const std::string &string)
With readString method, you must set the current path to search from import yourself, using addClassPath.
Size Idx
Type for indexes.
Copyright 2005-2019 Pierre-Henri WUILLEMIN et Christophe GONZALES (LIP6) {prenom.nom}_at_lip6.fr.
Copyright 2005-2019 Pierre-Henri WUILLEMIN et Christophe GONZALES (LIP6) {prenom.nom}_at_lip6.fr.
void __parseStream(std::istream &input, const std::string &filename, const std::string &module)
std::size_t Size
In aGrUM, hashed values are unsigned long int.
PRM< GUM_SCALAR > * __prm