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>
85 template < GUM_Numeric GUM_SCALAR >
98 Size readFile(std::string_view file, std::string_view module =
"");
104 void parseStream(std::istream& input, std::ostream& output, std::string module =
"");
170 void _readStream_(std::istream& input,
const std::string& file, std::string module =
"");
175 const std::string& filename,
176 const std::string& module);
180 std::string
_clean_(std::string text)
const;
193#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.
void setClassPath(std::string_view class_path)
This methods defines the list of paths to look for o3prm files.
Set< std::string > _imported_
void _parseStream_(std::istream &input, const std::string &filename, const std::string &module)
Idx errLine(Idx i) const
line 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,...
std::wstring errFilename(Idx i) const
filename of ith error or warning
gum::prm::PRM< GUM_SCALAR > * prm()
void parseStream(std::istream &input, std::ostream &output, std::string module="")
Size errors() const
publishing Errors API
O3prmReader & operator=(const O3prmReader &src)
void showErrorCounts(std::ostream &o=std::cerr) const
send on std::cerr the number of errors and the number of warnings
void showElegantErrors(std::ostream &o=std::cerr) const
send on std::cerr the list of errors
const ErrorsContainer & errorsContainer() const
publishing Errors API
bool errIsError(Idx i) const
type of ith error or warning
std::string _clean_(std::string text) const
void _readStream_(std::istream &input, const std::string &file, std::string module="")
Size readFile(std::string_view file, std::string_view module="")
Read file and load its content using a PRMFactory. The package parameter set the file's content packa...
Idx errCol(Idx i) const
col of ith error or warning
std::vector< const O3Import * > _copyImports_()
std::string _print_(const ParseError &err) const
std::unique_ptr< O3PRM > _o3_prm_
void _parseImport_(const O3Import &i, const std::string &module_path)
std::string errMsg(Idx i) const
message of ith error or warning
void showElegantErrorsAndWarnings(std::ostream &o=std::cerr) const
send on std::cerr the list of errors or warnings
PRM< GUM_SCALAR > * _prm_
std::vector< std::string > _class_path_
void addClassPath(std::string_view class_path)
Add a list of paths to look for o3prm files.
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