diff options
Diffstat (limited to 'src/expr/attribute.h')
-rw-r--r-- | src/expr/attribute.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/expr/attribute.h b/src/expr/attribute.h index 2ef34a771..0668c5f8f 100644 --- a/src/expr/attribute.h +++ b/src/expr/attribute.h @@ -90,6 +90,9 @@ class AttributeManager { void deleteFromTable(AttrHash<T>& table, NodeValue* nv); template <class T> + void deleteFromTable(CDAttrHash<T>& table, NodeValue* nv); + + template <class T> void deleteAllFromTable(AttrHash<T>& table); /** @@ -554,6 +557,17 @@ inline void AttributeManager::deleteFromTable(AttrHash<T>& table, } /** + * Obliterate a NodeValue from a (context-dependent) attribute table. + */ +template <class T> +inline void AttributeManager::deleteFromTable(CDAttrHash<T>& table, + NodeValue* nv) { + for(unsigned id = 0; id < attr::LastAttributeId<T, true>::s_id; ++id) { + table.obliterate(std::make_pair(id, nv)); + } +} + +/** * Remove all attributes from the table calling the cleanup function if one is defined. */ template <class T> |