OpenVDB: NativeArguments Struct Reference

OpenVDB 13.0.0

Loading...
Searching...
No Matches
NativeArguments Struct Reference

Wrapper struct to represent "native" function arguments; that is, the set of Value type that the AX grammar supports. NativeArguments have two benefits; they support casting and implicit function matching through FunctionGroups and can be used directly in IR generators (to leverage the AX Value API). Functions can still be generated and called with "non-native" arguments, but in these cases FunctionGroup::execute must result in an explicit signature match. More...

`#include <openvdb_ax/codegen/FunctionTypes.h>`

## Public Member Functions
| NativeArguments ()=default
| NativeArguments (const std::initializer_list< Value > &args)
| NativeArguments (const std::vector< Value > &args)
| NativeArguments (NativeArguments &&)=default
| NativeArguments (const NativeArguments &)=default
NativeArguments & | operator= (NativeArguments &&)=default
NativeArguments & | operator= (const NativeArguments &)=default
size_t | size () const
Value & | operator[] (size_t pos)
const Value & | operator[] (size_t pos) const
void | AddArg (const Value &val)
OPENVDB_AX_API NativeArguments | Cast (const Function &F, llvm::IRBuilder<> &B) const
| Cast these arguments to match the given function's signature.

## Detailed Description

Wrapper struct to represent "native" function arguments; that is, the set of Value type that the AX grammar supports. NativeArguments have two benefits; they support casting and implicit function matching through FunctionGroups and can be used directly in IR generators (to leverage the AX Value API). Functions can still be generated and called with "non-native" arguments, but in these cases FunctionGroup::execute must result in an explicit signature match.

## Constructor & Destructor Documentation

## ◆ NativeArguments() [1/5]

NativeArguments | ( |  | ) |
| default

## ◆ NativeArguments() [2/5]

NativeArguments | ( | const std::initializer_list< Value > & | args | ) |
| inline

## ◆ NativeArguments() [3/5]

NativeArguments | ( | const std::vector< Value > & | args | ) |
| inlineexplicit

## ◆ NativeArguments() [4/5]

NativeArguments | ( | NativeArguments && |  | ) |
| default

## ◆ NativeArguments() [5/5]

NativeArguments | ( | const NativeArguments & |  | ) |
| default

## Member Function Documentation

## ◆ AddArg()

void AddArg | ( | const Value & | val | ) |
| inline

## ◆ Cast()

OPENVDB_AX_API NativeArguments Cast | ( | const Function & | F,
|  | llvm::IRBuilder<> & | B ) const

Cast these arguments to match the given function's signature.

## ◆ operator=() [1/2]

NativeArguments & operator= | ( | const NativeArguments & |  | ) |
| default

## ◆ operator=() [2/2]

NativeArguments & operator= | ( | NativeArguments && |  | ) |
| default

## ◆ operator[]() [1/2]

Value & operator[] | ( | size_t | pos | ) |
| inline

## ◆ operator[]() [2/2]

const Value & operator[] | ( | size_t | pos | ) | const
| inline

## ◆ size()

size_t size | ( |  | ) | const
| inline