SourceXtractorPlusPlus 1.0.3
SourceXtractor++, the next generation SExtractor
Loading...
Searching...
No Matches
SimpleSourceGroup.cpp
Go to the documentation of this file.
1
17/*
18 * @file SimpleSourceGroup.cpp
19 * @author nikoapos
20 */
21
23
24namespace SourceXtractor {
25
29
33
37
41
45
49
53
55 auto next_iter = m_sources.erase(pos);
56 return next_iter;
57}
58
60 auto& other_group = dynamic_cast<SimpleSourceGroup&>(other);
61 for (auto& source : other_group.m_sources) {
62 this->m_sources.emplace_back(std::move(source));
63 }
64 other_group.m_sources.clear();
65 m_property_holder.clear();
66}
67
68const Property& SimpleSourceGroup::getProperty(const PropertyId& property_id) const {
69 return m_property_holder.getProperty(property_id);
70}
71
73 m_property_holder.setProperty(std::move(property), property_id);
74}
75
76unsigned int SimpleSourceGroup::size() const {
77 return m_sources.size();
78}
79
80} // SourceXtractor namespace
Identifier used to set and retrieve properties.
Definition PropertyId.h:40
Base class for all Properties. (has no actual content)
Definition Property.h:33
A bare bones implementation of SourceGroupInterface meant to be used to implement unit tests.
iterator removeSource(iterator pos) override
void setProperty(std::unique_ptr< Property > property, const PropertyId &property_id) override
unsigned int size() const override
const_iterator cbegin() const override
void merge(SourceGroupInterface &&other) override
const_iterator cend() const override
std::list< SourceWrapper > m_sources
const Property & getProperty(const PropertyId &property_id) const override
void addSource(std::unique_ptr< SourceInterface > source) override
Defines the interface used to group sources.
std::list< SourceWrapper >::const_iterator const_iterator
std::list< SourceWrapper >::iterator iterator
T clear(T... args)
T move(T... args)