aGrUM  0.16.0
BIFXMLIDReader.h
Go to the documentation of this file.
1 
73 #ifndef GUM_BIF_XML_ID_READER_H
74 #define GUM_BIF_XML_ID_READER_H
75 
76 #define TIXML_USE_TICPP
77 
78 #include <list>
79 #include <sstream>
80 #include <string>
81 
82 #include <agrum/ID/io/IDReader.h>
83 #include <agrum/agrum.h>
88 
89 namespace gum {
101  template < typename GUM_SCALAR >
102  class BIFXMLIDReader : IDReader< GUM_SCALAR > {
103  public:
110  const std::string& filePath);
111 
115  ~BIFXMLIDReader();
116 
123  virtual void proceed();
124 
130  typename gum::Signaler2< int, std::string > onProceed;
131 
132  private:
136  void __parsingVariables(ticpp::Element* parentNetwork);
137 
141  void __fillingDiagram(ticpp::Element* parentNetwork);
142 
149 
153  std::string __filePath;
154  };
155 
156 } /* namespace gum */
157 
159 
160 #endif // GUM_BIF_XML_ID_READER_H
Wrapper around TiXmlElement.
Definition: ticpp.h:1493
std::string __filePath
the path to the xml filePath
gum::Signaler2< int, std::string > onProceed
Signaler used to indicates how many percent of the Xml files have been parsed yet.
Copyright 2005-2019 Pierre-Henri WUILLEMIN et Christophe GONZALES (LIP6) {prenom.nom}_at_lip6.fr.
Read an influence diagram from an XML file with BIF format.
Copyright 2005-2019 Pierre-Henri WUILLEMIN et Christophe GONZALES (LIP6) {prenom.nom}_at_lip6.fr.
Definition: agrum.h:25
void __parsingVariables(ticpp::Element *parentNetwork)
Parsing xml element containing data on variables.
void __fillingDiagram(ticpp::Element *parentNetwork)
fill the diagram
BIFXMLIDReader(InfluenceDiagram< GUM_SCALAR > *infdiag, const std::string &filePath)
Constructor A reader is created to reading a defined file.
Copyright 2005-2019 Pierre-Henri WUILLEMIN et Christophe GONZALES (LIP6) {prenom.nom}_at_lip6.fr.
Copyright 2005-2019 Pierre-Henri WUILLEMIN et Christophe GONZALES (LIP6) {prenom.nom}_at_lip6.fr.
InfluenceDiagram< GUM_SCALAR > * __infdiag
An handle to the influence diagram in which will be load the content of the xml filePath.
~BIFXMLIDReader()
Default destructor.
Pure virtual class for importing an ID from a file.
Definition: IDReader.h:52
virtual void proceed()
Reads the influence diagram from the file referenced by filePath given at the creation of class...
Copyright 2005-2019 Pierre-Henri WUILLEMIN et Christophe GONZALES (LIP6) {prenom.nom}_at_lip6.fr.
Class representing an Influence Diagram.