dlvhex  2.5.0
ModelBuilder< EvalGraphT > Class Template Reference

Base class for all model builders. More...

#include <include/dlvhex2/ModelBuilder.h>

Inheritance diagram for ModelBuilder< EvalGraphT >:
Collaboration diagram for ModelBuilder< EvalGraphT >:

Data Structures

struct  ModelProperties
 Properties of a model. More...

Public Types

typedef ModelBuilder< EvalGraphT > Self
typedef EvalGraphT MyEvalGraph
typedef MyEvalGraph::EvalUnit EvalUnit
typedef
EvalGraphT::EvalUnitPropertyBundle 
EvalUnitPropertyBundle
typedef
EvalUnitPropertyBundle::Interpretation 
Interpretation
typedef
EvalUnitPropertyBundle::Interpretation::Ptr 
InterpretationPtr
typedef ModelGraph< EvalGraphT,
ModelProperties
MyModelGraph
typedef MyModelGraph::Model Model
typedef boost::optional< ModelOptionalModel

Public Member Functions

 BOOST_CONCEPT_ASSERT ((boost::Convertible< EvalGraphT, EvalGraph< typename EvalGraphT::EvalUnitPropertyBase, typename EvalGraphT::EvalUnitDepPropertyBase > >))
 BOOST_CONCEPT_ASSERT ((boost::Convertible< typename EvalGraphT::EvalUnitPropertyBundle, EvalUnitModelGeneratorFactoryProperties< typename EvalGraphT::EvalUnitPropertyBundle::Interpretation > >))
 ModelBuilder (ModelBuilderConfig< EvalGraphT > &cfg)
 Constructor.
virtual ~ModelBuilder ()
 Destructor.
EvalGraphT & getEvalGraph ()
 Returns the internal evaluation graph.
MyModelGraphgetModelGraph ()
 Returns the internal model graph.
virtual OptionalModel getNextIModel (EvalUnit u)=0
 Get next input model (projected if projection is configured) at e given unit.
virtual OptionalModel getNextOModel (EvalUnit u)=0
 Get next output model (projected if projection is configured) at e given unit.
virtual void printEvalGraphModelGraph (std::ostream &o)=0
 Prints both the evaluation and the model graph for debugging purposes.
virtual void printModelBuildingPropertyMap (std::ostream &o)=0
 Prints the model building properties for debugging purposes.

Protected Attributes

EvalGraphT & eg
 Evaluation graph to use.
MyModelGraph mg
 Model graph to be constructed during model building.

Detailed Description

template<typename EvalGraphT>
class ModelBuilder< EvalGraphT >

Base class for all model builders.

Definition at line 61 of file ModelBuilder.h.


Member Typedef Documentation

template<typename EvalGraphT>
typedef MyEvalGraph::EvalUnit ModelBuilder< EvalGraphT >::EvalUnit

Reimplemented in OnlineModelBuilder< EvalGraphT >, and OfflineModelBuilder< EvalGraphT >.

Definition at line 77 of file ModelBuilder.h.

template<typename EvalGraphT>
typedef EvalGraphT::EvalUnitPropertyBundle ModelBuilder< EvalGraphT >::EvalUnitPropertyBundle

Reimplemented in OnlineModelBuilder< EvalGraphT >, and OfflineModelBuilder< EvalGraphT >.

Definition at line 85 of file ModelBuilder.h.

template<typename EvalGraphT>
typedef EvalUnitPropertyBundle::Interpretation ModelBuilder< EvalGraphT >::Interpretation

Reimplemented in OnlineModelBuilder< EvalGraphT >.

Definition at line 88 of file ModelBuilder.h.

template<typename EvalGraphT>
typedef EvalUnitPropertyBundle::Interpretation::Ptr ModelBuilder< EvalGraphT >::InterpretationPtr

Reimplemented in OnlineModelBuilder< EvalGraphT >.

Definition at line 90 of file ModelBuilder.h.

template<typename EvalGraphT>
typedef MyModelGraph::Model ModelBuilder< EvalGraphT >::Model

Reimplemented in OnlineModelBuilder< EvalGraphT >, and OfflineModelBuilder< EvalGraphT >.

Definition at line 116 of file ModelBuilder.h.

template<typename EvalGraphT>
typedef EvalGraphT ModelBuilder< EvalGraphT >::MyEvalGraph

Reimplemented in OnlineModelBuilder< EvalGraphT >.

Definition at line 75 of file ModelBuilder.h.

template<typename EvalGraphT>
typedef ModelGraph<EvalGraphT, ModelProperties> ModelBuilder< EvalGraphT >::MyModelGraph

Reimplemented in OnlineModelBuilder< EvalGraphT >, and OfflineModelBuilder< EvalGraphT >.

Definition at line 114 of file ModelBuilder.h.

template<typename EvalGraphT>
typedef boost::optional<Model> ModelBuilder< EvalGraphT >::OptionalModel

Reimplemented in OnlineModelBuilder< EvalGraphT >, and OfflineModelBuilder< EvalGraphT >.

Definition at line 118 of file ModelBuilder.h.

template<typename EvalGraphT>
typedef ModelBuilder<EvalGraphT> ModelBuilder< EvalGraphT >::Self

Reimplemented in OnlineModelBuilder< EvalGraphT >, and OfflineModelBuilder< EvalGraphT >.

Definition at line 66 of file ModelBuilder.h.


Constructor & Destructor Documentation

template<typename EvalGraphT>
ModelBuilder< EvalGraphT >::ModelBuilder ( ModelBuilderConfig< EvalGraphT > &  cfg) [inline]

Constructor.

Parameters:
cfgConfiguration.

Definition at line 131 of file ModelBuilder.h.

template<typename EvalGraphT>
virtual ModelBuilder< EvalGraphT >::~ModelBuilder ( ) [inline, virtual]

Destructor.

Definition at line 134 of file ModelBuilder.h.


Member Function Documentation

template<typename EvalGraphT>
ModelBuilder< EvalGraphT >::BOOST_CONCEPT_ASSERT ( (boost::Convertible< EvalGraphT, EvalGraph< typename EvalGraphT::EvalUnitPropertyBase, typename EvalGraphT::EvalUnitDepPropertyBase > >)  )
template<typename EvalGraphT>
ModelBuilder< EvalGraphT >::BOOST_CONCEPT_ASSERT ( (boost::Convertible< typename EvalGraphT::EvalUnitPropertyBundle, EvalUnitModelGeneratorFactoryProperties< typename EvalGraphT::EvalUnitPropertyBundle::Interpretation > >)  )
template<typename EvalGraphT>
EvalGraphT& ModelBuilder< EvalGraphT >::getEvalGraph ( ) [inline]

Returns the internal evaluation graph.

Returns:
Evaluation graph.

Reimplemented in OfflineModelBuilder< EvalGraphT >.

Definition at line 137 of file ModelBuilder.h.

References ModelBuilder< EvalGraphT >::eg.

Referenced by OfflineModelBuilder< EvalGraphT >::getEvalGraph(), and main().

template<typename EvalGraphT>
MyModelGraph& ModelBuilder< EvalGraphT >::getModelGraph ( ) [inline]

Returns the internal model graph.

Returns:
Model graph.

Reimplemented in OfflineModelBuilder< EvalGraphT >.

Definition at line 140 of file ModelBuilder.h.

References ModelBuilder< EvalGraphT >::mg.

Referenced by BOOST_FIXTURE_TEST_CASE(), OfflineModelBuilder< EvalGraphT >::getModelGraph(), and main().

template<typename EvalGraphT>
virtual OptionalModel ModelBuilder< EvalGraphT >::getNextIModel ( EvalUnit  u) [pure virtual]

Get next input model (projected if projection is configured) at e given unit.

Parameters:
uThe unit whose next input model shall be returned.
Returns:
Next input model at unit u.

Implemented in OnlineModelBuilder< EvalGraphT >, and OfflineModelBuilder< EvalGraphT >.

template<typename EvalGraphT>
virtual OptionalModel ModelBuilder< EvalGraphT >::getNextOModel ( EvalUnit  u) [pure virtual]

Get next output model (projected if projection is configured) at e given unit.

Parameters:
uThe unit whose next output model shall be returned.
Returns:
Next output model at unit u.

Implemented in OnlineModelBuilder< EvalGraphT >.

template<typename EvalGraphT>
virtual void ModelBuilder< EvalGraphT >::printEvalGraphModelGraph ( std::ostream &  o) [pure virtual]

Prints both the evaluation and the model graph for debugging purposes.

Parameters:
oThe stream to print to.

Implemented in OnlineModelBuilder< EvalGraphT >, and OfflineModelBuilder< EvalGraphT >.

template<typename EvalGraphT>
virtual void ModelBuilder< EvalGraphT >::printModelBuildingPropertyMap ( std::ostream &  o) [pure virtual]

Prints the model building properties for debugging purposes.

Parameters:
oThe stream to print to.

Implemented in OnlineModelBuilder< EvalGraphT >, and OfflineModelBuilder< EvalGraphT >.


Field Documentation


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