GEGELATI
Public Member Functions | List of all members
TPG::TPGFactory Class Reference

Factory for creating all elements constituting a TPG. More...

#include <tpgFactory.h>

Inheritance diagram for TPG::TPGFactory:
TPG::TPGInstrumentedFactory

Public Member Functions

virtual ~TPGFactory ()=default
 Default virtual destructor.
 
virtual std::shared_ptr< TPGGraphcreateTPGGraph (const Environment &env) const
 Create a TPGGraph with this TPGFactory. More...
 
virtual TPGTeamcreateTPGTeam () const
 Create a TPGTeam for a TPGGraph. More...
 
virtual TPGActioncreateTPGAction (const uint64_t id) const
 Create a TPGAction for a TPGGraph. More...
 
virtual std::unique_ptr< TPGEdgecreateTPGEdge (const TPGVertex *src, const TPGVertex *dest, const std::shared_ptr< Program::Program > prog) const
 Create a TPGEdge for a TPGGraph. More...
 
virtual std::unique_ptr< TPG::TPGExecutionEnginecreateTPGExecutionEngine (const Environment &env, Archive *arch=NULL) const
 Create a TPGExecutionEngine for a TPGGraph produced by this TPGFactory. More...
 

Detailed Description

Factory for creating all elements constituting a TPG.

Using the factory design pattern, this class enables the creation of all elements composing a TPGGraph:

The factory also enables the creation of TPGExecutionEngine.

This implementation returns the default type for each kind of element.

Member Function Documentation

◆ createTPGAction()

TPG::TPGAction * TPG::TPGFactory::createTPGAction ( const uint64_t  id) const
virtual

Create a TPGAction for a TPGGraph.

This method allocates and returns a new TPGAction.

Parameters
[in]idinteger stored as the actionID of the TPGAction.

Reimplemented in TPG::TPGInstrumentedFactory.

◆ createTPGEdge()

std::unique_ptr< TPG::TPGEdge > TPG::TPGFactory::createTPGEdge ( const TPGVertex src,
const TPGVertex dest,
const std::shared_ptr< Program::Program prog 
) const
virtual

Create a TPGEdge for a TPGGraph.

This method allocates and returns a new TPGEdge. The TPGEdge is returned as a unique_ptr.

Parameters
[in]srcpointer to the source TPGVertex of the edge.
[in]destpointer to the destination TPGVertex of the edge.
[in]progthe shared pointer to the Program associated to the edge.

Reimplemented in TPG::TPGInstrumentedFactory.

◆ createTPGExecutionEngine()

std::unique_ptr< TPG::TPGExecutionEngine > TPG::TPGFactory::createTPGExecutionEngine ( const Environment env,
Archive arch = NULL 
) const
virtual

Create a TPGExecutionEngine for a TPGGraph produced by this TPGFactory.

Parameters
[in]envEnvironment in which the Program of the TPGGraph will be executed.
[in]archpointer to the Archive for storing recordings of the Program Execution. By default, a NULL pointer is given, meaning that no recording of the execution will be made.
Returns
the returned TPGExecutionEngine returned as an unique_ptr.

Reimplemented in TPG::TPGInstrumentedFactory.

◆ createTPGGraph()

std::shared_ptr< TPG::TPGGraph > TPG::TPGFactory::createTPGGraph ( const Environment env) const
virtual

Create a TPGGraph with this TPGFactory.

Parameters
[in]envEnvironment used to build the TPGGraph.

Reimplemented in TPG::TPGInstrumentedFactory.

◆ createTPGTeam()

TPG::TPGTeam * TPG::TPGFactory::createTPGTeam ( ) const
virtual

Create a TPGTeam for a TPGGraph.

This method allocates and returns a new TPGTeam.

Reimplemented in TPG::TPGInstrumentedFactory.


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