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 >
93 return 1 + __parser->errors().error_count;
99 return (__parser->errors().error_count);
104 template <
typename GUM_SCALAR >
107 return __parser->errors().error(i).line;
109 GUM_ERROR(OperationNotAllowed,
"Net file not parsed yet");
113 template <
typename GUM_SCALAR >
116 return __parser->errors().error(i).column;
118 GUM_ERROR(OperationNotAllowed,
"Net file not parsed yet");
122 template <
typename GUM_SCALAR >
125 return __parser->errors().error(i).is_error;
127 GUM_ERROR(OperationNotAllowed,
"Net file not parsed yet");
131 template <
typename GUM_SCALAR >
134 return __parser->errors().error(i).msg;
136 GUM_ERROR(OperationNotAllowed,
"Net file not parsed yet");
140 template <
typename GUM_SCALAR >
143 __parser->errors().elegantErrors(o);
145 GUM_ERROR(OperationNotAllowed,
"Net file not parsed yet");
149 template <
typename GUM_SCALAR >
153 __parser->errors().elegantErrorsAndWarnings(o);
155 GUM_ERROR(OperationNotAllowed,
"Net file not parsed yet");
159 template <
typename GUM_SCALAR >
162 __parser->errors().simpleErrorsAndWarnings(o);
164 GUM_ERROR(OperationNotAllowed,
"Net file not parsed yet");
168 template <
typename GUM_SCALAR >
171 __parser->errors().syntheticResults(o);
173 GUM_ERROR(OperationNotAllowed,
"Net file not parsed yet");
177 template <
typename GUM_SCALAR >
182 template <
typename GUM_SCALAR >
190 #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
gum is the global namespace for all aGrUM entities
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