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

A class providing a simple implementation of a container of properties. More...

#include <PropertyHolder.h>

Collaboration diagram for SourceXtractor::PropertyHolder:
[legend]

Public Member Functions

virtual ~PropertyHolder ()=default
 Destructor. More...
 
 PropertyHolder (const PropertyHolder &)=delete
 
PropertyHolderoperator= (const PropertyHolder &)=delete
 
 PropertyHolder (PropertyHolder &&)=delete
 
PropertyHolderoperator= (PropertyHolder &&)=delete
 
 PropertyHolder ()
 Constructors. More...
 
const PropertygetProperty (const PropertyId &property_id) const
 Returns a reference to a Property if it is set, if not throws a PropertyNotFoundException. More...
 
void setProperty (std::unique_ptr< Property > property, const PropertyId &property_id)
 Sets a property, overwriting it if necessary. More...
 
bool isPropertySet (const PropertyId &property_id) const
 Returns true if the property is set. More...
 
void clear ()
 

Private Attributes

std::unordered_map< PropertyId,
std::unique_ptr< Property > > 
m_properties
 

Detailed Description

A class providing a simple implementation of a container of properties.

This class is used to provide a common implementation for objects that have properties

Definition at line 43 of file PropertyHolder.h.

Constructor & Destructor Documentation

virtual SourceXtractor::PropertyHolder::~PropertyHolder ( )
virtualdefault

Destructor.

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

Constructors.

Definition at line 57 of file PropertyHolder.h.

Member Function Documentation

void SourceXtractor::PropertyHolder::clear ( )
const Property & SourceXtractor::PropertyHolder::getProperty ( const PropertyId property_id) const
bool SourceXtractor::PropertyHolder::isPropertySet ( const PropertyId property_id) const
PropertyHolder& SourceXtractor::PropertyHolder::operator= ( const PropertyHolder )
delete
PropertyHolder& SourceXtractor::PropertyHolder::operator= ( PropertyHolder &&  )
delete
void SourceXtractor::PropertyHolder::setProperty ( std::unique_ptr< Property property,
const PropertyId property_id 
)

Sets a property, overwriting it if necessary.

Definition at line 40 of file PropertyHolder.cpp.

References m_properties, and std::move().

Referenced by SourceXtractor::SimpleSource::setProperty(), SourceXtractor::SimpleSourceGroup::setProperty(), SourceXtractor::SourceWithOnDemandProperties::setProperty(), SourceXtractor::SourceGroupWithOnDemandProperties::setProperty(), and SourceXtractor::SourceGroupWithOnDemandProperties::EntangledSource::setProperty().

Here is the call graph for this function:

Member Data Documentation

std::unordered_map<PropertyId, std::unique_ptr<Property> > SourceXtractor::PropertyHolder::m_properties
private

Definition at line 72 of file PropertyHolder.h.

Referenced by clear(), getProperty(), isPropertySet(), and setProperty().


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