#include <simple_token.h>
Definition at line 15 of file simple_token.h.
◆ SimpleToken() [1/2]
base::SimpleToken::SimpleToken |
( |
| ) |
|
|
default |
◆ ~SimpleToken()
base::SimpleToken::~SimpleToken |
( |
| ) |
|
|
default |
◆ SimpleToken() [2/2]
base::SimpleToken::SimpleToken |
( |
const std::string & |
token | ) |
|
◆ Create()
Definition at line 17 of file simple_token.cc.
17 {
18 const char charset[] =
19 "0123456789"
20 "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
21 "abcdefghijklmnopqrstuvwxyz";
22 const size_t max_index = (sizeof(charset) - 1);
23
24 std::string str;
26 str.push_back(charset[rand() % max_index]);
27 }
29}
constexpr size_t kRandomTokenLength
◆ operator bool()
constexpr base::SimpleToken::operator bool |
( |
| ) |
const |
|
inlineexplicitconstexpr |
◆ operator!=()
constexpr bool base::SimpleToken::operator!= |
( |
const SimpleToken & |
other | ) |
const |
|
inlineconstexpr |
Definition at line 40 of file simple_token.h.
40 {
41 return !(*this == other);
42 }
◆ operator<()
constexpr bool base::SimpleToken::operator< |
( |
const SimpleToken & |
other | ) |
const |
|
inlineconstexpr |
Definition at line 32 of file simple_token.h.
32 {
33 return token_.compare(other.token_) < 0;
34 }
◆ operator==()
constexpr bool base::SimpleToken::operator== |
( |
const SimpleToken & |
other | ) |
const |
|
inlineconstexpr |
Definition at line 36 of file simple_token.h.
36 {
37 return token_.compare(other.token_) == 0;
38 }
◆ ToString()
std::string base::SimpleToken::ToString |
( |
| ) |
const |
|
inline |
The documentation for this class was generated from the following files: