ParseAction Class Reference

#include <StreamCommandParser.h>

Public Member Functions

 ParseAction ()
 
 ParseAction (ActionType a, int &target, int source)
 
 ParseAction (ActionType a, int &target)
 
 ParseAction (ActionType a, bool &target, bool source)
 
 ParseAction (ActionType a, bool &target)
 
 ParseAction (ActionType a, int(*act)(TokenDefinition *, StreamToken &, void *), void *parm)
 
bool isValid ()
 
int applyAction (TokenDefinition *def, StreamToken &token, void *userparms)
 

Protected Attributes

ActionType action
 
size_t itemlength
 
int * int_output
 
bool * bool_output
 
int int_value
 
bool bool_value
 
int(* afp )(TokenDefinition *, StreamToken &, void *)
 
void * actionParm
 

Detailed Description

Definition at line 199 of file StreamCommandParser.h.

Constructor & Destructor Documentation

◆ ParseAction() [1/6]

ParseAction::ParseAction ( )
inline

Definition at line 202 of file StreamCommandParser.h.

References action, actionParm, afp, bool_output, bool_value, int_output, int_value, and NoAction.

◆ ParseAction() [2/6]

ParseAction::ParseAction ( ActionType  a,
int &  target,
int  source 
)
inline

Definition at line 213 of file StreamCommandParser.h.

References action, actionParm, afp, bool_output, bool_value, int_output, and int_value.

◆ ParseAction() [3/6]

ParseAction::ParseAction ( ActionType  a,
int &  target 
)
inline

Definition at line 224 of file StreamCommandParser.h.

References action, actionParm, afp, bool_output, bool_value, int_output, and int_value.

◆ ParseAction() [4/6]

ParseAction::ParseAction ( ActionType  a,
bool &  target,
bool  source 
)
inline

Definition at line 235 of file StreamCommandParser.h.

References action, actionParm, afp, bool_output, bool_value, int_output, and int_value.

◆ ParseAction() [5/6]

ParseAction::ParseAction ( ActionType  a,
bool &  target 
)
inline

Definition at line 246 of file StreamCommandParser.h.

References action, actionParm, afp, bool_output, bool_value, int_output, and int_value.

◆ ParseAction() [6/6]

ParseAction::ParseAction ( ActionType  a,
int(*)(TokenDefinition *, StreamToken &, void *)  act,
void *  parm 
)
inline

Definition at line 257 of file StreamCommandParser.h.

References action, actionParm, afp, bool_output, bool_value, int_output, and int_value.

Member Function Documentation

◆ applyAction()

int ParseAction::applyAction ( TokenDefinition def,
StreamToken token,
void *  userparms 
)

Apply an a parse table action.

Parameters
defThe token definition this belongs to.
tokenThe token parsing stream.
userparmsAn opaque argument value.
Returns
0 if the action was processed ok, 1 if it is an error condition.

Definition at line 181 of file StreamCommandParser.cpp.

References action, actionParm, afp, BitAnd, BitOr, bool_output, bool_value, CallItem, int_output, int_value, ME, MEB, MF, MI, MIB, SetBool, and SetItem.

◆ isValid()

bool ParseAction::isValid ( )
inline

Definition at line 268 of file StreamCommandParser.h.

References action, and NoAction.

Referenced by parser().

Member Data Documentation

◆ action

ActionType ParseAction::action
protected

Definition at line 273 of file StreamCommandParser.h.

Referenced by applyAction(), isValid(), and ParseAction().

◆ actionParm

void* ParseAction::actionParm
protected

Definition at line 281 of file StreamCommandParser.h.

Referenced by applyAction(), and ParseAction().

◆ afp

int(* ParseAction::afp) (TokenDefinition *, StreamToken &, void *)
protected

Definition at line 280 of file StreamCommandParser.h.

Referenced by applyAction(), and ParseAction().

◆ bool_output

bool* ParseAction::bool_output
protected

Definition at line 276 of file StreamCommandParser.h.

Referenced by applyAction(), and ParseAction().

◆ bool_value

bool ParseAction::bool_value
protected

Definition at line 278 of file StreamCommandParser.h.

Referenced by applyAction(), and ParseAction().

◆ int_output

int* ParseAction::int_output
protected

Definition at line 275 of file StreamCommandParser.h.

Referenced by applyAction(), and ParseAction().

◆ int_value

int ParseAction::int_value
protected

Definition at line 277 of file StreamCommandParser.h.

Referenced by applyAction(), and ParseAction().

◆ itemlength

size_t ParseAction::itemlength
protected

Definition at line 274 of file StreamCommandParser.h.


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