SourceXtractorPlusPlus
0.13
Please provide a description of the project.
|
#include <SourceWithOnDemandProperties.h>
Public Member Functions | |
virtual | ~SourceWithOnDemandProperties ()=default |
Destructor. More... | |
SourceWithOnDemandProperties (const SourceWithOnDemandProperties &)=delete | |
SourceWithOnDemandProperties & | operator= (const SourceWithOnDemandProperties &)=delete |
SourceWithOnDemandProperties (SourceWithOnDemandProperties &&)=delete | |
SourceWithOnDemandProperties & | operator= (SourceWithOnDemandProperties &&)=delete |
SourceWithOnDemandProperties (std::shared_ptr< const TaskProvider > task_provider) | |
Constructor. More... | |
template<typename PropertyType > | |
const PropertyType & | getProperty (unsigned int index=0) const |
Convenience template method to call getProperty() with a more user-friendly syntax. More... | |
virtual const Property & | getProperty (const PropertyId &property_id) const=0 |
template<typename PropertyType , typename ... Args> | |
void | setProperty (Args... args) |
virtual void | setProperty (std::unique_ptr< Property > property, const PropertyId &property_id)=0 |
![]() | |
virtual | ~SourceInterface ()=default |
Destructor. More... | |
template<typename PropertyType > | |
const PropertyType & | getProperty (unsigned int index=0) const |
Convenience template method to call getProperty() with a more user-friendly syntax. More... | |
template<typename PropertyType , typename ... Args> | |
void | setIndexedProperty (std::size_t index, Args... args) |
Convenience template method to call setProperty() with a more user-friendly syntax. More... | |
template<typename PropertyType , typename ... Args> | |
void | setProperty (Args... args) |
Protected Member Functions | |
virtual const Property & | getProperty (const PropertyId &property_id) const override |
virtual void | setProperty (std::unique_ptr< Property > property, const PropertyId &property_id) override |
Private Attributes | |
std::shared_ptr< const TaskProvider > | m_task_provider |
PropertyHolder | m_property_holder |
Provides getProperty() and setProperty() implementations which use a TaskProvider to compute the non already available properties on demand.
Definition at line 43 of file SourceWithOnDemandProperties.h.
|
virtualdefault |
Destructor.
|
delete |
|
delete |
SourceXtractor::SourceWithOnDemandProperties::SourceWithOnDemandProperties | ( | std::shared_ptr< const TaskProvider > | task_provider | ) |
Constructor.
Definition at line 31 of file SourceWithOnDemandProperties.cpp.
|
overrideprotectedvirtual |
Returns a reference to the requested property. The property may be computed if needed Throws a PropertyNotFoundException if the property cannot be provided.
Implements SourceXtractor::SourceInterface.
Definition at line 35 of file SourceWithOnDemandProperties.cpp.
References SourceXtractor::SourceTask::computeProperties(), SourceXtractor::PropertyHolder::getProperty(), SourceXtractor::PropertyHolder::isPropertySet(), m_property_holder, and m_task_provider.
virtual const Property& SourceXtractor::SourceInterface::getProperty |
Returns a reference to the requested property. The property may be computed if needed Throws a PropertyNotFoundException if the property cannot be provided.
|
inline |
Convenience template method to call getProperty() with a more user-friendly syntax.
Definition at line 57 of file SourceInterface.h.
References SourceXtractor::SourceInterface::getProperty().
|
delete |
|
delete |
|
inline |
Definition at line 72 of file SourceInterface.h.
|
overrideprotectedvirtual |
Implements SourceXtractor::SourceInterface.
Definition at line 52 of file SourceWithOnDemandProperties.cpp.
References m_property_holder, std::move(), and SourceXtractor::PropertyHolder::setProperty().
virtual void SourceXtractor::SourceInterface::setProperty |
|
private |
Definition at line 77 of file SourceWithOnDemandProperties.h.
Referenced by getProperty(), and setProperty().
|
private |
Definition at line 76 of file SourceWithOnDemandProperties.h.
Referenced by getProperty().