SourceXtractorPlusPlus 0.19
SourceXtractor++, the next generation SExtractor
Loading...
Searching...
No Matches
SourceGroupWithOnDemandProperties.h
Go to the documentation of this file.
1
23#ifndef _SEFRAMEWORK_SOURCE_SOURCEGROUP_H
24#define _SEFRAMEWORK_SOURCE_SOURCEGROUP_H
25
26#include <set>
27#include <iterator>
28#include <type_traits>
29
34
35namespace SourceXtractor {
36
43
44public:
45
47
52
53 iterator begin() override;
54
55 iterator end() override;
56
57 const_iterator cbegin() const override;
58
59 const_iterator cend() const override;
60
61 const_iterator begin() const override;
62
63 const_iterator end() const override;
64
65 void addSource(std::unique_ptr<SourceInterface> source) override;
66
67 iterator removeSource(iterator pos) override;
68
69 void merge(SourceGroupInterface&& other) override;
70
71 unsigned int size() const override;
72
75
76protected:
77
78 const Property& getProperty(const PropertyId& property_id) const override;
79
80 void setProperty(std::unique_ptr<Property> property, const PropertyId& property_id) override;
81
82private:
83
84 class EntangledSource;
88
90
91}; /* End of SourceGroup class */
92
93
94
96
97public:
98
100
101 virtual ~EntangledSource() = default;
102
103 const Property& getProperty(const PropertyId& property_id) const override;
104
105 void setProperty(std::unique_ptr<Property> property, const PropertyId& property_id) override;
106
107 bool operator<(const EntangledSource& other) const;
108
109private:
110
114
117
118};
119
120} /* namespace SourceXtractor */
121
122#endif
A class providing a simple implementation of a container of properties.
Identifier used to set and retrieve properties.
Definition: PropertyId.h:40
Base class for all Properties. (has no actual content)
Definition: Property.h:33
Defines the interface used to group sources.
std::list< SourceWrapper >::const_iterator const_iterator
std::list< SourceWrapper >::iterator iterator
const Property & getProperty(const PropertyId &property_id) const override
void setProperty(std::unique_ptr< Property > property, const PropertyId &property_id) override
A SourceGroupInterface implementation which used a TaskProvider to compute missing properties.
virtual ~SourceGroupWithOnDemandProperties()=default
Destructor.
const Property & getProperty(const PropertyId &property_id) const override
void setProperty(std::unique_ptr< Property > property, const PropertyId &property_id) override
void addSource(std::unique_ptr< SourceInterface > source) override
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.