Kea 2.7.5
|
Token that represents logical negation operator. More...
#include <token.h>
Public Member Functions | |
TokenNot () | |
Constructor (does nothing) | |
virtual unsigned | evaluate (Pkt &pkt, ValueStack &values) |
Logical negation. | |
Public Member Functions inherited from isc::dhcp::Token | |
virtual | ~Token () |
Virtual destructor. | |
virtual unsigned | getLabel () const |
Return the label of this token. | |
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. | |
Token that represents logical negation operator.
For example in the expression "not(option[vendor-class].text == 'MSF')" this token represents the leading "not"
|
inline |
|
virtual |
Logical negation.
Evaluation does not use packet information, but rather consumes the last result. It does a simple string comparison and sets the value to either "true" or "false". It requires at least one value to be present on stack and to be either "true" or "false".
EvalBadStack | if there are less than 1 value on stack |
EvalTypeError | if the top value on the stack is not either "true" or "false" |
pkt | (unused) |
values | - stack of values (logical top value negated) |
Implements isc::dhcp::Token.
Definition at line 1064 of file token.cc.
References isc::dhcp::EVAL_DBG_STACK, isc::dhcp::EVAL_DEBUG_NOT, isc::dhcp::eval_logger, isc_throw, LOG_DEBUG, and isc::dhcp::Token::toBool().