ender  0.0.9
Descriptorlibrary
Enumerations | Functions
Function

A function represents an exported function of the library. More...

Enumerations

enum  Ender_Item_Function_Flag {
  ENDER_ITEM_FUNCTION_FLAG_IS_METHOD = (1 << 0),
  ENDER_ITEM_FUNCTION_FLAG_THROWS = (1 << 1),
  ENDER_ITEM_FUNCTION_FLAG_CTOR = (1 << 2),
  ENDER_ITEM_FUNCTION_FLAG_REF = (1 << 3),
  ENDER_ITEM_FUNCTION_FLAG_UNREF = (1 << 4),
  ENDER_ITEM_FUNCTION_FLAG_CALLBACK = (1 << 5),
  ENDER_ITEM_FUNCTION_FLAG_VALUE_OF = (1 << 6),
  ENDER_ITEM_FUNCTION_FLAG_DOWNCAST = (1 << 7)
}

Functions

EAPI Eina_List * ender_item_function_args_get (Ender_Item *i)
EAPI Ender_Itemender_item_function_args_at (Ender_Item *i, int idx)
EAPI int ender_item_function_args_count (Ender_Item *i)
EAPI Ender_Itemender_item_function_ret_get (Ender_Item *i)
Eina_Bool ender_item_function_call (Ender_Item *i, Ender_Value *args, Ender_Value *retval)
EAPI int ender_item_function_flags_get (Ender_Item *i)
EAPI int ender_item_function_throw_position_get (Ender_Item *i)

Detailed Description

A function represents an exported function of the library.


Enumeration Type Documentation

Different flags a function can have

See also:
ender_item_function_flags_get
Enumerator:
ENDER_ITEM_FUNCTION_FLAG_IS_METHOD 

In case the function belongs to a particular item. In such case the parent of the function is the instance and the first attribute is the instance itself

ENDER_ITEM_FUNCTION_FLAG_THROWS 

In case the function throws an exception

ENDER_ITEM_FUNCTION_FLAG_CTOR 

In case the function is a constructor

ENDER_ITEM_FUNCTION_FLAG_REF 

In case the function increments the reference counting of the parent item

ENDER_ITEM_FUNCTION_FLAG_UNREF 

In case the function decrements the reference counting of the parent item

ENDER_ITEM_FUNCTION_FLAG_CALLBACK 

In case the function is a callback definition

ENDER_ITEM_FUNCTION_FLAG_VALUE_OF 

In case the function describes how an item can be converted into another type. It is useful for example to coneert an object into a string

ENDER_ITEM_FUNCTION_FLAG_DOWNCAST 

In case the function implements a way to downcast an object The function can have the following prototypes: void foo_bar_get(void *o, const char **lib, const char **name); void foo_bar_get(void *o, char **lib, char **name); Ender_Item * foo_bar_get(void *o);


Function Documentation

EAPI Eina_List* ender_item_function_args_get ( Ender_Item i)

Get the list of arguments from a function

Parameters:
iThe function to get the arguments from
Returns:
The list of arguments. Use ender_item_unref to free every item on the list
EAPI Ender_Item* ender_item_function_args_at ( Ender_Item i,
int  idx 
)

Get the argument in a specified index

Parameters:
iThe function to get the argument from
idxThe index on the argument list
Returns:
The argument at the specified index

Count the number of arguments a function has

Parameters:
iThe function to count the number of arguments on
Returns:
The number of arguments

Get the return item of a function

Parameters:
iThe function to get the return from
Returns:
The return item
Eina_Bool ender_item_function_call ( Ender_Item i,
Ender_Value args,
Ender_Value retval 
)

Call a function

Parameters:
iThe function to call
argsThe array of values that matches the number of arguments
retvalThe returning value of the function call
Returns:
EINA_TRUE if the call is succesful, EINA_FALSE otherwise

Get the function flags

Parameters:
iThe function to get the flags from
Returns:
The function flags

Get the index position of the argument that is used for exceptions

A function that has the flag ENDER_ITEM_FUNCTION_FLAG_THROWS has an Eina_Error based argument. This function returns the position of such argument.

Parameters:
iThe function to get the position index from
Returns:
The position index of the argument
 All Data Structures