Loading...
Searching...
No Matches
TfPyKwArg Struct Reference

Wrapper object for a keyword-argument pair in a call to TfPyInvoke*. More...

#include <pyInvoke.h>

Public Member Functions

template<typename T >
 TfPyKwArg (const std::string &nameIn, const T &valueIn)
 

Public Attributes

std::string name
 
TfPyObjWrapper value
 

Detailed Description

Wrapper object for a keyword-argument pair in a call to TfPyInvoke*.

Any value type may be provided, as long as it is convertible to Python. Typically passed as an inline temporary object:

const bool ok = TfPyInvoke(
"MyModule", "MyFunction",
arg1value, arg2value, TfPyKwArg("arg4", arg4value));
bool TfPyInvoke(const std::string &moduleName, const std::string &callableExpr, Args... args)
A version of TfPyInvokeAndExtract that ignores the Python function's return value.
Definition: pyInvoke.h:329
Wrapper object for a keyword-argument pair in a call to TfPyInvoke*.
Definition: pyInvoke.h:87
def MyFunction(arg1, arg2, arg3 = None, arg4 = None, arg5 = None):
# ...

Definition at line 86 of file pyInvoke.h.

Constructor & Destructor Documentation

◆ TfPyKwArg()

TfPyKwArg ( const std::string &  nameIn,
const T &  valueIn 
)
inline

Definition at line 89 of file pyInvoke.h.

Member Data Documentation

◆ name

std::string name

Definition at line 99 of file pyInvoke.h.

◆ value

Definition at line 100 of file pyInvoke.h.


The documentation for this struct was generated from the following file: