EventAnalysis  1.3.0
Public Member Functions | Private Member Functions | Private Attributes | List of all members
EA::EventLoopConfigurationTokensHandler Class Reference

#include <EventLoopConfigurationTokensHandler.h>

Inheritance diagram for EA::EventLoopConfigurationTokensHandler:
EA::ConfigurationTokensHandler

Public Member Functions

 EventLoopConfigurationTokensHandler (AnalysisManager &manager, const CommandLineParameters &clParameters)
 Constructor. More...
 
 ~EventLoopConfigurationTokensHandler ()
 Destructor. More...
 
bool HandleTokens (const std::vector< std::string > &tokens)
 Handles event loop configuration tokens. More...
 
- Public Member Functions inherited from EA::ConfigurationTokensHandler
 ConfigurationTokensHandler (AnalysisManager &manager, const CommandLineParameters &clParams)
 Constructor. More...
 
virtual ~ConfigurationTokensHandler ()
 Destructor. More...
 

Private Member Functions

void _HandleEventLoop (const std::vector< std::string > &tokens)
 
void _HandleSequence (const std::vector< std::string > &tokens)
 
void _HandleAlgo (const std::vector< std::string > &tokens)
 
void _HandleSet (const std::vector< std::string > &tokens)
 
void _HandleFilter (const std::vector< std::string > &tokens)
 
void _HandleCache (const std::vector< std::string > &tokens)
 
void _HandleCleanCache (const std::vector< std::string > &tokens)
 
void _HandleEndSequence (const std::vector< std::string > &tokens)
 
void _HandleCollectGarbage (const std::vector< std::string > &tokens)
 

Private Attributes

observer_ptr< EventLoop_eventLoop
 
std::stack< std::unique_ptr< AlgoSequence > > _sequences
 
observer_ptr< Algorithm_algorithm
 
bool _error
 
bool _loopAlreadyBuilt
 

Additional Inherited Members

- Protected Member Functions inherited from EA::ConfigurationTokensHandler
bool SetParameter (const std::string &name, const std::string &value, Configurable &obj)
 Set a parameter of a given Configurable object. More...
 
- Protected Attributes inherited from EA::ConfigurationTokensHandler
AnalysisManageranManager
 
const CommandLineParametersclParameters
 

Constructor & Destructor Documentation

◆ EventLoopConfigurationTokensHandler()

EA::EventLoopConfigurationTokensHandler::EventLoopConfigurationTokensHandler ( AnalysisManager manager,
const CommandLineParameters clParameters 
)
inline

Constructor.

Parameters
managerThe analysis manager to configure.

◆ ~EventLoopConfigurationTokensHandler()

EA::EventLoopConfigurationTokensHandler::~EventLoopConfigurationTokensHandler ( )

Destructor.

Member Function Documentation

◆ _HandleAlgo()

void EA::EventLoopConfigurationTokensHandler::_HandleAlgo ( const std::vector< std::string > &  tokens)
private

◆ _HandleCache()

void EA::EventLoopConfigurationTokensHandler::_HandleCache ( const std::vector< std::string > &  tokens)
private

◆ _HandleCleanCache()

void EA::EventLoopConfigurationTokensHandler::_HandleCleanCache ( const std::vector< std::string > &  tokens)
private

◆ _HandleCollectGarbage()

void EA::EventLoopConfigurationTokensHandler::_HandleCollectGarbage ( const std::vector< std::string > &  tokens)
private

◆ _HandleEndSequence()

void EA::EventLoopConfigurationTokensHandler::_HandleEndSequence ( const std::vector< std::string > &  tokens)
private

◆ _HandleEventLoop()

void EA::EventLoopConfigurationTokensHandler::_HandleEventLoop ( const std::vector< std::string > &  tokens)
private

◆ _HandleFilter()

void EA::EventLoopConfigurationTokensHandler::_HandleFilter ( const std::vector< std::string > &  tokens)
private

◆ _HandleSequence()

void EA::EventLoopConfigurationTokensHandler::_HandleSequence ( const std::vector< std::string > &  tokens)
private

◆ _HandleSet()

void EA::EventLoopConfigurationTokensHandler::_HandleSet ( const std::vector< std::string > &  tokens)
private

◆ HandleTokens()

bool EA::EventLoopConfigurationTokensHandler::HandleTokens ( const std::vector< std::string > &  tokens)
virtual

Handles event loop configuration tokens.

Commands handled:

EventLoop [firstEvent] [nEvents] - main command: create an event loop Set <parameter>

- sub-command: sets the loop parameters CollectGarbage - sub-command: activates the automatic garbage collection Sequence <sequenceName> - sub-command: add a sequence of algorithms to the loop Algo <className> <algoName> - sub-command: add an algorithm to the loop Cache <objName> <evStoreName> - sub-command: book an event object from an event store for being cached CleanCache <objName> <evStoreName> - sub-command: delete cached values for an event object in an event store

Sub-commands of Sequence: CollectGarbage - sub-command: activates/deactivates the automatic garbage collection for this sequence Algo <className> <algoName> - sub-command: add an algorithm to the sequence EndSequence - sub-command: ends the definition of a sequence

Sub-commands of Algo: Set <parName>

- sub-command: set the value of an algorithm parameter Filter <on/off> [invert] - sub-command: enables/disable and eventually invert the filtering

Parameters
tokensThe configuration tokens.
Returns
false if the given token sequence is not understood and cannot be handled.
Exceptions
std::logic_errorif any sub-command is given before its parent command (e.g. Filter before Algo) or if a wrong number of command arguments is given.
EA::CommandLineParameters::MultipleDefinitionExcwhen executing an Algo command which creates an algorithm whose name matches two command line glob expressions defining a value for the same parameter.
std::runtime_errorif any other error occurs during the handling.

Implements EA::ConfigurationTokensHandler.

Member Data Documentation

◆ _algorithm

observer_ptr<Algorithm> EA::EventLoopConfigurationTokensHandler::_algorithm
private

◆ _error

bool EA::EventLoopConfigurationTokensHandler::_error
private

◆ _eventLoop

observer_ptr<EventLoop> EA::EventLoopConfigurationTokensHandler::_eventLoop
private

◆ _loopAlreadyBuilt

bool EA::EventLoopConfigurationTokensHandler::_loopAlreadyBuilt
private

◆ _sequences

std::stack<std::unique_ptr<AlgoSequence> > EA::EventLoopConfigurationTokensHandler::_sequences
private

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