SourceXtractorPlusPlus 0.21
SourceXtractor++, the next generation SExtractor
Loading...
Searching...
No Matches
Classes | Public Types | Public Member Functions | Private Types | List of all members
SourceXtractor::SourceGroupInterface Class Referenceabstract

Defines the interface used to group sources. More...

#include <SourceGroupInterface.h>

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

Classes

class  SourceWrapper
 

Public Types

using iterator = std::list<SourceWrapper>::iterator
 
using const_iterator = std::list<SourceWrapper>::const_iterator
 

Public Member Functions

virtual iterator begin ()=0
 
virtual iterator end ()=0
 
virtual const_iterator cbegin () const =0
 
virtual const_iterator cend () const =0
 
virtual const_iterator begin () const =0
 
virtual const_iterator end () const =0
 
virtual void addSource (std::unique_ptr< SourceInterface > source)=0
 
virtual iterator removeSource (iterator pos)=0
 
virtual void merge (SourceGroupInterface &&other)=0
 
virtual unsigned int size () const =0
 
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.
 
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
 
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.
 

Private Types

template<typename Collection >
using CollectionType = typename std::iterator_traits<typename Collection::iterator>::value_type
 

Additional Inherited Members

- 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)
 

Detailed Description

Defines the interface used to group sources.

Warning: please note that the order in which the sources are added to a group is not preserved.

Definition at line 38 of file SourceGroupInterface.h.

Member Typedef Documentation

◆ CollectionType

Definition at line 41 of file SourceGroupInterface.h.

◆ const_iterator

Definition at line 79 of file SourceGroupInterface.h.

◆ iterator

Definition at line 78 of file SourceGroupInterface.h.

Member Function Documentation

◆ addAllSources()

void SourceXtractor::SourceGroupInterface::addAllSources ( SourceCollection && sources)
inline

Convenient method to add all the sources of a collection.

Definition at line 95 of file SourceGroupInterface.h.

References addSource(), and std::move().

Here is the call graph for this function:

◆ addSource()

virtual void SourceXtractor::SourceGroupInterface::addSource ( std::unique_ptr< SourceInterface > source)
pure virtual

◆ begin() [1/2]

virtual const_iterator SourceXtractor::SourceGroupInterface::begin ( ) const
pure virtual

◆ begin() [2/2]

virtual iterator SourceXtractor::SourceGroupInterface::begin ( )
pure virtual

◆ cbegin()

virtual const_iterator SourceXtractor::SourceGroupInterface::cbegin ( ) const
pure virtual

◆ cend()

virtual const_iterator SourceXtractor::SourceGroupInterface::cend ( ) const
pure virtual

◆ end() [1/2]

virtual const_iterator SourceXtractor::SourceGroupInterface::end ( ) const
pure virtual

◆ end() [2/2]

virtual iterator SourceXtractor::SourceGroupInterface::end ( )
pure virtual

◆ getProperty() [1/2]

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.

Implements SourceXtractor::SourceInterface.

Reimplemented in SourceXtractor::SourceGroupWithOnDemandProperties, and SourceXtractor::SourceGroupWithOnDemandProperties.

◆ getProperty() [2/2]

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()

virtual void SourceXtractor::SourceGroupInterface::merge ( SourceGroupInterface && other)
pure virtual

◆ removeSource()

virtual iterator SourceXtractor::SourceGroupInterface::removeSource ( iterator pos)
pure virtual

◆ setIndexedProperty()

template<typename PropertyType , typename ... Args>
void SourceXtractor::SourceInterface::setIndexedProperty ( std::size_t index,
Args... args )
inline

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

Definition at line 64 of file SourceInterface.h.

◆ setProperty() [1/2]

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

Definition at line 72 of file SourceInterface.h.

◆ setProperty() [2/2]

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

◆ size()

virtual unsigned int SourceXtractor::SourceGroupInterface::size ( ) const
pure virtual

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