P4C
The P4 Compiler
|
Encapsulates a set of extern method implementations. More...
#include <expr_stepper.h>
Public Types | |
using | ImplList = std::list<std::tuple<cstring, std::vector<cstring>, MethodImpl>> |
using | MethodImpl = std::function<void(const ExternInfo &externInfo, StepperType &stepper)> |
Public Member Functions | |
ExternMethodImpls (const ImplList &implList) | |
std::optional< MethodImpl > | find (const IR::PathExpression &externObjectRef, const IR::ID &methodName, const IR::Vector< IR::Argument > &args) const |
Encapsulates a set of extern method implementations.
using P4::P4Tools::P4Testgen::ExprStepper::ExternMethodImpls< StepperType >::ImplList = std::list<std::tuple<cstring, std::vector<cstring>, MethodImpl>> |
Represents a list of extern method implementations. The components of each element in this list are as follows:
using P4::P4Tools::P4Testgen::ExprStepper::ExternMethodImpls< StepperType >::MethodImpl = std::function<void(const ExternInfo &externInfo, StepperType &stepper)> |
The type of an extern-method implementation.
externInfo | is general useful information that can be consumsed by externs (arguments, method names, etc). |
stepper | is the abstract stepper invoking the function. Templated on the type of stepper invoking it. |
|
inline |
call | the original method call expression, can be used for stepInto calls. |
receiver | a symbolic value representing the object on which the method is being called. |
name | the name of the method being called. |
args | the list of arguments being passed to method. |
state | the state in which the call is being made, with the call at the top of the current continuation body. |
A BUG occurs if the receiver is not an extern or if the call is ambiguous.