SourceXtractorPlusPlus 1.0.3
SourceXtractor++, the next generation SExtractor
Loading...
Searching...
No Matches
SourceXtractor::SimpleSource Class Reference

A trivial implementation of SourceInterface meant to be used in unit tests. More...

#include <SimpleSource.h>

Inheritance diagram for SourceXtractor::SimpleSource:
Collaboration diagram for SourceXtractor::SimpleSource:

Public Member Functions

virtual ~SimpleSource ()=default
 Destructor.
 SimpleSource (const SimpleSource &)=delete
SimpleSourceoperator= (const SimpleSource &)=delete
 SimpleSource (SimpleSource &&)=delete
SimpleSourceoperator= (SimpleSource &&)=delete
 SimpleSource ()
 Constructor.
template<typename PropertyType>
const PropertyType & getProperty (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)
Public Member Functions inherited from SourceXtractor::SourceInterface
virtual ~SourceInterface ()=default
 Destructor.
template<typename PropertyType>
const PropertyType & getProperty (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)

Protected Member Functions

const PropertygetProperty (const PropertyId &property_id) const override
void setProperty (std::unique_ptr< Property > property, const PropertyId &property_id) override

Private Attributes

PropertyHolder m_property_holder

Detailed Description

A trivial implementation of SourceInterface meant to be used in unit tests.

Unlike SourceWithOnDemandproperties, SimpleSource doesn't do any computation of properties but is instead just a simple container for properties.

Definition at line 41 of file SimpleSource.h.

Constructor & Destructor Documentation

◆ ~SimpleSource()

virtual SourceXtractor::SimpleSource::~SimpleSource ( )
virtualdefault

Destructor.

◆ SimpleSource() [1/3]

SourceXtractor::SimpleSource::SimpleSource ( const SimpleSource & )
delete

References SimpleSource().

Referenced by operator=(), operator=(), SimpleSource(), and SimpleSource().

Here is the call graph for this function:

◆ SimpleSource() [2/3]

SourceXtractor::SimpleSource::SimpleSource ( SimpleSource && )
delete

References SimpleSource().

Here is the call graph for this function:

◆ SimpleSource() [3/3]

SourceXtractor::SimpleSource::SimpleSource ( )
inline

Constructor.

Definition at line 55 of file SimpleSource.h.

Member Function Documentation

◆ getProperty() [1/2]

const Property & SourceXtractor::SimpleSource::getProperty ( const PropertyId & property_id) const
inlineoverrideprotectedvirtual

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 67 of file SimpleSource.h.

References m_property_holder.

◆ 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.

◆ operator=() [1/2]

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

References SimpleSource().

Here is the call graph for this function:

◆ operator=() [2/2]

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

References SimpleSource().

Here is the call graph for this function:

◆ 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]

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

Implements SourceXtractor::SourceInterface.

Definition at line 71 of file SimpleSource.h.

References m_property_holder, and std::move().

Here is the call graph for this function:

Member Data Documentation

◆ m_property_holder

PropertyHolder SourceXtractor::SimpleSource::m_property_holder
private

Definition at line 76 of file SimpleSource.h.

Referenced by getProperty(), and setProperty().


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