![]() |
Kea 2.7.3
|
Token that represents logical or operator. More...
#include <token.h>
Public Member Functions | |
TokenOr () | |
Constructor (does nothing) | |
virtual unsigned | evaluate (Pkt &pkt, ValueStack &values) |
Logical or. | |
![]() | |
virtual | ~Token () |
Virtual destructor. | |
virtual unsigned | getLabel () const |
Return the label of this token. | |
Additional Inherited Members | |
![]() | |
static bool | toBool (std::string value) |
Coverts a (string) value to a boolean. | |
Token that represents logical or operator.
For example "option[10].exists or option[11].exists"
|
inline |
|
virtual |
Logical or.
Evaluation does not use packet information, but rather consumes the last two parameters. It returns "false" if and only if both are "false". It requires at least two logical (i.e., "true" or "false') values present on stack. @throw EvalBadStack if there are less than 2 values on stack @throw EvalTypeError if one of the 2 values on stack is not "true" or "false"
pkt | (unused) |
values | - stack of values (2 arguments will be popped, 1 result will be pushed) |
Implements isc::dhcp::Token.
Definition at line 1119 of file token.cc.
References isc::dhcp::EVAL_DBG_STACK, isc::dhcp::EVAL_DEBUG_OR, isc::dhcp::eval_logger, isc_throw, LOG_DEBUG, and isc::dhcp::Token::toBool().