SourceXtractorPlusPlus  0.11
Please provide a description of the project.
AttractorsPartitionConfig.cpp
Go to the documentation of this file.
1 
17 /*
18  * @file AttractorsPartitionConfig.cpp
19  * @author nikoapos
20  */
21 
25 
27 
28 using namespace Euclid::Configuration;
29 namespace po = boost::program_options;
30 
31 namespace SourceXtractor {
32 
33 static const std::string USE_ATTRACTORS_PARTITION {"use-attractors-partition"};
34 
35 AttractorsPartitionConfig::AttractorsPartitionConfig(long manager_id) : Configuration(manager_id) {
36  declareDependency<PartitionStepConfig>();
38 
39 }
40 
42  return { {"Extraction", {
43  {USE_ATTRACTORS_PARTITION.c_str(), po::bool_switch(),
44  "Enables the use of attractors for partitioning"}
45  }}};
46 }
47 
49  if (args.at(USE_ATTRACTORS_PARTITION).as<bool>()) {
50  getDependency<PartitionStepConfig>().addPartitionStepCreator(
51  [](std::shared_ptr<SourceFactory> source_factory) {
52  return std::make_shared<AttractorsPartitionStep>(source_factory);
53  }
54  );
55  }
56 }
57 
58 } // SourceXtractor namespace
AttractorsPartitionConfig.h
std::string
STL class.
SourceXtractor::MinAreaPartitionConfig
Definition: MinAreaPartitionConfig.h:29
std::shared_ptr< SourceFactory >
SourceXtractor::AttractorsPartitionConfig::AttractorsPartitionConfig
AttractorsPartitionConfig(long manager_id)
Definition: AttractorsPartitionConfig.cpp:35
Euclid::Configuration
AttractorsPartitionStep.h
SourceXtractor
Definition: Aperture.h:30
SourceXtractor::USE_ATTRACTORS_PARTITION
static const std::string USE_ATTRACTORS_PARTITION
Definition: AttractorsPartitionConfig.cpp:33
std::map::at
T at(T... args)
std::string::c_str
T c_str(T... args)
SourceXtractor::AttractorsPartitionConfig::getProgramOptions
std::map< std::string, OptionDescriptionList > getProgramOptions() override
Definition: AttractorsPartitionConfig.cpp:41
std::map
STL class.
SourceXtractor::AttractorsPartitionConfig::initialize
void initialize(const UserValues &args) override
Definition: AttractorsPartitionConfig.cpp:48
PartitionStepConfig.h
Euclid::Configuration::Configuration
Euclid::Configuration::ConfigManager::getInstance
static ConfigManager & getInstance(long id)
Euclid::Configuration::ConfigManager::registerDependency
void registerDependency()
MinAreaPartitionConfig.h