SourceXtractorPlusPlus 0.21
SourceXtractor++, the next generation SExtractor
Loading...
Searching...
No Matches
SimpleSource.h
Go to the documentation of this file.
1
17/*
18 * SimpleSource.h
19 *
20 * Created on: Aug 9, 2016
21 * Author: mschefer
22 */
23
24#ifndef _SEFRAMEWORK_SOURCE_SIMPLESOURCE_H_
25#define _SEFRAMEWORK_SOURCE_SIMPLESOURCE_H_
26
29
30namespace SourceXtractor {
31
42
43public:
44
46 virtual ~SimpleSource() = default;
47
48 // removes copy/move constructors and assignment operators
49 SimpleSource(const SimpleSource&) = delete;
53
56
57 // Note : Because the get/setProperty() methods of the SourceInterface are
58 // templated, the overrides of the non-templated versions will hide them. For
59 // this reason it is necessary to re-introduce the templated methods, which is
60 // done by the using statements below.
63
64protected:
65
66 // Implementation of SourceInterface
67 const Property& getProperty(const PropertyId& property_id) const override {
69 }
70
74
75private:
77};
78
79}
80
81#endif /* _SEFRAMEWORK_SOURCE_SIMPLESOURCE_H_ */
A class providing a simple implementation of a container of properties.
const Property & getProperty(const PropertyId &property_id) const
Returns a reference to a Property if it is set, if not throws a PropertyNotFoundException.
void setProperty(std::unique_ptr< Property > property, const PropertyId &property_id)
Sets a property, overwriting it if necessary.
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 trivial implementation of SourceInterface meant to be used in unit tests.
const Property & getProperty(const PropertyId &property_id) const override
virtual ~SimpleSource()=default
Destructor.
SimpleSource(SimpleSource &&)=delete
PropertyHolder m_property_holder
SimpleSource & operator=(SimpleSource &&)=delete
void setProperty(std::unique_ptr< Property > property, const PropertyId &property_id) override
SimpleSource(const SimpleSource &)=delete
SimpleSource & operator=(const SimpleSource &)=delete
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.
T move(T... args)