SimulationChain
 All Classes Functions Variables Pages
CGenerator Class Referenceabstract

#include <Generator.h>

Inheritance diagram for CGenerator:
Collaboration diagram for CGenerator:

Public Member Functions

 CGenerator (std::string &sName, GenType type)
 Abstract class constructor to initialize common components. More...
 
GenType GetType () const override
 Gets type of the generator. More...
 
const std::string & GetName () const override
 Gets name. More...
 
void SetName (std::string &sName) override
 Sets name. More...
 
void SetDelay (int nD) override
 Sets the delay in samples. More...
 
void SaveHistory () override
 Internally saves a current state in relation with the output signal generation. More...
 
void LoadHistory () override
 Restores an internal state saved with SaveHistory() method. More...
 
virtual void LoadState (boost::property_tree::ptree::value_type const &vParams)=0
 Sets generator parameters. More...
 
virtual void SaveState (boost::property_tree::ptree &pt) const =0
 
- Public Member Functions inherited from IGenerator
virtual double GenerateNext ()=0
 Used to generate next signal sample. More...
 
virtual void Reset ()=0
 Resets the generator to the enter state.
 

Protected Attributes

const GenType m_Type
 generator type
 
std::string m_sName
 generator name
 
int m_nI
 number of sample in a sequence
 
int m_nIBack
 saved state of the m_nI variable
 
int m_nDelay
 delay of the output in samples
 

Detailed Description

Abstract class to implement common functionality of generator classes.

Class is connected to SUniqueNameController to provide it with unique name registration.

Constructor & Destructor Documentation

CGenerator::CGenerator ( std::string &  sName,
GenType  type 
)

Abstract class constructor to initialize common components.

Parameters
[in]sNameProposed name of the generator to register.
[in]typeType of the generator.

Here is the call graph for this function:

Member Function Documentation

const std::string & CGenerator::GetName ( ) const
overridevirtual

Gets name.

Returns
Name of the object.

Implements IGenerator.

GenType CGenerator::GetType ( ) const
overridevirtual

Gets type of the generator.

Returns
Type of the generator object.

Implements IGenerator.

void CGenerator::LoadHistory ( )
overridevirtual

Restores an internal state saved with SaveHistory() method.

Implements IGenerator.

Reimplemented in CSquareGen, and CTriangleGen.

Here is the caller graph for this function:

virtual void CGenerator::LoadState ( boost::property_tree::ptree::value_type const &  vParams)
pure virtual

Sets generator parameters.

Parameters
[in]vParamsProperty tree containing data to deserialize the object.

Implements IGenerator.

Implemented in CSquareGen, CSineGen, CTriangleGen, CPulseGen, CNoiseGen, and CStepGen.

void CGenerator::SaveHistory ( )
overridevirtual

Internally saves a current state in relation with the output signal generation.

Implements IGenerator.

Reimplemented in CSquareGen, and CTriangleGen.

Here is the caller graph for this function:

virtual void CGenerator::SaveState ( boost::property_tree::ptree &  pt) const
pure virtual

Parameters
[out]ptProperty tree to store serialized object.

Implements IGenerator.

Implemented in CSquareGen, CSineGen, CNoiseGen, CTriangleGen, CPulseGen, and CStepGen.

void CGenerator::SetDelay ( int  nD)
overridevirtual

Sets the delay in samples.

Parameters
[in]nDDelay in samples.

Implements IGenerator.

void CGenerator::SetName ( std::string &  sName)
overridevirtual

Sets name.

Parameters
[in]sNameName of the object instance to register.

Implements IGenerator.

Here is the call graph for this function:

Here is the caller graph for this function:


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