SourceXtractorPlusPlus 0.19.2
SourceXtractor++, the next generation SExtractor
Loading...
Searching...
No Matches
SourceWithOnDemandProperties.cpp
Go to the documentation of this file.
1
26
28
29namespace SourceXtractor {
30
34
36 // if we have the property already, just return it
39 }
40
41 // if not, get the task that makes it and execute, we should have it then
43 if (task) {
44 task->computeProperties(const_cast<SourceWithOnDemandProperties&>(*this));
46 }
47
48 // no task available to make the property, just throw an exception
50}
51
56
57
58} // SEFramework namespace
59
bool isPropertySet(const PropertyId &property_id) const
Returns true if the property is set.
const Property & getProperty(const PropertyId &property_id) const
Returns a reference to a Property if it is set, if not throws a PropertyNotFoundException.
void setProperty(std::unique_ptr< Property > property, const PropertyId &property_id)
Sets a property, overwriting it if necessary.
Identifier used to set and retrieve properties.
Definition PropertyId.h:40
An exception indicating that a Property was not available and could not be computed on demand.
Base class for all Properties. (has no actual content)
Definition Property.h:33
A Task that acts on a Source to compute one or more properties.
Definition SourceTask.h:36
std::shared_ptr< const TaskProvider > m_task_provider
SourceWithOnDemandProperties(const SourceWithOnDemandProperties &)=delete
const Property & getProperty(const PropertyId &property_id) const override
void setProperty(std::unique_ptr< Property > property, const PropertyId &property_id) override
T move(T... args)