SourceXtractorPlusPlus  0.12
Please provide a description of the project.
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 
35 namespace SourceXtractor {
36 
43 
44 public:
45 
47 
51  virtual ~SourceGroupWithOnDemandProperties() = default;
52 
53  iterator begin() override;
54 
55  iterator end() override;
56 
57  const_iterator cbegin() override;
58 
59  const_iterator cend() override;
60 
61  const_iterator begin() const override;
62 
63  const_iterator end() const override;
64 
65  void addSource(std::shared_ptr<SourceInterface> source) override;
66 
67  iterator removeSource(iterator pos) override;
68 
69  void merge(const SourceGroupInterface& other) override;
70 
71  unsigned int size() const override;
72 
75 
76 protected:
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 
82 private:
83 
88 
89  void clearGroupProperties();
90 
91 }; /* End of SourceGroup class */
92 
93 
94 
96 
97 public:
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 
109 private:
110 
114 
117 
118 };
119 
120 } /* namespace SourceXtractor */
121 
122 #endif
void setProperty(std::unique_ptr< Property > property, const PropertyId &property_id) override
void merge(const SourceGroupInterface &other) override
std::list< SourceWrapper >::iterator iterator
A SourceGroupInterface implementation which used a TaskProvider to compute missing properties...
void addSource(std::shared_ptr< SourceInterface > source) override
SourceGroupWithOnDemandProperties(std::shared_ptr< TaskProvider > task_provider)
const Property & getProperty(const PropertyId &property_id) const override
Base class for all Properties. (has no actual content)
Definition: Property.h:33
const PropertyType & getProperty(unsigned int index=0) const
Convenience template method to call getProperty() with a more user-friendly syntax.
void setProperty(std::unique_ptr< Property > property, const PropertyId &property_id) override
Defines the interface used to group sources.
STL class.
Identifier used to set and retrieve properties.
Definition: PropertyId.h:40
std::list< SourceWrapper >::const_iterator const_iterator
virtual ~SourceGroupWithOnDemandProperties()=default
Destructor.
A class providing a simple implementation of a container of properties.
EntangledSource(std::shared_ptr< SourceInterface > source, SourceGroupWithOnDemandProperties &group)
The SourceInterface is an abstract "source" that has properties attached to it.
const Property & getProperty(const PropertyId &property_id) const override