OpenVDB  12.1.0
Public Member Functions | List of all members
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
 
NativeArgumentsoperator= (NativeArguments &&)=default
 
NativeArgumentsoperator= (const NativeArguments &)=default
 
size_t size () const
 
Valueoperator[] (size_t pos)
 
const Valueoperator[] (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. More...
 

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 ( )
default
NativeArguments ( const std::initializer_list< Value > &  args)
inline
NativeArguments ( const std::vector< Value > &  args)
inlineexplicit
NativeArguments ( NativeArguments &&  )
default
NativeArguments ( const NativeArguments )
default

Member Function Documentation

void AddArg ( const Value val)
inline
OPENVDB_AX_API NativeArguments Cast ( const Function F,
llvm::IRBuilder<> &  B 
) const

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

NativeArguments& operator= ( NativeArguments &&  )
default
NativeArguments& operator= ( const NativeArguments )
default
Value& operator[] ( size_t  pos)
inline
const Value& operator[] ( size_t  pos) const
inline
size_t size ( ) const
inline