X-Git-Url: https://git.teslayout.com/public/public/public/?p=anna.git;a=blobdiff_plain;f=include%2Fanna%2Fhttp%2Finternal%2FTokenizer.hpp;fp=include%2Fanna%2Fhttp%2Finternal%2FTokenizer.hpp;h=7e7f66c63ea347cb762acd065e0241a4069f92b7;hp=c830d97493a1f187f0b845ab041ac21cc3734d35;hb=5a6cba5fde2b2f538a7515f8293cc0a8d9589dfa;hpb=af9c86ffb0e28d35ad94d99c5f77e41578c972b4 diff --git a/include/anna/http/internal/Tokenizer.hpp b/include/anna/http/internal/Tokenizer.hpp index c830d97..7e7f66c 100644 --- a/include/anna/http/internal/Tokenizer.hpp +++ b/include/anna/http/internal/Tokenizer.hpp @@ -21,28 +21,28 @@ namespace http { class Tokenizer : public Recycler { public: - void apply(const DataBlock&) throw(RuntimeException); - void apply(const DataBlock&, const char* separator) throw(RuntimeException); - void apply(const DataBlock&, const char separator) throw(RuntimeException); + void apply(const DataBlock&) noexcept(false); + void apply(const DataBlock&, const char* separator) noexcept(false); + void apply(const DataBlock&, const char separator) noexcept(false); - const Token* operator [](int index) const throw(); + const Token* operator [](int index) const ; - const Token* operator [](const_iterator ii) const throw() { + const Token* operator [](const_iterator ii) const { return (ii == end()) ? NULL : token(ii); } - static const Token* token(const_iterator ii) throw() { return data(ii); } - static Token* token(iterator ii) throw() { return data(ii); } + static const Token* token(const_iterator ii) { return data(ii); } + static Token* token(iterator ii) { return data(ii); } private: - int createToken(const char* p, const int size) throw() { + int createToken(const char* p, const int size) { create()->setValue(p, size); return size; } - static int find(const char* data, const int size, const char character) throw(); - static int find(const char* data, const int size, const char* searched) throw(); - static bool isSpace(const int c) throw() { return c <= '\t' || c == ' ' || c >= 128; } + static int find(const char* data, const int size, const char character) ; + static int find(const char* data, const int size, const char* searched) ; + static bool isSpace(const int c) { return c <= '\t' || c == ' ' || c >= 128; } }; }