aGrUM 3.0.0
a C++ library for (probabilistic) graphical models
gum::BIFXMLIDReader< GUM_SCALAR > Class Template Reference

Read an influence diagram from an XML file with BIF format. More...

#include <BIFXMLIDReader.h>

Inheritance diagram for gum::BIFXMLIDReader< GUM_SCALAR >:
Collaboration diagram for gum::BIFXMLIDReader< GUM_SCALAR >:

Public Member Functions

 BIFXMLIDReader (InfluenceDiagram< GUM_SCALAR > *infdiag, std::string_view filePath)
 Constructor A reader is created to reading a defined file.
 ~BIFXMLIDReader ()
 Default destructor.
virtual Size proceed ()
 Reads the influence diagram from the file referenced by filePath given at the creation of class.

Public Attributes

gum::Signaler< int, std::string > onProceed
 Signaler used to indicates how many percent of the Xml files have been parsed yet.

Private Member Functions

void _parsingVariables_ (ticpp::Element *parentNetwork)
 Parsing xml element containing data on variables.
void _fillingDiagram_ (ticpp::Element *parentNetwork)
 fill the diagram

Private Attributes

InfluenceDiagram< GUM_SCALAR > * _infdiag_
 An handle to the influence diagram in which will be load the content of the xml filePath.
std::string _filePath_
 the path to the xml filePath

Detailed Description

template<GUM_Numeric GUM_SCALAR>
class gum::BIFXMLIDReader< GUM_SCALAR >

Read an influence diagram from an XML file with BIF format.

This class import an influence diagram from an XML files using BIF format See http://www-2.cs.cmu.edu/afs/cs/user/fgcozman/www/Research/InterchangeFormat/ for information about this format.

Definition at line 123 of file BIFXMLIDReader.h.

Constructor & Destructor Documentation

◆ BIFXMLIDReader()

template<GUM_Numeric GUM_SCALAR>
gum::BIFXMLIDReader< GUM_SCALAR >::BIFXMLIDReader ( InfluenceDiagram< GUM_SCALAR > * infdiag,
std::string_view filePath )

Constructor A reader is created to reading a defined file.

Note that an ID as to be created before and given in parameter.

◆ ~BIFXMLIDReader()

template<GUM_Numeric GUM_SCALAR>
gum::BIFXMLIDReader< GUM_SCALAR >::~BIFXMLIDReader ( )

Default destructor.

Member Function Documentation

◆ _fillingDiagram_()

template<GUM_Numeric GUM_SCALAR>
void gum::BIFXMLIDReader< GUM_SCALAR >::_fillingDiagram_ ( ticpp::Element * parentNetwork)
private

fill the diagram

◆ _parsingVariables_()

template<GUM_Numeric GUM_SCALAR>
void gum::BIFXMLIDReader< GUM_SCALAR >::_parsingVariables_ ( ticpp::Element * parentNetwork)
private

Parsing xml element containing data on variables.

◆ proceed()

template<GUM_Numeric GUM_SCALAR>
virtual Size gum::BIFXMLIDReader< GUM_SCALAR >::proceed ( )
virtual

Reads the influence diagram from the file referenced by filePath given at the creation of class.

Returns
Returns the number of error during the parsing (0 if none).

Implements gum::IDReader< GUM_SCALAR >.

Member Data Documentation

◆ _filePath_

template<GUM_Numeric GUM_SCALAR>
std::string gum::BIFXMLIDReader< GUM_SCALAR >::_filePath_
private

the path to the xml filePath

Definition at line 173 of file BIFXMLIDReader.h.

◆ _infdiag_

template<GUM_Numeric GUM_SCALAR>
InfluenceDiagram< GUM_SCALAR >* gum::BIFXMLIDReader< GUM_SCALAR >::_infdiag_
private

An handle to the influence diagram in which will be load the content of the xml filePath.

Definition at line 168 of file BIFXMLIDReader.h.

◆ onProceed

template<GUM_Numeric GUM_SCALAR>
gum::Signaler< int, std::string > gum::BIFXMLIDReader< GUM_SCALAR >::onProceed

Signaler used to indicates how many percent of the Xml files have been parsed yet.

Definition at line 150 of file BIFXMLIDReader.h.


The documentation for this class was generated from the following file: