23 #ifndef DOXYGEN_SHOULD_SKIP_THIS 29 template <
typename GUM_SCALAR >
31 const std::string& filename) :
32 BNReader< GUM_SCALAR >(bn, filename) {
45 __parser->setFactory((IBayesNetFactory*)
__factory);
46 }
catch (IOError&) { __ioerror =
true; }
49 template <
typename GUM_SCALAR >
63 template <
typename GUM_SCALAR >
70 template <
typename GUM_SCALAR >
75 template <
typename GUM_SCALAR >
80 template <
typename GUM_SCALAR >
86 template <
typename GUM_SCALAR >
96 return 1 + __parser->errors().error_count;
100 return (__parser->errors().error_count);
105 template <
typename GUM_SCALAR >
108 return __parser->errors().error(i).line;
110 GUM_ERROR(OperationNotAllowed,
"DSL file not parsed yet");
114 template <
typename GUM_SCALAR >
117 return __parser->errors().error(i).column;
119 GUM_ERROR(OperationNotAllowed,
"DSL file not parsed yet");
123 template <
typename GUM_SCALAR >
126 return __parser->errors().error(i).is_error;
128 GUM_ERROR(OperationNotAllowed,
"DSL file not parsed yet");
132 template <
typename GUM_SCALAR >
135 return __parser->errors().error(i).msg;
137 GUM_ERROR(OperationNotAllowed,
"DSL file not parsed yet");
141 template <
typename GUM_SCALAR >
144 __parser->errors().elegantErrors(o);
146 GUM_ERROR(OperationNotAllowed,
"DSL file not parsed yet");
150 template <
typename GUM_SCALAR >
154 __parser->errors().elegantErrorsAndWarnings(o);
156 GUM_ERROR(OperationNotAllowed,
"DSL file not parsed yet");
160 template <
typename GUM_SCALAR >
163 __parser->errors().simpleErrorsAndWarnings(o);
165 GUM_ERROR(OperationNotAllowed,
"DSL file not parsed yet");
169 template <
typename GUM_SCALAR >
172 __parser->errors().syntheticResults(o);
174 GUM_ERROR(OperationNotAllowed,
"DSL file not parsed yet");
178 template <
typename GUM_SCALAR >
183 template <
typename GUM_SCALAR >
191 #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
Copyright 2005-2019 Pierre-Henri WUILLEMIN et Christophe GONZALES (LIP6) {prenom.nom}_at_lip6.fr.
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