encoding: Block::insert
This commit also updates Block::erase to accept element_const_iterator
refs #2998
Change-Id: Ie09c99d14a065444b01abff72fd97a92387b9b91
diff --git a/src/encoding/block.hpp b/src/encoding/block.hpp
index 7c45543..9407ccf 100644
--- a/src/encoding/block.hpp
+++ b/src/encoding/block.hpp
@@ -253,14 +253,23 @@
remove(uint32_t type);
element_iterator
- erase(element_iterator position);
+ erase(element_const_iterator position);
element_iterator
- erase(element_iterator first, element_iterator last);
+ erase(element_const_iterator first, element_const_iterator last);
void
push_back(const Block& element);
+ /**
+ * @brief insert Insert a new element in a specific position
+ * @param pos Position to insert the new element
+ * @param element Element to be inserted
+ * @return An iterator that points to the first of the newly inserted elements.
+ */
+ element_iterator
+ insert(element_const_iterator pos, const Block& element);
+
/** @brief Get all subelements
*/
const element_container&