Kea 2.5.9
isc::dhcp::TokenConcat Class Reference

Token that represents concat operator (concatenates two other tokens) More...

#include <token.h>

+ Inheritance diagram for isc::dhcp::TokenConcat:

Public Member Functions

 TokenConcat ()
 Constructor (does nothing)
void evaluate (Pkt &pkt, ValueStack &values)
 Concatenate two values.
- Public Member Functions inherited from isc::dhcp::Token
virtual ~Token ()
 Virtual destructor.
virtual void evaluate (Pkt &pkt, ValueStack &values)=0
 This is a generic method for evaluating a packet.

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.

Detailed Description

Token that represents concat operator (concatenates two other tokens)

For example in the sub-expression "concat('foo','bar')" the result of the evaluation is "foobar" For user convenience the "'foo' + 'bar'" alternative does the same.

Definition at line 877 of file token.h.

Constructor & Destructor Documentation

◆ TokenConcat()

isc::dhcp::TokenConcat::TokenConcat ( )

Constructor (does nothing)

Definition at line 880 of file token.h.

Member Function Documentation

◆ evaluate()

void TokenConcat::evaluate ( Pkt pkt,
ValueStack values 

Concatenate two values.

Evaluation does not use packet information, but rather consumes the last two parameters. It does a simple string concatenation. It requires at least two parameters to be present on stack.

EvalBadStackif there are less than 2 values on stack
values- stack of values (2 arguments will be popped, 1 result will be pushed)

Implements isc::dhcp::Token.

Definition at line 922 of file

References isc::dhcp::EVAL_DBG_STACK, isc::dhcp::EVAL_DEBUG_CONCAT, isc::dhcp::eval_logger, isc::dhcp::Pkt::getLabel(), isc_throw, and LOG_DEBUG.

+ Here is the call graph for this function:

The documentation for this class was generated from the following files: