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 >
95 return 1 + __parser->errors().error_count;
101 return (__parser->errors().error_count);
106 template <
typename GUM_SCALAR >
109 return __parser->errors().error(i).line;
111 GUM_ERROR(OperationNotAllowed,
"Net file not parsed yet");
115 template <
typename GUM_SCALAR >
118 return __parser->errors().error(i).column;
120 GUM_ERROR(OperationNotAllowed,
"Net file not parsed yet");
124 template <
typename GUM_SCALAR >
127 return __parser->errors().error(i).is_error;
129 GUM_ERROR(OperationNotAllowed,
"Net file not parsed yet");
133 template <
typename GUM_SCALAR >
136 return __parser->errors().error(i).msg;
138 GUM_ERROR(OperationNotAllowed,
"Net file not parsed yet");
142 template <
typename GUM_SCALAR >
145 __parser->errors().elegantErrors(o);
147 GUM_ERROR(OperationNotAllowed,
"Net file not parsed yet");
151 template <
typename GUM_SCALAR >
155 __parser->errors().elegantErrorsAndWarnings(o);
157 GUM_ERROR(OperationNotAllowed,
"Net file not parsed yet");
161 template <
typename GUM_SCALAR >
164 __parser->errors().simpleErrorsAndWarnings(o);
166 GUM_ERROR(OperationNotAllowed,
"Net file not parsed yet");
170 template <
typename GUM_SCALAR >
173 __parser->errors().syntheticResults(o);
175 GUM_ERROR(OperationNotAllowed,
"Net file not parsed yet");
179 template <
typename GUM_SCALAR >
184 template <
typename GUM_SCALAR >
192 #endif // DOXYGEN_SHOULD_SKIP_THIS
bool errIsError(Idx i)
type of ith error or warning
void showErrorsAndWarnings(std::ostream &o=std::cerr)
send on std::cerr the list of errors or warnings
BayesNet< GUM_SCALAR > * __bn
Copyright 2005-2019 Pierre-Henri WUILLEMIN et Christophe GONZALES (LIP6) {prenom.nom}_at_lip6.fr.
bool trace() const
accessor to trace function (just write the number of parser line)
std::string errMsg(Idx i)
message of ith error or warning
BayesNetFactory< GUM_SCALAR > * __factory
Size errors()
publishing Errors API
const std::string & streamName() const
name of readen file
Base class for all aGrUM's exceptions.
net::Scanner & scanner()
Direct access to DSL scanner (mandatory for listener connection)
void showErrorCounts(std::ostream &o=std::cerr)
send on std::cerr the number of errors and the number of warnings
~NetReader() final
Default destructor.
Size proceed() final
parse.
void showElegantErrorsAndWarnings(std::ostream &o=std::cerr)
send on std::cerr the list of errors or warnings with contents
void showElegantErrors(std::ostream &o=std::cerr)
send on std::cerr the list of errorswith contents
std::size_t Size
In aGrUM, hashed values are unsigned long int.
NetReader(BayesNet< GUM_SCALAR > *bn, const std::string &filename)
Constructor A reader is defined for reading a defined file.
#define GUM_ERROR(type, msg)
Idx errCol(Idx i)
col of ith error or warning
Idx errLine(Idx i)
line of ith error or warning