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

Configures the analysis according to a configuration text file. More...

#include <TextFileConfigurator.h>

Inheritance diagram for EA::TextFileConfigurator:
EA::Configurator

Public Member Functions

 TextFileConfigurator ()
 Constructor. More...
 
bool Configure (AnalysisManager &anManager, const std::string &fileName, const CommandLineParameters &clParams)
 Configures the analysis manager using the given configuration file. More...
 
void SetLineHandler (const std::string &handlerName)
 Sets the line handler. More...
 
- Public Member Functions inherited from EA::Configurator
virtual ~Configurator ()
 Destructor. More...
 
bool AddConfigurationFolders (const std::vector< std::string > &folders)
 Adds configuration folders. More...
 

Private Member Functions

bool _ConfigureImp (AnalysisManager &anManager, const std::string &fileName, const CommandLineParameters &clParams, observer_ptr< ConfigLineHandler > lineHandler=NULL)
 

Private Attributes

std::string _lineHandlerName
 

Additional Inherited Members

- Protected Member Functions inherited from EA::Configurator
const std::vector< std::string > & GetConfigurationFolders ()
 

Detailed Description

Configures the analysis according to a configuration text file.

This class reads the configuration instructions from a text file, with one instruction per line. The actual handling of each line is left to objects belonging to children classes of #ConfigLineHandler.

Constructor & Destructor Documentation

◆ TextFileConfigurator()

EA::TextFileConfigurator::TextFileConfigurator ( )
inline

Constructor.

Member Function Documentation

◆ _ConfigureImp()

bool EA::TextFileConfigurator::_ConfigureImp ( AnalysisManager anManager,
const std::string &  fileName,
const CommandLineParameters clParams,
observer_ptr< ConfigLineHandler lineHandler = NULL 
)
private

◆ Configure()

bool EA::TextFileConfigurator::Configure ( AnalysisManager anManager,
const std::string &  fileName,
const CommandLineParameters clParams 
)
virtual

Configures the analysis manager using the given configuration file.

The file must contain a sequence of commands, one per line. The syntax is determined by which #ConfigLineHandler is used. The line handler can be passed as argument; otherwise it is automatically created. If the line handler throws the IncludeFileExc exception then the processing of the current file will be interrupted, and the file specified by the exception will be processed using the same ConfigLineHandler. So the net behavior will be the same as if the include file were pasted at the line where the exception was thrown. After processing the included file the processing will continue on the original file. The return value will be false if an error occurs, or if some of the entities (data providers, algorithms, persistence services) configured in the command line are not present.

Parameters
anManagerThe analysis manager.
configFileThe config file.
clParamsthe command line parameters.
Returns
true if the analysis manager has been correctly configured.
See also
SetLineHandler

Implements EA::Configurator.

◆ SetLineHandler()

void EA::TextFileConfigurator::SetLineHandler ( const std::string &  handlerName)
inline

Sets the line handler.

This method specifies the name of the line handler class that will be used for interpreting each line of the config file.

Parameters
handlerNameThe name of the line handler class.

Member Data Documentation

◆ _lineHandlerName

std::string EA::TextFileConfigurator::_lineHandlerName
private

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