ender  0.0.9
Descriptorlibrary
Enumerations | Functions
Arg

An arg represents a Function argument. More...

Enumerations

enum  Ender_Item_Arg_Direction {
  ENDER_ITEM_ARG_DIRECTION_IN,
  ENDER_ITEM_ARG_DIRECTION_OUT,
  ENDER_ITEM_ARG_DIRECTION_IN_OUT
}
enum  Ender_Item_Arg_Flag {
  ENDER_ITEM_ARG_FLAG_IS_RETURN = (1 << 0),
  ENDER_ITEM_ARG_FLAG_IS_CLOSURE = (1 << 1),
  ENDER_ITEM_ARG_FLAG_NULLABLE = (1 << 2),
  ENDER_ITEM_ARG_FLAG_DELAYED_CALLBACK = (1 << 4)
}

Functions

EAPI Ender_Itemender_item_arg_type_get (Ender_Item *i)
EAPI Ender_Item_Arg_Direction ender_item_arg_direction_get (Ender_Item *i)
EAPI Ender_Item_Transfer ender_item_arg_transfer_get (Ender_Item *i)
EAPI int ender_item_arg_flags_get (Ender_Item *i)

Detailed Description

An arg represents a Function argument.


Enumeration Type Documentation

The direction of an argument

See also:
ender_item_arg_direction_get
Enumerator:
ENDER_ITEM_ARG_DIRECTION_IN 

Is an IN argument. Struct are always passed by reference

ENDER_ITEM_ARG_DIRECTION_OUT 

Is an OUT argument, for every item that has known memory layout (like a Struct or a Basic) the expected argument is a pointer to the item C type. For unknown memory layout types (like a Object) it is a double pointer

ENDER_ITEM_ARG_DIRECTION_IN_OUT 

Both ENDER_ITEM_ARG_DIRECTION_IN and ENDER_ITEM_ARG_DIRECTION_OUT

Different flags an argument can have

Enumerator:
ENDER_ITEM_ARG_FLAG_IS_RETURN 

In case the argument is the return value

See also:
ender_item_function_ret_get
ENDER_ITEM_ARG_FLAG_IS_CLOSURE 

In a callback, this argument is the user provided data

ENDER_ITEM_ARG_FLAG_NULLABLE 

In case the argument can be NULL

ENDER_ITEM_ARG_FLAG_DELAYED_CALLBACK 

In case the argument type is a callback, inform that the callback will be called later, if this flag is not set, the callback is assumed to be called immediately


Function Documentation

Get the type of the argument

Parameters:
iThe argument to get the type from
Returns:
The type of the argument

Get the direction of an argument

Parameters:
iThe argument to get the direction from
Returns:
The argument direction

Get the transfer mode of an argument

Parameters:
iThe argument to get the transfer from
Returns:
The transfer mode

Get the flags of an argument

Parameters:
iThe argument to get the flags from
Returns:
The argument flags
 All Data Structures