SourceXtractorPlusPlus 1.0.3
SourceXtractor++, the next generation SExtractor
Loading...
Searching...
No Matches
SplitSourcesCriteria.cpp
Go to the documentation of this file.
1
17/*
18 * SplitSourcesCriteria.cpp
19 *
20 * Created on: Apr 26, 2017
21 * Author: mschefer
22 */
23
26
27namespace SourceXtractor {
28
29bool SplitSourcesCriteria::shouldGroup(const SourceInterface& first, const SourceInterface& second) const {
30 auto first_id = first.getProperty<SourceId>().getDetectionId();
31 auto second_id = second.getProperty<SourceId>().getDetectionId();
32
33 return first_id == second_id;
34}
35
36} // SourceXtractor namespace
37
The SourceInterface is an abstract "source" that has properties attached to it.
const PropertyType & getProperty(unsigned int index=0) const
Convenience template method to call getProperty() with a more user-friendly syntax.
bool shouldGroup(const SourceInterface &first, const SourceInterface &second) const override
Determines if the two sources should be grouped together.