30 #ifndef DOXYGEN_SHOULD_SKIP_THIS 34 template <
typename GUM_SCALAR >
36 const std::string& filename) :
37 BNReader< GUM_SCALAR >(bn, filename) {
50 __parser->setFactory((IBayesNetFactory*)
__factory);
51 }
catch (IOError&) { __ioerror =
true; }
54 template <
typename GUM_SCALAR >
68 template <
typename GUM_SCALAR >
75 template <
typename GUM_SCALAR >
80 template <
typename GUM_SCALAR >
85 template <
typename GUM_SCALAR >
91 template <
typename GUM_SCALAR >
101 return 1 + __parser->errors().error_count;
105 return (__parser->errors().error_count);
110 template <
typename GUM_SCALAR >
113 return __parser->errors().error(i).line;
115 GUM_ERROR(OperationNotAllowed,
"BIF file not parsed yet");
119 template <
typename GUM_SCALAR >
122 return __parser->errors().error(i).column;
124 GUM_ERROR(OperationNotAllowed,
"BIF file not parsed yet");
128 template <
typename GUM_SCALAR >
131 return __parser->errors().error(i).is_error;
133 GUM_ERROR(OperationNotAllowed,
"BIF file not parsed yet");
137 template <
typename GUM_SCALAR >
140 return __parser->errors().error(i).msg;
142 GUM_ERROR(OperationNotAllowed,
"BIF file not parsed yet");
146 template <
typename GUM_SCALAR >
149 __parser->errors().elegantErrors(o);
151 GUM_ERROR(OperationNotAllowed,
"BIF file not parsed yet");
155 template <
typename GUM_SCALAR >
159 __parser->errors().elegantErrorsAndWarnings(o);
161 GUM_ERROR(OperationNotAllowed,
"BIF file not parsed yet");
165 template <
typename GUM_SCALAR >
168 __parser->errors().syntheticResults(o);
170 GUM_ERROR(OperationNotAllowed,
"BIF file not parsed yet");
174 template <
typename GUM_SCALAR >
179 template <
typename GUM_SCALAR >
187 #endif // DOXYGEN_SHOULD_SKIP_THIS BayesNet< GUM_SCALAR > * __bn
const std::string & streamName() const
name of readen file
bool errIsError(Idx i)
type of ith error or warning
std::string errMsg(Idx i)
message of ith error or warning
BayesNetFactory< GUM_SCALAR > * __factory
void showErrorCounts(std::ostream &o=std::cerr)
send on std::cerr the number of errors and the number of warnings
gum is the global namespace for all aGrUM entities
void showElegantErrors(std::ostream &o=std::cerr)
send on std::cerr the list of errors
Definition of templatized reader of BIF files for Bayesian Networks.
Size proceed() final
parse.
Definition of abstract classes for file input manipulation of Bayesian Networks.
Idx errCol(Idx i)
col of ith error or warning
Base class for all aGrUM's exceptions.
bool trace() const
accessor to trace function (just write the number of parser line)
Size errors()
publishing Errors API
BIF::Scanner & scanner()
Direct access to BIF scanner (mandatory for listener connection)
std::size_t Size
In aGrUM, hashed values are unsigned long int.
Idx errLine(Idx i)
line of ith error or warning
#define GUM_ERROR(type, msg)
BIFReader(BayesNet< GUM_SCALAR > *bn, const std::string &filename)
void showElegantErrorsAndWarnings(std::ostream &o=std::cerr)
send on std::cerr the list of errors or warnings