diff options
| author | ljfa-ag <ljfa-ag@web.de> | 2015-07-12 12:54:09 +0200 |
|---|---|---|
| committer | ljfa-ag <ljfa-ag@web.de> | 2015-07-12 12:54:09 +0200 |
| commit | 63460f29957ed2e28ee35ee8a92432fe446e0936 (patch) | |
| tree | 611889d7c2742b0c8a2b3bd32bcb66a056e415da /include | |
| parent | 3c1177618ad70760bfb315c930065054f8aefedd (diff) | |
| download | Project-Tick-63460f29957ed2e28ee35ee8a92432fe446e0936.tar.gz Project-Tick-63460f29957ed2e28ee35ee8a92432fe446e0936.zip | |
Create tag_list::set method
Diffstat (limited to 'include')
| -rw-r--r-- | include/tag_list.h | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/include/tag_list.h b/include/tag_list.h index b13da3c5a9..d0b80ebb01 100644 --- a/include/tag_list.h +++ b/include/tag_list.h @@ -52,7 +52,7 @@ public: * * Returns a value to the tag at the specified index, or throws an * exception if it is out of range. - * @throw std::out_of_range if given key does not exist + * @throw std::out_of_range if the index is out of range */ value& at(size_t i); const value& at(size_t i) const; @@ -67,6 +67,14 @@ public: const value& operator[](size_t i) const; /** + * @brief Assigns a tag at the given index + * @throw std::bad_cast if the type of the tag does not match the list's + * content type + * @throw std::out_of_range if the index is out of range + */ + void set(size_t i, value&& val); + + /** * @brief Appends the tag to the end of the list * @throw std::bad_cast if the type of the tag does not match the list's * content type @@ -106,7 +114,7 @@ public: private: std::vector<value> tags; - tag_type el_type; + tag_type el_type_; }; } |
