Kea 2.7.3
isc::dhcp::TokenBranch Class Reference

Token that represents unconditional branch. More...

#include <token.h>

+ Inheritance diagram for isc::dhcp::TokenBranch:

Public Member Functions

 TokenBranch (const unsigned target)
 Constructor.
 
virtual unsigned evaluate (Pkt &pkt, ValueStack &values)
 Only return the target.
 
unsigned getTarget () const
 Returns branchtarget.
 
- Public Member Functions inherited from isc::dhcp::Token
virtual ~Token ()
 Virtual destructor.
 
virtual unsigned getLabel () const
 Return the label of this token.
 

Protected Attributes

unsigned target_
 

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 unconditional branch.

Unconditionally branch to a forward target. Also the base class of branch tokens.

Definition at line 1451 of file token.h.

Constructor & Destructor Documentation

◆ TokenBranch()

TokenBranch::TokenBranch ( const unsigned target)

Constructor.

Parameters
targetthe label to branch to
Exceptions
EvalParseErrorwhen target is 0

Definition at line 1520 of file token.cc.

References isc_throw.

Member Function Documentation

◆ evaluate()

unsigned TokenBranch::evaluate ( Pkt & pkt,
ValueStack & values )
virtual

Only return the target.

Parameters
pkt(unused)
values- stack of values (unused)
Returns
next label.

Implements isc::dhcp::Token.

Reimplemented in isc::dhcp::TokenPopOrBranchTrue, isc::dhcp::TokenPopOrBranchFalse, and isc::dhcp::TokenPopAndBranchFalse.

Definition at line 1527 of file token.cc.

References isc::dhcp::EVAL_DBG_STACK, isc::dhcp::EVAL_DEBUG_BRANCH, isc::dhcp::eval_logger, LOG_DEBUG, and target_.

◆ getTarget()

unsigned isc::dhcp::TokenBranch::getTarget ( ) const
inline

Returns branchtarget.

Returns
the label of the branch target

Definition at line 1462 of file token.h.

References target_.

Member Data Documentation

◆ target_

unsigned isc::dhcp::TokenBranch::target_
protected

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