27 const std::string &className,
30 if (propertyName.empty())
33 ExtensionMap &extensions = m_Extensions[className];
34 std::pair<ExtensionMapIterator, bool> ret = extensions.insert(std::make_pair(propertyName, extension));
36 if (!ret.second && overwrite)
38 ret.first->second = extension;
46 const std::string &className)
48 if (!propertyName.empty())
50 ExtensionMap &extensions = m_Extensions[className];
51 ExtensionMapConstIterator iter = extensions.find(propertyName);
53 if (iter != extensions.end())
62 const ExtensionMap &extensions = m_Extensions[className];
64 return !propertyName.empty() ? extensions.find(propertyName) != extensions.end() :
false;
69 m_Extensions[className].clear();
74 if (!propertyName.empty())
75 m_Extensions[className].erase(propertyName);
PropertyExtension::Pointer GetExtension(const std::string &propertyName, const std::string &className) override
Get the extension of a specific property.
~PropertyExtensions() override
void RemoveExtension(const std::string &propertyName, const std::string &className) override
Remove extension of a specific property.
bool HasExtension(const std::string &propertyName, const std::string &className) override
Check if a specific property has an extension.
void RemoveAllExtensions(const std::string &className) override
Remove all property extensions.
bool AddExtension(const std::string &propertyName, PropertyExtension::Pointer extension, const std::string &className, bool overwrite) override
Add an extension to a specific property.