littlefoot::NativeFunction Struct Reference
juce_blocks_basics » littlefoot

Defines a native function that the program can call. More...

## Public Types

using | ImplementationFunction = int32(*)(void *, const int32 *)

## Public Member Functions

| NativeFunction (const char *nameAndArgumentTypes, ImplementationFunction fn)
| Creates a NativeFunction from its signature and an implementation function. More...

## Static Public Member Functions

static FunctionID | createID (const char *nameAndArgTypes)
| Converts a function signature to its hashed ID. More...

## Public Attributes

const char * | nameAndArguments
| This signature must have the form "name/[return type][arg1][arg2..]". More...
ImplementationFunction | function
| A static function that will be called. More...
FunctionID | functionID
| The ID is a hash of the name + arguments, but not the return type. More...
Type | returnType
| The function's return type. More...
uint8 | numArgs
| The number of arguments that the function takes. More...

## Detailed Description

Defines a native function that the program can call.

## Member Typedef Documentation

## ImplementationFunction

using littlefoot::NativeFunction::ImplementationFunction = int32 (*) (void*, const int32*)

## Constructor & Destructor Documentation

## NativeFunction()

littlefoot::NativeFunction::NativeFunction | ( | const char * | nameAndArgumentTypes,
|  | ImplementationFunction | fn
| ) |  |

Creates a NativeFunction from its signature and an implementation function.

The format of nameAndArgumentTypes is "name/[return type][arg1][arg2..]" So for example "int foobar (float, bool)" would be "foobar/ifb"

References numArgs, and returnType.

## Member Function Documentation

## createID()

static FunctionID littlefoot::NativeFunction::createID | ( | const char * | nameAndArgTypes | ) |

static

Converts a function signature to its hashed ID.

References jassert.

## Member Data Documentation

## nameAndArguments

const char* littlefoot::NativeFunction::nameAndArguments

This signature must have the form "name/[return type][arg1][arg2..]".

## function

ImplementationFunction littlefoot::NativeFunction::function

A static function that will be called.

## functionID

FunctionID littlefoot::NativeFunction::functionID

The ID is a hash of the name + arguments, but not the return type.

## returnType

Type littlefoot::NativeFunction::returnType

The function's return type.

Referenced by NativeFunction().

## numArgs

uint8 littlefoot::NativeFunction::numArgs

The number of arguments that the function takes.

Referenced by NativeFunction().

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

- juce_LittleFootRunner.h