SourceXtractorPlusPlus 1.0.3
SourceXtractor++, the next generation SExtractor
Loading...
Searching...
No Matches
AttractorsPartitionConfig.cpp
Go to the documentation of this file.
1
17/*
18 * @file AttractorsPartitionConfig.cpp
19 * @author nikoapos
20 */
21
26
28
29using namespace Euclid::Configuration;
30namespace po = boost::program_options;
31
32namespace SourceXtractor {
33
34static const std::string USE_ATTRACTORS_PARTITION {"use-attractors-partition"};
35
39
40 // this is used to enforce the order the PartitionSteps are added and performed
42}
43
45 return { {"Extraction", {
46 {USE_ATTRACTORS_PARTITION.c_str(), po::value<bool>()->default_value(false),
47 "Enables the use of attractors for partitioning"}
48 }}};
49}
50
52 if (getDependency<DetectionFrameConfig>().getDetectionFrames().size() > 0) {
53 if (args.at(USE_ATTRACTORS_PARTITION).as<bool>()) {
54 getDependency<PartitionStepConfig>().addPartitionStepCreator(
55 [](std::shared_ptr<SourceFactory> source_factory) {
56 return std::make_shared<AttractorsPartitionStep>(source_factory);
57 }
58 );
59 }
60 }
61}
62
63} // SourceXtractor namespace
T at(T... args)
static ConfigManager & getInstance(long id)
std::map< std::string, boost::program_options::variable_value > UserValues
std::map< std::string, OptionDescriptionList > getProgramOptions() override
void initialize(const UserValues &args) override
T make_shared(T... args)
static const std::string USE_ATTRACTORS_PARTITION