X-Git-Url: https://git.teslayout.com/public/public/public/?p=anna.git;a=blobdiff_plain;f=include%2Fanna%2Fcore%2Futil%2FTokenizer.hpp;fp=include%2Fanna%2Fcore%2Futil%2FTokenizer.hpp;h=585f34c5e0d12a15bcac38f0e36b8200395f98ed;hp=829077577342ad817d4842f264fe3b4152fd3816;hb=5a6cba5fde2b2f538a7515f8293cc0a8d9589dfa;hpb=af9c86ffb0e28d35ad94d99c5f77e41578c972b4 diff --git a/include/anna/core/util/Tokenizer.hpp b/include/anna/core/util/Tokenizer.hpp index 8290775..585f34c 100644 --- a/include/anna/core/util/Tokenizer.hpp +++ b/include/anna/core/util/Tokenizer.hpp @@ -22,7 +22,7 @@ class RuntimeException; */ class Tokenizer { - int _apply(const char* str, const char* separator) throw(RuntimeException); + int _apply(const char* str, const char* separator) noexcept(false); public: typedef char* const* const_iterator; @@ -60,7 +60,7 @@ public: Devuelve el estado del indicador de activacion de eliminacion de espacios de los extremos. \return El estado del indicador de activacion de eliminacion de espacios de los extremos. */ - bool activateStrip() const throw() { return a_activateStrip; } + bool activateStrip() const { return a_activateStrip; } // Operadores @@ -69,31 +69,31 @@ public: por esta clase sin espacios por delante y por detras. \param _activateStrip Parametro que indica el estado de activacion o desactivacion. */ - void activateStrip(const bool _activateStrip) throw() { a_activateStrip = _activateStrip; } + void activateStrip(const bool _activateStrip) { a_activateStrip = _activateStrip; } /** @return El elemento que ocupa la posicion i-esima. \warning Este método tiene una eficiencia de O(1), mejor usar iteradores. */ - const char* at(const int i) throw(RuntimeException); + const char* at(const int i) noexcept(false); /** @return El elemento que ocupa la posicion i-esima. \warning Este método tiene una eficiencia de O(1), mejor usar iteradores. */ - const char* at(const int i) const throw(RuntimeException); + const char* at(const int i) const noexcept(false); /** @return El elemento que ocupa la posicion i-esima. \warning Este método tiene una eficiencia de O(1), mejor usar iteradores. */ - const char* operator [](const int i) throw(RuntimeException) { return at(i); } + const char* operator [](const int i) noexcept(false) { return at(i); } /** @return El elemento que ocupa la posicion i-esima. \warning Este método tiene una eficiencia de O(1), mejor usar iteradores. */ - const char* operator [](const int i) const throw(RuntimeException) { return at(i); } + const char* operator [](const int i) const noexcept(false) { return at(i); } /** Process the separation over the string str with the separator provided. @@ -113,8 +113,8 @@ public: @return Number of tokens */ - int apply(const char* str, const char* separator, const char *tokenizeContiguous = NULL) throw(RuntimeException); - int apply(const std::string& str, const char* separator, const char *tokenizeContiguous = NULL) throw(RuntimeException) { + int apply(const char* str, const char* separator, const char *tokenizeContiguous = NULL) noexcept(false); + int apply(const std::string& str, const char* separator, const char *tokenizeContiguous = NULL) noexcept(false) { return apply(str.c_str(), separator, tokenizeContiguous); } @@ -123,31 +123,31 @@ public: /** @return El ultimo elemento obtenido la aplicar la separacion. */ - const char* last() const throw(RuntimeException); + const char* last() const noexcept(false); /** * Devuelve el número de elementos obtenidos en la separación. * \return el número de elementos obtenidos en la separación. */ - int size() const throw() { return a_maxItem; } + int size() const { return a_maxItem; } /** * Devuelve el iterador el comiento de los elementos obtenidos por #apply * \return el iterador el comiento de los elementos obtenidos por #apply */ - const_iterator begin() const throw() { return a_items; } + const_iterator begin() const { return a_items; } /** * Devuelve el iterador al final de los elementos obtenidos por #apply * \return el iterador al final de los elementos obtenidos por #apply */ - const_iterator end() const throw() { return a_items + a_maxItem; } + const_iterator end() const { return a_items + a_maxItem; } /** Devuelve la cadena referenciada por el iterator recibido como parametro. \return la cadena referenciada por el iterator recibido como parametro. */ - static const char* data(const_iterator ii) throw() { return *ii; } + static const char* data(const_iterator ii) { return *ii; } private: static const int MaxItem; @@ -157,9 +157,9 @@ private: char** a_items; int a_maxItem; - static char* strip(char* str) throw(); + static char* strip(char* str) ; - void indexException(const int index, const char* fromFile, const int fromLine) const throw(RuntimeException); + void indexException(const int index, const char* fromFile, const int fromLine) const noexcept(false); }; }