SourceXtractorPlusPlus
1.0.3
SourceXtractor++, the next generation SExtractor
Loading...
Searching...
No Matches
SEFramework
SEFramework
Source
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
27
#include "
SEFramework/Source/SourceInterface.h
"
28
#include "
SEFramework/Property/PropertyHolder.h
"
29
30
namespace
SourceXtractor
{
31
40
41
class
SimpleSource
:
public
SourceInterface
{
42
43
public
:
44
46
virtual
~SimpleSource
() =
default
;
47
48
// removes copy/move constructors and assignment operators
49
SimpleSource
(
const
SimpleSource
&) =
delete
;
50
SimpleSource
&
operator=
(
const
SimpleSource
&) =
delete
;
51
SimpleSource
(
SimpleSource
&&) =
delete
;
52
SimpleSource
&
operator=
(
SimpleSource
&&) =
delete
;
53
55
SimpleSource
() {}
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.
61
using
SourceInterface::getProperty
;
62
using
SourceInterface::setProperty
;
63
64
protected
:
65
66
// Implementation of SourceInterface
67
const
Property
&
getProperty
(
const
PropertyId
& property_id)
const override
{
68
return
m_property_holder
.getProperty(property_id);
69
}
70
71
void
setProperty
(
std::unique_ptr<Property>
property,
const
PropertyId
& property_id)
override
{
72
m_property_holder
.setProperty(
std::move
(property), property_id);
73
}
74
75
private
:
76
PropertyHolder
m_property_holder
;
77
};
78
79
}
80
81
#endif
/* _SEFRAMEWORK_SOURCE_SIMPLESOURCE_H_ */
PropertyHolder.h
SourceInterface.h
SourceXtractor::PropertyHolder
A class providing a simple implementation of a container of properties.
Definition
PropertyHolder.h:43
SourceXtractor::PropertyId
Identifier used to set and retrieve properties.
Definition
PropertyId.h:40
SourceXtractor::Property
Base class for all Properties. (has no actual content).
Definition
Property.h:33
SourceXtractor::SimpleSource::getProperty
const Property & getProperty(const PropertyId &property_id) const override
Definition
SimpleSource.h:67
SourceXtractor::SimpleSource::~SimpleSource
virtual ~SimpleSource()=default
Destructor.
SourceXtractor::SimpleSource::SimpleSource
SimpleSource(SimpleSource &&)=delete
SourceXtractor::SimpleSource::m_property_holder
PropertyHolder m_property_holder
Definition
SimpleSource.h:76
SourceXtractor::SimpleSource::operator=
SimpleSource & operator=(SimpleSource &&)=delete
SourceXtractor::SimpleSource::setProperty
void setProperty(std::unique_ptr< Property > property, const PropertyId &property_id) override
Definition
SimpleSource.h:71
SourceXtractor::SimpleSource::SimpleSource
SimpleSource(const SimpleSource &)=delete
SourceXtractor::SimpleSource::operator=
SimpleSource & operator=(const SimpleSource &)=delete
SourceXtractor::SimpleSource::SimpleSource
SimpleSource()
Constructor.
Definition
SimpleSource.h:55
SourceXtractor::SourceInterface
The SourceInterface is an abstract "source" that has properties attached to it.
Definition
SourceInterface.h:46
SourceXtractor::SourceInterface::setProperty
void setProperty(Args... args)
Definition
SourceInterface.h:72
SourceXtractor::SourceInterface::getProperty
const PropertyType & getProperty(unsigned int index=0) const
Convenience template method to call getProperty() with a more user-friendly syntax.
Definition
SourceInterface.h:57
std::move
T move(T... args)
SourceXtractor
Definition
Aperture.h:30
std::unique_ptr
Generated by
1.15.0