![]() |
aGrUM 2.3.2
a C++ library for (probabilistic) graphical models
|
Pure virtual class for reading a BN from a file. More...
#include <agrum/BN/io/net/netReader.h>
Public Member Functions | |
| NetReader (BayesNet< GUM_SCALAR > *bn, const std::string &filename) | |
| Constructor A reader is defined for reading a defined file. | |
| ~NetReader () | |
| Default destructor. | |
| net::Scanner & | scanner () |
| Direct access to DSL scanner (mandatory for listener connection). | |
| const std::string & | streamName () const |
| name of readen file | |
| bool | trace () const |
| accessor to trace function (just write the number of parser line) | |
| void | trace (bool b) |
| Size | proceed () final |
| parse. | |
| Size | errors () |
| publishing Errors API | |
| Size | warnings () |
| Idx | errLine (Idx i) |
| line of ith error or warning | |
| Idx | errCol (Idx i) |
| col of ith error or warning | |
| bool | errIsError (Idx i) |
| type of ith error or warning | |
| std::string | errMsg (Idx i) |
| message of ith error or warning | |
| void | showElegantErrors (std::ostream &o=std::cerr) |
| send on std::cerr the list of errorswith contents | |
| void | showElegantErrorsAndWarnings (std::ostream &o=std::cerr) |
| send on std::cerr the list of errors or warnings with contents | |
| void | showErrorsAndWarnings (std::ostream &o=std::cerr) |
| send on std::cerr the list of errors or warnings | |
| void | showErrorCounts (std::ostream &o=std::cerr) |
| send on std::cerr the number of errors and the number of warnings | |
Protected Attributes | |
| BayesNet< GUM_SCALAR > * | _bn_ |
| BayesNetFactory< GUM_SCALAR > * | _factory_ |
| net::Scanner * | _scanner_ |
| net::Parser * | _parser_ |
| std::string | _streamName_ |
| bool | _traceScanning_ |
| bool | _parseDone_ |
| bool | _ioerror_ |
Pure virtual class for reading a BN from a file.
Every class used to read the content of a Bayesian network from a stream, or a file must be a subclass of NetReader.
Definition at line 73 of file netReader.h.
| gum::NetReader< GUM_SCALAR >::NetReader | ( | BayesNet< GUM_SCALAR > * | bn, |
| const std::string & | filename ) |
Constructor A reader is defined for reading a defined file.
Hence the 2 args of the constructor. Note that the BN has to be built outside the reader. There is no delegation to create/destroy the BN from inside the reader.
| gum::NetReader< GUM_SCALAR >::~NetReader | ( | ) |
Default destructor.
| Idx gum::NetReader< GUM_SCALAR >::errCol | ( | Idx | i | ) |
| bool gum::NetReader< GUM_SCALAR >::errIsError | ( | Idx | i | ) |
type of ith error or warning
References errIsError().
Referenced by errIsError().
| Idx gum::NetReader< GUM_SCALAR >::errLine | ( | Idx | i | ) |
| std::string gum::NetReader< GUM_SCALAR >::errMsg | ( | Idx | i | ) |
| Size gum::NetReader< GUM_SCALAR >::errors | ( | ) |
|
final |
| net::Scanner & gum::NetReader< GUM_SCALAR >::scanner | ( | ) |
Direct access to DSL scanner (mandatory for listener connection).
| IOError | if file not exists |
| void gum::NetReader< GUM_SCALAR >::showElegantErrors | ( | std::ostream & | o = std::cerr | ) |
send on std::cerr the list of errorswith contents
References showElegantErrors().
Referenced by showElegantErrors().
| void gum::NetReader< GUM_SCALAR >::showElegantErrorsAndWarnings | ( | std::ostream & | o = std::cerr | ) |
send on std::cerr the list of errors or warnings with contents
References showElegantErrorsAndWarnings().
Referenced by showElegantErrorsAndWarnings().
| void gum::NetReader< GUM_SCALAR >::showErrorCounts | ( | std::ostream & | o = std::cerr | ) |
send on std::cerr the number of errors and the number of warnings
References showErrorCounts().
Referenced by showErrorCounts().
| void gum::NetReader< GUM_SCALAR >::showErrorsAndWarnings | ( | std::ostream & | o = std::cerr | ) |
send on std::cerr the list of errors or warnings
References showErrorsAndWarnings().
Referenced by showErrorsAndWarnings().
| const std::string & gum::NetReader< GUM_SCALAR >::streamName | ( | ) | const |
name of readen file
| bool gum::NetReader< GUM_SCALAR >::trace | ( | ) | const |
accessor to trace function (just write the number of parser line)
| void gum::NetReader< GUM_SCALAR >::trace | ( | bool | b | ) |
| Size gum::NetReader< GUM_SCALAR >::warnings | ( | ) |
References warnings().
Referenced by warnings().
|
protected |
Definition at line 138 of file netReader.h.
|
protected |
Definition at line 139 of file netReader.h.
|
protected |
Definition at line 149 of file netReader.h.
|
protected |
Definition at line 145 of file netReader.h.
|
protected |
Definition at line 141 of file netReader.h.
|
protected |
Definition at line 140 of file netReader.h.
|
protected |
Definition at line 143 of file netReader.h.
|
protected |
Definition at line 144 of file netReader.h.