SourceXtractorPlusPlus  0.15
Please provide a description of the project.
Public Member Functions | Protected Member Functions | Private Attributes | List of all members
SourceXtractor::SourceWithOnDemandProperties Class Reference

#include <SourceWithOnDemandProperties.h>

Inheritance diagram for SourceXtractor::SourceWithOnDemandProperties:
[legend]
Collaboration diagram for SourceXtractor::SourceWithOnDemandProperties:
[legend]

Public Member Functions

virtual ~SourceWithOnDemandProperties ()=default
 Destructor. More...
 
 SourceWithOnDemandProperties (const SourceWithOnDemandProperties &)=delete
 
SourceWithOnDemandPropertiesoperator= (const SourceWithOnDemandProperties &)=delete
 
 SourceWithOnDemandProperties (SourceWithOnDemandProperties &&)=delete
 
SourceWithOnDemandPropertiesoperator= (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 PropertygetProperty (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
 
- Public Member Functions inherited from SourceXtractor::SourceInterface
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 PropertygetProperty (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 TaskProviderm_task_provider
 
PropertyHolder m_property_holder
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ ~SourceWithOnDemandProperties()

virtual SourceXtractor::SourceWithOnDemandProperties::~SourceWithOnDemandProperties ( )
virtualdefault

Destructor.

◆ SourceWithOnDemandProperties() [1/3]

SourceXtractor::SourceWithOnDemandProperties::SourceWithOnDemandProperties ( const SourceWithOnDemandProperties )
delete

◆ SourceWithOnDemandProperties() [2/3]

SourceXtractor::SourceWithOnDemandProperties::SourceWithOnDemandProperties ( SourceWithOnDemandProperties &&  )
delete

◆ SourceWithOnDemandProperties() [3/3]

SourceXtractor::SourceWithOnDemandProperties::SourceWithOnDemandProperties ( std::shared_ptr< const TaskProvider task_provider)

Constructor.

Definition at line 31 of file SourceWithOnDemandProperties.cpp.

Member Function Documentation

◆ getProperty() [1/3]

const Property & SourceXtractor::SourceWithOnDemandProperties::getProperty ( const PropertyId property_id) const
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.

Here is the call graph for this function:

◆ getProperty() [2/3]

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.

◆ getProperty() [3/3]

template<typename PropertyType >
const PropertyType& SourceXtractor::SourceInterface::getProperty ( typename PropertyType  )
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().

Here is the call graph for this function:

◆ operator=() [1/2]

SourceWithOnDemandProperties& SourceXtractor::SourceWithOnDemandProperties::operator= ( const SourceWithOnDemandProperties )
delete

◆ operator=() [2/2]

SourceWithOnDemandProperties& SourceXtractor::SourceWithOnDemandProperties::operator= ( SourceWithOnDemandProperties &&  )
delete

◆ setProperty() [1/3]

template<typename PropertyType , typename ... Args>
void SourceXtractor::SourceInterface::setProperty ( typename PropertyType  ,
typename ...  Args 
)
inline

Definition at line 72 of file SourceInterface.h.

◆ setProperty() [2/3]

void SourceXtractor::SourceWithOnDemandProperties::setProperty ( std::unique_ptr< Property property,
const PropertyId property_id 
)
overrideprotectedvirtual

Implements SourceXtractor::SourceInterface.

Definition at line 52 of file SourceWithOnDemandProperties.cpp.

References m_property_holder, std::move(), and SourceXtractor::PropertyHolder::setProperty().

Here is the call graph for this function:

◆ setProperty() [3/3]

virtual void SourceXtractor::SourceInterface::setProperty

Member Data Documentation

◆ m_property_holder

PropertyHolder SourceXtractor::SourceWithOnDemandProperties::m_property_holder
private

Definition at line 77 of file SourceWithOnDemandProperties.h.

Referenced by getProperty(), and setProperty().

◆ m_task_provider

std::shared_ptr<const TaskProvider> SourceXtractor::SourceWithOnDemandProperties::m_task_provider
private

Definition at line 76 of file SourceWithOnDemandProperties.h.

Referenced by getProperty().


The documentation for this class was generated from the following files: