SourceXtractorPlusPlus  0.15
Please provide a description of the project.
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
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 
27 namespace SourceXtractor {
28 
29 bool 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 
const PropertyType & getProperty(unsigned int index=0) const
Convenience template method to call getProperty() with a more user-friendly syntax.
virtual bool shouldGroup(const SourceInterface &first, const SourceInterface &second) const override
Determines if the two sources should be grouped together.
The SourceInterface is an abstract &quot;source&quot; that has properties attached to it.