P4C
The P4 Compiler
Loading...
Searching...
No Matches
P4::P4Tools::P4Testgen::ActionCall Class Reference
Inheritance diagram for P4::P4Tools::P4Testgen::ActionCall:
[legend]

Public Member Functions

 ActionCall (const IR::P4Action *action, std::vector< ActionArg > args)
 
 ActionCall (cstring identifier, const IR::P4Action *action, std::vector< ActionArg > args)
 
 DECLARE_TYPEINFO (ActionCall, TestObject)
 
const ActionCallevaluate (const Model &model, bool doComplete) const override
 
const IR::P4Action * getAction () const
 
cstring getActionName () const
 
const std::vector< ActionArg > * getArgs () const
 
cstring getObjectName () const override
 
- Public Member Functions inherited from P4::P4Tools::P4Testgen::TestObject
 TestObject (const TestObject &)=default
 
 TestObject (TestObject &&)=default
 
 DECLARE_TYPEINFO (TestObject)
 
TestObjectoperator= (const TestObject &)=default
 
TestObjectoperator= (TestObject &&)=default
 
- Public Member Functions inherited from P4::ICastable
template<typename T >
T & as ()
 Tries to convert the class to type T. A BUG occurs if the cast fails.
 
template<typename T >
const T & as () const
 Tries to convert the class to type T. A BUG occurs if the cast fails.
 
template<typename T >
T * checkedTo ()
 Performs a checked cast. A BUG occurs if the cast fails.
 
template<typename T >
const T * checkedTo () const
 Performs a checked cast. A BUG occurs if the cast fails.
 
- Public Member Functions inherited from P4::RTTI::Base
template<typename T >
bool is () const noexcept
 
virtual bool isA (TypeId typeId) const noexcept=0
 
template<typename T >
const T * to () const noexcept
 Same as to, but returns const pointer to T.
 
template<typename T >
T * to () noexcept
 
virtual TypeId typeId () const noexcept=0
 

Additional Inherited Members

- Protected Member Functions inherited from P4::RTTI::Base
virtual const void * toImpl (TypeId typeId) const noexcept=0
 

Member Function Documentation

◆ evaluate()

const ActionCall * P4::P4Tools::P4Testgen::ActionCall::evaluate ( const Model & model,
bool doComplete ) const
nodiscardoverridevirtual
Returns
a version of the test object where all expressions are resolved and symbolic variables are substituted according to the mapping present in the
Parameters
model.

Implements P4::P4Tools::P4Testgen::TestObject.

◆ getAction()

const IR::P4Action * P4::P4Tools::P4Testgen::ActionCall::getAction ( ) const
nodiscard
Returns
the action that is associated with this object.

◆ getActionName()

cstring P4::P4Tools::P4Testgen::ActionCall::getActionName ( ) const
nodiscard
Returns
the name of the action that is being called. If not otherwise specified, this is the control plane name.

◆ getArgs()

const std::vector< ActionArg > * P4::P4Tools::P4Testgen::ActionCall::getArgs ( ) const
nodiscard
Returns
the arguments of this particular call.

◆ getObjectName()

cstring P4::P4Tools::P4Testgen::ActionCall::getObjectName ( ) const
nodiscardoverridevirtual
Returns
the string name of this particular test object.

Implements P4::P4Tools::P4Testgen::TestObject.