50#ifndef GUM_PRM_O3PRM_O3PRM_FACTORY_H
51#define GUM_PRM_O3PRM_O3PRM_FACTORY_H
62#include <agrum/PRM/o3prm/cocoR/Parser.h>
63#include <agrum/PRM/o3prm/cocoR/Scanner.h>
83 template <
typename GUM_SCALAR >
96 Size readFile(
const std::string& file,
const std::string& module =
"");
102 void parseStream(std::istream& input, std::ostream& output, std::string module =
"");
168 void _readStream_(std::istream& input,
const std::string& file, std::string module =
"");
173 const std::string& filename,
174 const std::string& module);
178 std::string
_clean_(std::string text)
const;
191#ifndef GUM_NO_EXTERN_TEMPLATE_CLASS
Headers for the O3ClassFactory class.
Headers for the O3InterfaceFactory class.
Headers for the O3SystemFactory class.
Headers for the O3TypeFactory class.
Implementation for the O3prmReader class.
This class is used contain and manipulate gum::ParseError.
This class is used to represent parsing errors for the different parser implemented in aGrUM.
This class represents a Probabilistic Relational PRMSystem<GUM_SCALAR>.
The O3Import is part of the AST of the O3PRM language.
Set< std::string > _imported_
Size errors() const
publishing Errors API
std::vector< const O3Import * > _copyImports_()
Size readString(const std::string &string)
With readString method, you must set the current path to search from import yourself,...
void _parseImport_(const O3Import &i, const std::string &module_path)
const ErrorsContainer & errorsContainer() const
publishing Errors API
std::wstring errFilename(Idx i) const
filename of ith error or warning
void showElegantErrors(std::ostream &o=std::cerr) const
send on std::cerr the list of errors
void addClassPath(const std::string &class_path)
Add a list of paths to look for o3prm files.
Idx errCol(Idx i) const
col of ith error or warning
std::string _print_(const ParseError &err) const
gum::prm::PRM< GUM_SCALAR > * prm()
void setClassPath(const std::string &class_path)
This methods defines the list of paths to look for o3prm files.
void showErrorCounts(std::ostream &o=std::cerr) const
send on std::cerr the number of errors and the number of warnings
void showElegantErrorsAndWarnings(std::ostream &o=std::cerr) const
send on std::cerr the list of errors or warnings
O3prmReader & operator=(const O3prmReader &src)
void _readStream_(std::istream &input, const std::string &file, std::string module="")
const gum::prm::PRM< GUM_SCALAR > * prm() const
void _parseStream_(std::istream &input, const std::string &filename, const std::string &module)
bool errIsError(Idx i) const
type of ith error or warning
Idx errLine(Idx i) const
line of ith error or warning
void parseStream(std::istream &input, std::ostream &output, std::string module="")
std::string errMsg(Idx i) const
message of ith error or warning
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...
std::string _clean_(std::string text) const
std::unique_ptr< O3PRM > _o3_prm_
PRM< GUM_SCALAR > * _prm_
std::vector< std::string > _class_path_
std::size_t Size
In aGrUM, hashed values are unsigned long int.
Size Idx
Type for indexes.
namespace for all probabilistic relational models entities
gum is the global namespace for all aGrUM entities