21 #ifndef DOXYGEN_SHOULD_SKIP_THIS 27 template <
typename GUM_SCALAR >
29 const std::string& filename) :
30 BNReader< GUM_SCALAR >(bn, filename) {
43 __parser->setFactory((IBayesNetFactory*)
__factory);
44 }
catch (IOError&) { __ioerror =
true; }
47 template <
typename GUM_SCALAR >
61 template <
typename GUM_SCALAR >
68 template <
typename GUM_SCALAR >
73 template <
typename GUM_SCALAR >
78 template <
typename GUM_SCALAR >
84 template <
typename GUM_SCALAR >
94 return 1 + __parser->errors().error_count;
98 return (__parser->errors().error_count);
103 template <
typename GUM_SCALAR >
106 return __parser->errors().error(i).line;
108 GUM_ERROR(OperationNotAllowed,
"DSL file not parsed yet");
112 template <
typename GUM_SCALAR >
115 return __parser->errors().error(i).column;
117 GUM_ERROR(OperationNotAllowed,
"DSL file not parsed yet");
121 template <
typename GUM_SCALAR >
124 return __parser->errors().error(i).is_error;
126 GUM_ERROR(OperationNotAllowed,
"DSL file not parsed yet");
130 template <
typename GUM_SCALAR >
133 return __parser->errors().error(i).msg;
135 GUM_ERROR(OperationNotAllowed,
"DSL file not parsed yet");
139 template <
typename GUM_SCALAR >
142 __parser->errors().elegantErrors(o);
144 GUM_ERROR(OperationNotAllowed,
"DSL file not parsed yet");
148 template <
typename GUM_SCALAR >
152 __parser->errors().elegantErrorsAndWarnings(o);
154 GUM_ERROR(OperationNotAllowed,
"DSL file not parsed yet");
158 template <
typename GUM_SCALAR >
161 __parser->errors().simpleErrorsAndWarnings(o);
163 GUM_ERROR(OperationNotAllowed,
"DSL file not parsed yet");
167 template <
typename GUM_SCALAR >
170 __parser->errors().syntheticResults(o);
172 GUM_ERROR(OperationNotAllowed,
"DSL file not parsed yet");
176 template <
typename GUM_SCALAR >
181 template <
typename GUM_SCALAR >
189 #endif // DOXYGEN_SHOULD_SKIP_THIS Size errors()
publishing Errors API
void showErrorCounts(std::ostream &o=std::cerr)
send on std::cerr the number of errors and the number of warnings
bool errIsError(Idx i)
type of ith error or warning
gum is the global namespace for all aGrUM entities
Idx errLine(Idx i)
line of ith error or warning
const std::string & streamName() const
name of readen file
std::string errMsg(Idx i)
message of ith error or warning
bool trace() const
accessor to trace function (just write the number of parser line)
Base class for all aGrUM's exceptions.
~DSLReader() final
Default destructor.
void showErrorsAndWarnings(std::ostream &o=std::cerr)
send on std::cerr the list of errors or warnings
DSL::Scanner & scanner()
Direct access to DSL scanner (mandatory for listener connection)
Idx errCol(Idx i)
col of ith error or warning
Size proceed() final
parse.
void showElegantErrorsAndWarnings(std::ostream &o=std::cerr)
send on std::cerr the list of errors or warnings with contents
BayesNet< GUM_SCALAR > * __bn
std::size_t Size
In aGrUM, hashed values are unsigned long int.
DSLReader(BayesNet< GUM_SCALAR > *bn, const std::string &filename)
Constructor A reader is defined for reading a defined file.
void showElegantErrors(std::ostream &o=std::cerr)
send on std::cerr the list of errorswith contents
#define GUM_ERROR(type, msg)
BayesNetFactory< GUM_SCALAR > * __factory