Kea
1.9.9-git
|
Token representing a constant string in hexadecimal format. More...
#include <token.h>
Public Member Functions | |
TokenHexString (const std::string &str) | |
Value is set during token construction. More... | |
void | evaluate (Pkt &pkt, ValueStack &values) |
Token evaluation (puts value of the constant string on the stack after decoding or an empty string if decoding fails (note it should not if the parser is correct) More... | |
Public Member Functions inherited from isc::dhcp::Token | |
virtual | ~Token () |
Virtual destructor. More... | |
Protected Attributes | |
std::string | value_ |
Constant value. More... | |
Additional Inherited Members | |
Static Public Member Functions inherited from isc::dhcp::Token | |
static bool | toBool (std::string value) |
Coverts a (string) value to a boolean. More... | |
Token representing a constant string in hexadecimal format.
This token holds value of a constant string giving in an hexadecimal format, for instance 0x666f6f is "foo"
TokenHexString::TokenHexString | ( | const std::string & | str | ) |
Value is set during token construction.
str | constant string to be represented (must be "0x" or "0X" followed by a string of hexadecimal digits or decoding will fail) |
Definition at line 44 of file token.cc.
References isc::util::encode::decodeHex(), and value_.
|
virtual |
Token evaluation (puts value of the constant string on the stack after decoding or an empty string if decoding fails (note it should not if the parser is correct)
pkt | (ignored) |
values | (represented string will be pushed here) |
Implements isc::dhcp::Token.
Definition at line 73 of file token.cc.
References isc::dhcp::EVAL_DBG_STACK, isc::dhcp::EVAL_DEBUG_HEXSTRING, isc::dhcp::eval_logger, LOG_DEBUG, isc::util::encode::toHex(), and value_.
|
protected |
Constant value.
Definition at line 155 of file token.h.
Referenced by evaluate(), and TokenHexString().