SourceXtractorPlusPlus 0.21
SourceXtractor++, the next generation SExtractor
Loading...
Searching...
No Matches
PropertyHolder.cpp
Go to the documentation of this file.
1
24
26
27namespace SourceXtractor {
28
30 auto iter = m_properties.find(property_id);
31 if (iter != m_properties.end()) {
32 // Returns the property if it is found
33 return *iter->second;
34 } else {
35 // If we don't have that property throws an exception
37 }
38}
39
43
47
49 m_properties.clear();
50}
51
52} // SEFramework namespace
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.
std::unordered_map< PropertyId, std::unique_ptr< Property > > m_properties
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
T move(T... args)