SourceXtractorPlusPlus
0.14
Please provide a description of the project.
|
A class providing a simple implementation of a container of properties. More...
#include <PropertyHolder.h>
Public Member Functions | |
virtual | ~PropertyHolder ()=default |
Destructor. More... | |
PropertyHolder (const PropertyHolder &)=delete | |
PropertyHolder & | operator= (const PropertyHolder &)=delete |
PropertyHolder (PropertyHolder &&)=delete | |
PropertyHolder & | operator= (PropertyHolder &&)=delete |
PropertyHolder () | |
Constructors. More... | |
const Property & | getProperty (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 |
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.
|
virtualdefault |
Destructor.
|
delete |
|
delete |
|
inline |
Constructors.
Definition at line 57 of file PropertyHolder.h.
void SourceXtractor::PropertyHolder::clear | ( | ) |
Definition at line 48 of file PropertyHolder.cpp.
References m_properties.
Referenced by SourceXtractor::SourceGroupWithOnDemandProperties::clearGroupProperties(), and SourceXtractor::SimpleSourceGroup::merge().
const Property & SourceXtractor::PropertyHolder::getProperty | ( | const PropertyId & | property_id | ) | const |
Returns a reference to a Property if it is set, if not throws a PropertyNotFoundException.
Definition at line 29 of file PropertyHolder.cpp.
References m_properties.
Referenced by SourceXtractor::SimpleSource::getProperty(), SourceXtractor::SimpleSourceGroup::getProperty(), SourceXtractor::SourceWithOnDemandProperties::getProperty(), SourceXtractor::SourceGroupWithOnDemandProperties::getProperty(), and SourceXtractor::SourceGroupWithOnDemandProperties::EntangledSource::getProperty().
bool SourceXtractor::PropertyHolder::isPropertySet | ( | const PropertyId & | property_id | ) | const |
Returns true if the property is set.
Definition at line 44 of file PropertyHolder.cpp.
References m_properties.
Referenced by SourceXtractor::SourceWithOnDemandProperties::getProperty(), SourceXtractor::SourceGroupWithOnDemandProperties::getProperty(), and SourceXtractor::SourceGroupWithOnDemandProperties::EntangledSource::getProperty().
|
delete |
|
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().
|
private |
Definition at line 72 of file PropertyHolder.h.
Referenced by clear(), getProperty(), isPropertySet(), and setProperty().