29 #ifndef GUM_PRM_O3PRM_O3PRM_FACTORY_H 30 #define GUM_PRM_O3PRM_O3PRM_FACTORY_H 46 #include <agrum/PRM/o3prm/cocoR/Parser.h> 47 #include <agrum/PRM/o3prm/cocoR/Scanner.h> 66 template <
typename GUM_SCALAR >
79 Size readFile(
const std::string& file,
const std::string& module =
"");
87 std::string module =
"");
153 const std::string& file,
154 std::string module =
"");
159 const std::string& filename,
160 const std::string& module);
164 std::string
__clean(std::string text)
const;
177 #ifndef GUM_NO_EXTERN_TEMPLATE_CLASS 182 #endif // GUM_PRM_O3PRM_O3PRM_FACTORY_H Headers for the O3TypeFactory class.
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...
Errors container (at least) for parser.
void parseStream(std::istream &input, std::ostream &output, std::string module="")
Headers for the O3SystemFactory class.
gum::prm::PRM< GUM_SCALAR > * prm()
Headers for the O3ClassFactory class.
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
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
Headers for the O3NameSolver class.
This class is used contain and manipulate gum::ParseError.
Idx errCol(Idx i) const
col of ith error or warning
gum is the global namespace for all aGrUM entities
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
Headers for the O3InterfaceFactory class.
Idx errLine(Idx i) const
line of ith error or warning
void __parseImport(const O3Import &i, const std::string &module_path)
Headers for the AST of the O3PRM language.
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.
Utilities for manipulating strings.
Implementation for the O3prmReader class.
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