SourceXtractorPlusPlus 0.21
SourceXtractor++, the next generation SExtractor
Loading...
Searching...
No Matches
Classes | Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes | List of all members
SourceXtractor::SourceGroupWithOnDemandProperties Class Reference

A SourceGroupInterface implementation which used a TaskProvider to compute missing properties. More...

#include <SourceGroupWithOnDemandProperties.h>

Inheritance diagram for SourceXtractor::SourceGroupWithOnDemandProperties:
Inheritance graph
[legend]
Collaboration diagram for SourceXtractor::SourceGroupWithOnDemandProperties:
Collaboration graph
[legend]

Classes

class  EntangledSource
 

Public Member Functions

 SourceGroupWithOnDemandProperties (std::shared_ptr< TaskProvider > task_provider)
 
virtual ~SourceGroupWithOnDemandProperties ()=default
 Destructor.
 
iterator begin () override
 
iterator end () override
 
const_iterator cbegin () const override
 
const_iterator cend () const override
 
const_iterator begin () const override
 
const_iterator end () const override
 
void addSource (std::unique_ptr< SourceInterface > source) override
 
iterator removeSource (iterator pos) override
 
void merge (SourceGroupInterface &&other) override
 
unsigned int size () const override
 
template<typename PropertyType >
const PropertyTypegetProperty (unsigned int index=0) const
 Convenience template method to call getProperty() with a more user-friendly syntax.
 
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::SourceGroupInterface
template<typename SourceCollection >
void addAllSources (SourceCollection &&sources)
 Convenient method to add all the sources of a collection.
 
template<typename PropertyType >
const PropertyTypegetProperty (unsigned int index=0) const
 Convenience template method to call getProperty() with a more user-friendly syntax.
 
template<typename PropertyType , typename ... Args>
void setProperty (Args... args)
 
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.
 

Protected Member Functions

const PropertygetProperty (const PropertyId &property_id) const override
 
void setProperty (std::unique_ptr< Property > property, const PropertyId &property_id) override
 
- Protected Member Functions inherited from SourceXtractor::SourceInterface
virtual ~SourceInterface ()=default
 Destructor.
 
template<typename PropertyType >
const PropertyTypegetProperty (unsigned int index=0) const
 Convenience template method to call getProperty() with a more user-friendly syntax.
 
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.
 
template<typename PropertyType , typename ... Args>
void setProperty (Args... args)
 

Private Member Functions

void clearGroupProperties ()
 

Private Attributes

std::list< SourceWrapperm_sources
 
PropertyHolder m_property_holder
 
std::shared_ptr< TaskProviderm_task_provider
 

Additional Inherited Members

- Public Types inherited from SourceXtractor::SourceGroupInterface
using iterator = std::list<SourceWrapper>::iterator
 
using const_iterator = std::list<SourceWrapper>::const_iterator
 

Detailed Description

A SourceGroupInterface implementation which used a TaskProvider to compute missing properties.

Definition at line 43 of file SourceGroupWithOnDemandProperties.h.

Constructor & Destructor Documentation

◆ SourceGroupWithOnDemandProperties()

SourceXtractor::SourceGroupWithOnDemandProperties::SourceGroupWithOnDemandProperties ( std::shared_ptr< TaskProvider > task_provider)
explicit

Definition at line 32 of file SourceGroupWithOnDemandProperties.cpp.

◆ ~SourceGroupWithOnDemandProperties()

virtual SourceXtractor::SourceGroupWithOnDemandProperties::~SourceGroupWithOnDemandProperties ( )
virtualdefault

Destructor.

Member Function Documentation

◆ addSource()

void SourceXtractor::SourceGroupWithOnDemandProperties::addSource ( std::unique_ptr< SourceInterface > source)
overridevirtual

Implements SourceXtractor::SourceGroupInterface.

Definition at line 60 of file SourceGroupWithOnDemandProperties.cpp.

References clearGroupProperties(), std::list< T >::emplace_back(), m_sources, and std::move().

Here is the call graph for this function:

◆ begin() [1/2]

SourceGroupWithOnDemandProperties::const_iterator SourceXtractor::SourceGroupWithOnDemandProperties::begin ( ) const
overridevirtual

Implements SourceXtractor::SourceGroupInterface.

Definition at line 52 of file SourceGroupWithOnDemandProperties.cpp.

References std::list< T >::cbegin(), and m_sources.

Here is the call graph for this function:

◆ begin() [2/2]

SourceGroupWithOnDemandProperties::iterator SourceXtractor::SourceGroupWithOnDemandProperties::begin ( )
overridevirtual

Implements SourceXtractor::SourceGroupInterface.

Definition at line 36 of file SourceGroupWithOnDemandProperties.cpp.

References std::list< T >::begin(), and m_sources.

Here is the call graph for this function:

◆ cbegin()

SourceGroupWithOnDemandProperties::const_iterator SourceXtractor::SourceGroupWithOnDemandProperties::cbegin ( ) const
overridevirtual

Implements SourceXtractor::SourceGroupInterface.

Definition at line 44 of file SourceGroupWithOnDemandProperties.cpp.

References std::list< T >::cbegin(), and m_sources.

Here is the call graph for this function:

◆ cend()

SourceGroupWithOnDemandProperties::const_iterator SourceXtractor::SourceGroupWithOnDemandProperties::cend ( ) const
overridevirtual

Implements SourceXtractor::SourceGroupInterface.

Definition at line 48 of file SourceGroupWithOnDemandProperties.cpp.

References std::list< T >::cend(), and m_sources.

Here is the call graph for this function:

◆ clearGroupProperties()

void SourceXtractor::SourceGroupWithOnDemandProperties::clearGroupProperties ( )
private

Definition at line 110 of file SourceGroupWithOnDemandProperties.cpp.

References SourceXtractor::PropertyHolder::clear(), m_property_holder, and m_sources.

Referenced by addSource(), merge(), and removeSource().

Here is the call graph for this function:

◆ end() [1/2]

SourceGroupWithOnDemandProperties::const_iterator SourceXtractor::SourceGroupWithOnDemandProperties::end ( ) const
overridevirtual

Implements SourceXtractor::SourceGroupInterface.

Definition at line 56 of file SourceGroupWithOnDemandProperties.cpp.

References std::list< T >::cend(), and m_sources.

Here is the call graph for this function:

◆ end() [2/2]

SourceGroupWithOnDemandProperties::iterator SourceXtractor::SourceGroupWithOnDemandProperties::end ( )
overridevirtual

Implements SourceXtractor::SourceGroupInterface.

Definition at line 40 of file SourceGroupWithOnDemandProperties.cpp.

References std::list< T >::end(), and m_sources.

Here is the call graph for this function:

◆ getProperty() [1/3]

const Property & SourceXtractor::SourceGroupWithOnDemandProperties::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.

Reimplemented from SourceXtractor::SourceGroupInterface.

Definition at line 84 of file SourceGroupWithOnDemandProperties.cpp.

References Elements::Logging::debug(), SourceXtractor::PropertyHolder::getProperty(), SourceXtractor::PropertyHolder::isPropertySet(), Euclid::Configuration::logger, m_property_holder, and m_task_provider.

Here is the call graph for this function:

◆ getProperty() [2/3]

virtual const Property & SourceXtractor::SourceInterface::getProperty ( const PropertyId & property_id) const
virtual

Returns a reference to the requested property. The property may be computed if needed Throws a PropertyNotFoundException if the property cannot be provided.

Reimplemented from SourceXtractor::SourceGroupInterface.

◆ getProperty() [3/3]

template<typename PropertyType >
const PropertyType & SourceXtractor::SourceInterface::getProperty ( unsigned int index = 0) const
inline

Convenience template method to call getProperty() with a more user-friendly syntax.

Definition at line 57 of file SourceInterface.h.

◆ merge()

void SourceXtractor::SourceGroupWithOnDemandProperties::merge ( SourceGroupInterface && other)
overridevirtual

Implements SourceXtractor::SourceGroupInterface.

Definition at line 71 of file SourceGroupWithOnDemandProperties.cpp.

References clearGroupProperties(), std::list< T >::emplace_back(), m_sources, and std::move().

Here is the call graph for this function:

◆ removeSource()

SourceGroupWithOnDemandProperties::iterator SourceXtractor::SourceGroupWithOnDemandProperties::removeSource ( iterator pos)
overridevirtual

Implements SourceXtractor::SourceGroupInterface.

Definition at line 65 of file SourceGroupWithOnDemandProperties.cpp.

References clearGroupProperties(), std::list< T >::erase(), and m_sources.

Here is the call graph for this function:

◆ setProperty() [1/3]

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

Definition at line 72 of file SourceInterface.h.

◆ setProperty() [2/3]

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

Reimplemented from SourceXtractor::SourceGroupInterface.

Definition at line 106 of file SourceGroupWithOnDemandProperties.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 ( std::unique_ptr< Property > property,
const PropertyId & property_id )
virtual

◆ size()

unsigned int SourceXtractor::SourceGroupWithOnDemandProperties::size ( ) const
overridevirtual

Implements SourceXtractor::SourceGroupInterface.

Definition at line 117 of file SourceGroupWithOnDemandProperties.cpp.

References m_sources, and std::list< T >::size().

Here is the call graph for this function:

Member Data Documentation

◆ m_property_holder

PropertyHolder SourceXtractor::SourceGroupWithOnDemandProperties::m_property_holder
private

◆ m_sources

std::list<SourceWrapper> SourceXtractor::SourceGroupWithOnDemandProperties::m_sources
private

◆ m_task_provider

std::shared_ptr<TaskProvider> SourceXtractor::SourceGroupWithOnDemandProperties::m_task_provider
private

Definition at line 88 of file SourceGroupWithOnDemandProperties.h.

Referenced by getProperty().


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