diff options
Diffstat (limited to 'sord')
-rw-r--r-- | sord/sord.h | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/sord/sord.h b/sord/sord.h index 5ff9a7b..fda754e 100644 --- a/sord/sord.h +++ b/sord/sord.h @@ -443,6 +443,8 @@ sord_contains(SordModel* model, const SordQuad pat); /** Add a quad to a model. + + Calling this function invalidates all iterators on `model`. */ SORD_API bool @@ -451,13 +453,26 @@ sord_add(SordModel* model, const SordQuad quad); /** Remove a quad from a model. - Note that is it illegal to remove while iterating over `model`. + Calling this function invalidates all iterators on `model`. To remove quads + while iterating, use sord_erase() instead. */ SORD_API void sord_remove(SordModel* model, const SordQuad quad); /** + Remove a quad from a model via an iterator. + + Calling this function invalidates all iterators on `model` except `iter`. + + @param iter Iterator to the element to erase, which is incremented to the + next value on return. +*/ +SORD_API +SerdStatus +sord_erase(SordModel* model, SordIter* iter); + +/** @} @name Inserter @{ |