SourceXtractorPlusPlus  0.8
Please provide a description of the project.
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Classes | Public Member Functions | Protected Member Functions | Private Attributes | List of all members
SourceXtractor::SimpleSourceGroup Class Reference

A bare bones implementation of SourceGroupInterface meant to be used to implement unit tests. More...

#include <SimpleSourceGroup.h>

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

Classes

class  iter
 

Public Member Functions

virtual ~SimpleSourceGroup ()=default
 
iterator begin () override
 
iterator end () override
 
const_iterator cbegin () override
 
const_iterator cend () override
 
const_iterator begin () const override
 
const_iterator end () const override
 
void addSource (std::shared_ptr< SourceInterface > source) override
 
iterator removeSource (iterator pos) override
 
unsigned int size () const override
 
void merge (const SourceGroupInterface &other) override
 
- Public Member Functions inherited from SourceXtractor::SourceGroupInterface
template<typename SourceCollection >
void addAllSources (const SourceCollection &sources)
 Convenient method to add all the sources of a collection. More...
 

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
const PropertygetPropertyFromInterface (const SourceInterface &source, const PropertyId &property_id) const
 
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)
 

Private Attributes

std::list< std::shared_ptr
< SourceInterface > > 
m_sources
 
PropertyHolder m_property_holder
 

Additional Inherited Members

- Public Types inherited from SourceXtractor::SourceGroupInterface
using iterator = GroupIterator< SourceInterface >
 
using const_iterator = GroupIterator< const SourceInterface >
 

Detailed Description

A bare bones implementation of SourceGroupInterface meant to be used to implement unit tests.

Definition at line 39 of file SimpleSourceGroup.h.

Constructor & Destructor Documentation

virtual SourceXtractor::SimpleSourceGroup::~SimpleSourceGroup ( )
virtualdefault

Member Function Documentation

void SourceXtractor::SimpleSourceGroup::addSource ( std::shared_ptr< SourceInterface source)
overridevirtual

Implements SourceXtractor::SourceGroupInterface.

Definition at line 50 of file SimpleSourceGroup.cpp.

References m_sources.

SimpleSourceGroup::iterator SourceXtractor::SimpleSourceGroup::begin ( )
overridevirtual

Implements SourceXtractor::SourceGroupInterface.

Definition at line 26 of file SimpleSourceGroup.cpp.

References m_sources.

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

Implements SourceXtractor::SourceGroupInterface.

Definition at line 42 of file SimpleSourceGroup.cpp.

References m_sources.

SimpleSourceGroup::const_iterator SourceXtractor::SimpleSourceGroup::cbegin ( )
overridevirtual

Implements SourceXtractor::SourceGroupInterface.

Definition at line 34 of file SimpleSourceGroup.cpp.

References m_sources.

SimpleSourceGroup::const_iterator SourceXtractor::SimpleSourceGroup::cend ( )
overridevirtual

Implements SourceXtractor::SourceGroupInterface.

Definition at line 38 of file SimpleSourceGroup.cpp.

References m_sources.

SimpleSourceGroup::iterator SourceXtractor::SimpleSourceGroup::end ( )
overridevirtual

Implements SourceXtractor::SourceGroupInterface.

Definition at line 30 of file SimpleSourceGroup.cpp.

References m_sources.

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

Implements SourceXtractor::SourceGroupInterface.

Definition at line 46 of file SimpleSourceGroup.cpp.

References m_sources.

const Property & SourceXtractor::SimpleSourceGroup::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 65 of file SimpleSourceGroup.cpp.

References SourceXtractor::PropertyHolder::getProperty(), and m_property_holder.

Here is the call graph for this function:

void SourceXtractor::SimpleSourceGroup::merge ( const SourceGroupInterface other)
overridevirtual

Implements SourceXtractor::SourceGroupInterface.

Definition at line 60 of file SimpleSourceGroup.cpp.

References SourceXtractor::SourceGroupInterface::addAllSources().

Here is the call graph for this function:

SourceGroupInterface::iterator SourceXtractor::SimpleSourceGroup::removeSource ( iterator  pos)
overridevirtual

Implements SourceXtractor::SourceGroupInterface.

Definition at line 54 of file SimpleSourceGroup.cpp.

References SourceXtractor::SourceGroupInterface::GroupIterator< T >::getImpl(), m_sources, and SourceXtractor::SimpleSourceGroup::iter::m_wrapped_it.

Here is the call graph for this function:

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

Implements SourceXtractor::SourceInterface.

Definition at line 69 of file SimpleSourceGroup.cpp.

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

Here is the call graph for this function:

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

Implements SourceXtractor::SourceGroupInterface.

Definition at line 73 of file SimpleSourceGroup.cpp.

References m_sources.

Member Data Documentation

PropertyHolder SourceXtractor::SimpleSourceGroup::m_property_holder
private

Definition at line 78 of file SimpleSourceGroup.h.

Referenced by getProperty(), and setProperty().

std::list<std::shared_ptr<SourceInterface> > SourceXtractor::SimpleSourceGroup::m_sources
private

Definition at line 76 of file SimpleSourceGroup.h.

Referenced by addSource(), begin(), cbegin(), cend(), end(), removeSource(), and size().


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