FairMQ: Integration of Plugins through PluginServices

This commit is contained in:
Dennis Klein
2017-06-26 15:08:26 +02:00
committed by Mohammad Al-Turany
parent 60d929b0bd
commit 9b61b924b2
26 changed files with 244 additions and 701 deletions

View File

@@ -37,7 +37,7 @@ FairMQProgOptions::~FairMQProgOptions()
{
}
void FairMQProgOptions::ParseAll(const int argc, char** argv, bool allowUnregistered)
void FairMQProgOptions::ParseAll(const int argc, const char** argv, bool allowUnregistered)
{
// init description
InitOptionDescription();

View File

@@ -17,6 +17,7 @@
#define FAIRMQPROGOPTIONS_H
#include <unordered_map>
#include <functional>
#include <map>
#include <set>
#include <mutex>
@@ -38,7 +39,7 @@ class FairMQProgOptions : public FairProgOptions , public FairMQEventManager
// parse command line and txt/INI configuration file.
// default parser for the mq-configuration file (JSON/XML) is called if command line key mq-config is called
virtual void ParseAll(const int argc, char** argv, bool allowUnregistered = false);
virtual void ParseAll(const int argc, const char** argv, bool allowUnregistered = false);
// external parser, store function
template <typename T, typename ...Args>

View File

@@ -124,7 +124,7 @@ void FairProgOptions::UseConfigFile(const string& filename)
/// //////////////////////////////////////////////////////////////////////////////////////////////////////
/// Parser
int FairProgOptions::ParseCmdLine(const int argc, char** argv, const po::options_description& desc, po::variables_map& varmap, bool allowUnregistered)
int FairProgOptions::ParseCmdLine(const int argc, const char** argv, const po::options_description& desc, po::variables_map& varmap, bool allowUnregistered)
{
// get options from cmd line and store in variable map
// here we use command_line_parser instead of parse_command_line, to allow unregistered and positional options
@@ -151,7 +151,7 @@ int FairProgOptions::ParseCmdLine(const int argc, char** argv, const po::options
return 0;
}
int FairProgOptions::ParseCmdLine(const int argc, char** argv, const po::options_description& desc, bool allowUnregistered)
int FairProgOptions::ParseCmdLine(const int argc, const char** argv, const po::options_description& desc, bool allowUnregistered)
{
return ParseCmdLine(argc, argv, desc, fVarMap, allowUnregistered);
}

View File

@@ -151,8 +151,8 @@ class FairProgOptions
const po::variables_map& GetVarMap() const { return fVarMap; }
// boost prog options parsers
int ParseCmdLine(const int argc, char** argv, const po::options_description& desc, po::variables_map& varmap, bool allowUnregistered = false);
int ParseCmdLine(const int argc, char** argv, const po::options_description& desc, bool allowUnregistered = false);
int ParseCmdLine(const int argc, const char** argv, const po::options_description& desc, po::variables_map& varmap, bool allowUnregistered = false);
int ParseCmdLine(const int argc, const char** argv, const po::options_description& desc, bool allowUnregistered = false);
int ParseCfgFile(const std::string& filename, const po::options_description& desc, po::variables_map& varmap, bool allowUnregistered = false);
int ParseCfgFile(const std::string& filename, const po::options_description& desc, bool allowUnregistered = false);
@@ -161,7 +161,7 @@ class FairProgOptions
int ParseEnvironment(const std::function<std::string(std::string)>&);
virtual void ParseAll(const int argc, char** argv, bool allowUnregistered = false) = 0;// TODO change return type to bool and propagate to executable
virtual void ParseAll(const int argc, const char** argv, bool allowUnregistered = false) = 0;// TODO change return type to bool and propagate to executable
virtual int PrintOptions();
virtual int PrintOptionsRaw();