SourceXtractorPlusPlus  0.11
Please provide a description of the project.
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Protected Member Functions | Private Attributes | List of all members
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:
[legend]
Collaboration diagram for SourceXtractor::SimpleSource:
[legend]

Public Member Functions

virtual ~SimpleSource ()=default
 Destructor. More...
 
 SimpleSource (const SimpleSource &)=delete
 
SimpleSourceoperator= (const SimpleSource &)=delete
 
 SimpleSource (SimpleSource &&)=delete
 
SimpleSourceoperator= (SimpleSource &&)=delete
 
 SimpleSource ()
 Constructor. More...
 
- 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

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

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

Destructor.

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

Constructor.

Definition at line 55 of file SimpleSource.h.

Member Function Documentation

virtual 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 SourceXtractor::PropertyHolder::getProperty(), and m_property_holder.

Here is the call graph for this function:

SimpleSource& SourceXtractor::SimpleSource::operator= ( const SimpleSource )
delete
SimpleSource& SourceXtractor::SimpleSource::operator= ( SimpleSource &&  )
delete
virtual 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, std::move(), and SourceXtractor::PropertyHolder::setProperty().

Here is the call graph for this function:

Member Data Documentation

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: