ANNA Suite  2020b
Multipurpose development suite for Telco applications
Token.hpp
Go to the documentation of this file.
1 // ANNA - Anna is Not Nothingness Anymore //
2 // //
3 // (c) Copyright 2005-2015 Eduardo Ramos Testillano & Francisco Ruiz Rayo //
4 // //
5 // See project site at http://redmine.teslayout.com/projects/anna-suite //
6 // See accompanying file LICENSE or copy at http://www.teslayout.com/projects/public/anna.LICENSE //
7 
8 
9 #ifndef anna_http_internal_Token_hpp
10 #define anna_http_internal_Token_hpp
11 
12 #include <string>
13 
14 #include <anna/core/DataBlock.hpp>
15 
16 namespace anna {
17 
18 namespace http {
19 
20 class Token : public DataBlock {
21 public:
22  Token() : DataBlock(false) {;}
23 
24  const std::string& getStringValue() const ;
25  int getIntegerValue() const ;
26  bool contains(const char byte) const ;
27 
28  void setValue(const char* content, const int size) {
29  setBuffer(content);
30  setSize(size);
31  }
32  bool match(const char* str) const ;
33  int calculeOffset(const DataBlock& base) const noexcept(false);
34 
35 private:
36  std::string a_aux;
37 };
38 
39 }
40 }
41 
42 #endif
Token()
Definition: Token.hpp:22
const std::string & getStringValue() const
void setBuffer(const char *buffer)
Definition: DataBlock.hpp:277
Definition: Token.hpp:20
void setSize(const int size) noexcept(false)
int calculeOffset(const DataBlock &base) const noexcept(false)
bool match(const char *str) const
int getIntegerValue() const
Definition: app.hpp:12
bool contains(const char byte) const
Definition: DataBlock.hpp:24
void setValue(const char *content, const int size)
Definition: Token.hpp:28