EventAnalysis  1.0.0
EventLoopConfigurationTokensHandler.h
Go to the documentation of this file.
1 /*
2  * EventLoopConfigurationTokensHandler.h
3  *
4  * Created on: 22 Aug 2017
5  * Author: Nicola Mori
6  */
7 
10 #ifndef EVENTLOOPCONFIGURATIONTOKENSHANDLER_H_
11 #define EVENTLOOPCONFIGURATIONTOKENSHANDLER_H_
12 
13 #include "algorithm/AlgoSequence.h"
14 #include "analysis/EventLoop.h"
16 
17 #include <stack>
18 
19 namespace EA {
20 
22 
23 public:
29  : ConfigurationTokensHandler(manager, clParameters), _eventLoop(nullptr), _algorithm(nullptr), _error(false),
30  _loopAlreadyBuilt(false) {}
31 
34 
35  // clang-format off
67  // clang-format on
68  bool HandleTokens(const std::vector<std::string> &tokens);
69 
70 private:
71  void _HandleEventLoop(const std::vector<std::string> &tokens);
72  void _HandleSequence(const std::vector<std::string> &tokens);
73  void _HandleAlgo(const std::vector<std::string> &tokens);
74  void _HandleSet(const std::vector<std::string> &tokens);
75  void _HandleFilter(const std::vector<std::string> &tokens);
76  void _HandleCache(const std::vector<std::string> &tokens);
77  void _HandleCleanCache(const std::vector<std::string> &tokens);
78  void _HandleEndSequence(const std::vector<std::string> &tokens);
79  void _HandleCollectGarbage(const std::vector<std::string> &tokens);
80 
82  std::stack<std::unique_ptr<AlgoSequence>> _sequences;
84 
85  bool _error;
87 };
88 
89 } // namespace EA
90 
91 #endif /* EVENTLOOPCONFIGURATIONTOKENSHANDLER_H_ */
const CommandLineParameters & clParameters
Definition: ConfigurationTokensHandler.h:71
~EventLoopConfigurationTokensHandler()
Destructor.
Definition: EventLoopConfigurationTokensHandler.cpp:21
bool _error
Definition: EventLoopConfigurationTokensHandler.h:85
A smart pointer not owning the wrapped object.
Definition: ObserverPtr.h:28
observer_ptr< EventLoop > _eventLoop
Definition: EventLoopConfigurationTokensHandler.h:81
void _HandleSequence(const std::vector< std::string > &tokens)
Definition: EventLoopConfigurationTokensHandler.cpp:125
IncludeFileExc.h IncludeFileExc class declaration.
Definition: Algorithm.h:21
void _HandleEventLoop(const std::vector< std::string > &tokens)
Definition: EventLoopConfigurationTokensHandler.cpp:75
A class to store parameters passed from command line.
Definition: CommandLineParameters.h:31
observer_ptr< Algorithm > _algorithm
Definition: EventLoopConfigurationTokensHandler.h:83
void _HandleCleanCache(const std::vector< std::string > &tokens)
Definition: EventLoopConfigurationTokensHandler.cpp:307
void _HandleFilter(const std::vector< std::string > &tokens)
Definition: EventLoopConfigurationTokensHandler.cpp:249
std::stack< std::unique_ptr< AlgoSequence > > _sequences
Definition: EventLoopConfigurationTokensHandler.h:82
bool _loopAlreadyBuilt
Definition: EventLoopConfigurationTokensHandler.h:86
bool HandleTokens(const std::vector< std::string > &tokens)
Handles event loop configuration tokens.
Definition: EventLoopConfigurationTokensHandler.cpp:30
Interface of configuration token handler classes.
Definition: ConfigurationTokensHandler.h:34
EventLoopConfigurationTokensHandler(AnalysisManager &manager, const CommandLineParameters &clParameters)
Constructor.
Definition: EventLoopConfigurationTokensHandler.h:28
Definition: EventLoopConfigurationTokensHandler.h:21
void _HandleCache(const std::vector< std::string > &tokens)
Definition: EventLoopConfigurationTokensHandler.cpp:286
void _HandleCollectGarbage(const std::vector< std::string > &tokens)
Definition: EventLoopConfigurationTokensHandler.cpp:341
void _HandleAlgo(const std::vector< std::string > &tokens)
Definition: EventLoopConfigurationTokensHandler.cpp:152
The top-level class managing the setup and run of the data analysis.
Definition: AnalysisManager.h:27
void _HandleEndSequence(const std::vector< std::string > &tokens)
Definition: EventLoopConfigurationTokensHandler.cpp:328
void _HandleSet(const std::vector< std::string > &tokens)
Definition: EventLoopConfigurationTokensHandler.cpp:192