2014-02-11 05:42:59 -08:00
|
|
|
#ifndef EOLIAN_H
|
|
|
|
#define EOLIAN_H
|
|
|
|
|
2014-03-04 01:21:47 -08:00
|
|
|
#ifdef EAPI
|
|
|
|
# undef EAPI
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifdef _WIN32
|
|
|
|
# ifdef EFL_EOLIAN_BUILD
|
|
|
|
# ifdef DLL_EXPORT
|
|
|
|
# define EAPI __declspec(dllexport)
|
|
|
|
# else
|
|
|
|
# define EAPI
|
|
|
|
# endif /* ! DLL_EXPORT */
|
|
|
|
# else
|
|
|
|
# define EAPI __declspec(dllimport)
|
|
|
|
# endif /* ! EFL_EOLIAN_BUILD */
|
|
|
|
#else
|
|
|
|
# ifdef __GNUC__
|
|
|
|
# if __GNUC__ >= 4
|
|
|
|
# define EAPI __attribute__ ((visibility("default")))
|
|
|
|
# else
|
|
|
|
# define EAPI
|
|
|
|
# endif
|
|
|
|
# else
|
|
|
|
# define EAPI
|
|
|
|
# endif
|
|
|
|
#endif /* ! _WIN32 */
|
|
|
|
|
2014-02-11 05:42:59 -08:00
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#include <Eina.h>
|
2014-02-16 01:41:38 -08:00
|
|
|
#ifdef HAVE_CONFIG_H
|
|
|
|
# include <config.h>
|
|
|
|
#endif
|
|
|
|
|
2014-03-26 06:54:09 -07:00
|
|
|
#ifdef EFL_BETA_API_SUPPORT
|
2014-02-11 05:42:59 -08:00
|
|
|
|
2014-05-22 07:24:50 -07:00
|
|
|
/* Class type used to extract information on classes
|
|
|
|
*
|
|
|
|
* @ingroup Eolian
|
|
|
|
*/
|
2014-07-09 08:33:07 -07:00
|
|
|
typedef struct _Eolian_Class Eolian_Class;
|
2014-05-22 07:24:50 -07:00
|
|
|
|
2014-02-11 05:42:59 -08:00
|
|
|
/* Function Id used to extract information on class functions
|
|
|
|
*
|
|
|
|
* @ingroup Eolian
|
|
|
|
*/
|
2014-07-09 12:59:31 -07:00
|
|
|
typedef struct _Eolian_Function Eolian_Function;
|
2014-02-11 05:42:59 -08:00
|
|
|
|
2014-04-16 06:17:27 -07:00
|
|
|
/* Parameter/return type.
|
|
|
|
*
|
|
|
|
* @ingroup Eolian
|
|
|
|
*/
|
2014-07-09 09:18:02 -07:00
|
|
|
typedef struct _Eolian_Type Eolian_Type;
|
2014-04-16 06:17:27 -07:00
|
|
|
|
2014-02-11 05:42:59 -08:00
|
|
|
/* Class function parameter information
|
|
|
|
*
|
|
|
|
* @ingroup Eolian
|
|
|
|
*/
|
2014-07-09 09:01:19 -07:00
|
|
|
typedef struct _Eolian_Function_Parameter Eolian_Function_Parameter;
|
2014-02-11 05:42:59 -08:00
|
|
|
|
|
|
|
/* Class implement information
|
|
|
|
*
|
|
|
|
* @ingroup Eolian
|
|
|
|
*/
|
2014-07-09 08:45:41 -07:00
|
|
|
typedef struct _Eolian_Implement Eolian_Implement;
|
2014-02-11 05:42:59 -08:00
|
|
|
|
|
|
|
/* Event information
|
|
|
|
*
|
|
|
|
* @ingroup Eolian
|
|
|
|
*/
|
2014-07-09 08:45:41 -07:00
|
|
|
typedef struct _Eolian_Event Eolian_Event;
|
2014-02-11 05:42:59 -08:00
|
|
|
|
2014-07-17 09:16:31 -07:00
|
|
|
/* Expression information
|
|
|
|
*
|
|
|
|
* @ingroup Eolian
|
|
|
|
*/
|
|
|
|
typedef struct _Eolian_Expression Eolian_Expression;
|
|
|
|
|
2014-08-08 07:19:52 -07:00
|
|
|
/* Variable information
|
|
|
|
*
|
|
|
|
* @ingroup Eolian
|
|
|
|
*/
|
|
|
|
typedef struct _Eolian_Variable Eolian_Variable;
|
|
|
|
|
2014-02-11 05:42:59 -08:00
|
|
|
typedef enum
|
|
|
|
{
|
2014-04-06 06:41:45 -07:00
|
|
|
EOLIAN_UNRESOLVED,
|
|
|
|
EOLIAN_PROPERTY,
|
|
|
|
EOLIAN_PROP_SET,
|
|
|
|
EOLIAN_PROP_GET,
|
|
|
|
EOLIAN_METHOD,
|
2014-04-24 06:30:40 -07:00
|
|
|
EOLIAN_CTOR
|
2014-02-11 05:42:59 -08:00
|
|
|
} Eolian_Function_Type;
|
|
|
|
|
|
|
|
typedef enum
|
|
|
|
{
|
|
|
|
EOLIAN_IN_PARAM,
|
|
|
|
EOLIAN_OUT_PARAM,
|
|
|
|
EOLIAN_INOUT_PARAM
|
|
|
|
} Eolian_Parameter_Dir;
|
|
|
|
|
|
|
|
typedef enum
|
|
|
|
{
|
|
|
|
EOLIAN_CLASS_UNKNOWN_TYPE,
|
|
|
|
EOLIAN_CLASS_REGULAR,
|
2014-02-17 04:05:52 -08:00
|
|
|
EOLIAN_CLASS_ABSTRACT,
|
2014-02-11 05:42:59 -08:00
|
|
|
EOLIAN_CLASS_MIXIN,
|
|
|
|
EOLIAN_CLASS_INTERFACE
|
|
|
|
} Eolian_Class_Type;
|
|
|
|
|
2014-04-03 06:20:58 -07:00
|
|
|
typedef enum
|
|
|
|
{
|
|
|
|
EOLIAN_SCOPE_PUBLIC,
|
2014-08-13 03:53:33 -07:00
|
|
|
EOLIAN_SCOPE_PRIVATE,
|
2014-04-03 06:20:58 -07:00
|
|
|
EOLIAN_SCOPE_PROTECTED
|
2014-08-13 03:53:33 -07:00
|
|
|
} Eolian_Object_Scope;
|
2014-04-03 06:20:58 -07:00
|
|
|
|
2014-06-27 03:06:27 -07:00
|
|
|
typedef enum
|
|
|
|
{
|
|
|
|
EOLIAN_TYPE_UNKNOWN_TYPE,
|
2014-06-30 15:07:32 -07:00
|
|
|
EOLIAN_TYPE_VOID,
|
2014-06-27 03:06:27 -07:00
|
|
|
EOLIAN_TYPE_REGULAR,
|
2014-07-09 02:49:52 -07:00
|
|
|
EOLIAN_TYPE_REGULAR_STRUCT,
|
2014-08-11 06:56:50 -07:00
|
|
|
EOLIAN_TYPE_REGULAR_ENUM,
|
2014-06-27 03:06:27 -07:00
|
|
|
EOLIAN_TYPE_POINTER,
|
2014-07-08 08:17:44 -07:00
|
|
|
EOLIAN_TYPE_FUNCTION,
|
2014-07-21 05:56:20 -07:00
|
|
|
EOLIAN_TYPE_STRUCT,
|
2014-08-13 08:43:18 -07:00
|
|
|
EOLIAN_TYPE_STRUCT_OPAQUE,
|
2014-08-11 06:56:50 -07:00
|
|
|
EOLIAN_TYPE_ENUM,
|
2014-07-30 03:57:11 -07:00
|
|
|
EOLIAN_TYPE_ALIAS,
|
|
|
|
EOLIAN_TYPE_CLASS
|
2014-06-27 03:06:27 -07:00
|
|
|
} Eolian_Type_Type;
|
|
|
|
|
2014-07-17 09:16:31 -07:00
|
|
|
typedef enum
|
|
|
|
{
|
2014-08-06 08:30:42 -07:00
|
|
|
EOLIAN_EXPR_UNKNOWN = 0,
|
2014-07-17 09:16:31 -07:00
|
|
|
EOLIAN_EXPR_INT,
|
|
|
|
EOLIAN_EXPR_UINT,
|
|
|
|
EOLIAN_EXPR_LONG,
|
|
|
|
EOLIAN_EXPR_ULONG,
|
|
|
|
EOLIAN_EXPR_LLONG,
|
|
|
|
EOLIAN_EXPR_ULLONG,
|
|
|
|
EOLIAN_EXPR_FLOAT,
|
|
|
|
EOLIAN_EXPR_DOUBLE,
|
|
|
|
EOLIAN_EXPR_STRING,
|
2014-08-07 07:15:07 -07:00
|
|
|
EOLIAN_EXPR_CHAR,
|
|
|
|
EOLIAN_EXPR_NULL,
|
2014-07-17 09:16:31 -07:00
|
|
|
EOLIAN_EXPR_BOOL,
|
|
|
|
EOLIAN_EXPR_NAME,
|
2014-08-12 06:25:53 -07:00
|
|
|
EOLIAN_EXPR_ENUM,
|
2014-07-17 09:16:31 -07:00
|
|
|
EOLIAN_EXPR_UNARY,
|
|
|
|
EOLIAN_EXPR_BINARY
|
|
|
|
} Eolian_Expression_Type;
|
|
|
|
|
2014-08-07 03:13:40 -07:00
|
|
|
typedef enum
|
|
|
|
{
|
|
|
|
EOLIAN_MASK_SINT = 1 << 0,
|
|
|
|
EOLIAN_MASK_UINT = 1 << 1,
|
|
|
|
EOLIAN_MASK_INT = EOLIAN_MASK_SINT | EOLIAN_MASK_UINT,
|
|
|
|
EOLIAN_MASK_FLOAT = 1 << 2,
|
|
|
|
EOLIAN_MASK_BOOL = 1 << 3,
|
|
|
|
EOLIAN_MASK_STRING = 1 << 4,
|
2014-08-07 07:15:07 -07:00
|
|
|
EOLIAN_MASK_CHAR = 1 << 5,
|
|
|
|
EOLIAN_MASK_NULL = 1 << 6,
|
2014-08-07 03:13:40 -07:00
|
|
|
EOLIAN_MASK_NUMBER = EOLIAN_MASK_INT | EOLIAN_MASK_FLOAT,
|
|
|
|
EOLIAN_MASK_ALL = EOLIAN_MASK_NUMBER | EOLIAN_MASK_BOOL
|
2014-08-07 07:15:07 -07:00
|
|
|
| EOLIAN_MASK_STRING | EOLIAN_MASK_CHAR
|
|
|
|
| EOLIAN_MASK_NULL
|
2014-08-07 03:13:40 -07:00
|
|
|
} Eolian_Expression_Mask;
|
|
|
|
|
2014-08-08 07:19:52 -07:00
|
|
|
typedef enum
|
|
|
|
{
|
|
|
|
EOLIAN_VAR_UNKNOWN = 0,
|
|
|
|
EOLIAN_VAR_CONSTANT,
|
|
|
|
EOLIAN_VAR_GLOBAL
|
|
|
|
} Eolian_Variable_Type;
|
|
|
|
|
2014-08-18 05:12:08 -07:00
|
|
|
typedef union
|
|
|
|
{
|
|
|
|
char c;
|
|
|
|
Eina_Bool b;
|
|
|
|
const char *s;
|
|
|
|
signed int i;
|
|
|
|
unsigned int u;
|
|
|
|
signed long l;
|
|
|
|
unsigned long ul;
|
|
|
|
signed long long ll;
|
|
|
|
unsigned long long ull;
|
|
|
|
float f;
|
|
|
|
double d;
|
|
|
|
} Eolian_Value_Union;
|
|
|
|
|
|
|
|
typedef struct _Eolian_Value
|
|
|
|
{
|
|
|
|
Eolian_Expression_Type type;
|
|
|
|
Eolian_Value_Union value;
|
|
|
|
} Eolian_Value;
|
|
|
|
|
2014-02-11 05:42:59 -08:00
|
|
|
/*
|
|
|
|
* @brief Parse a given .eo file and fill the database.
|
|
|
|
*
|
|
|
|
* During parsing, the class described into the .eo file is created with
|
|
|
|
* all the information related to this class.
|
|
|
|
*
|
|
|
|
* @param[in] filename Name of the file to parse.
|
2014-06-24 05:45:51 -07:00
|
|
|
* @see eolian_eot_file_parse
|
2014-02-11 05:42:59 -08:00
|
|
|
*
|
|
|
|
* @ingroup Eolian
|
|
|
|
*/
|
2014-02-11 06:42:47 -08:00
|
|
|
EAPI Eina_Bool eolian_eo_file_parse(const char *filename);
|
2014-02-11 05:42:59 -08:00
|
|
|
|
2014-06-24 05:45:51 -07:00
|
|
|
/*
|
|
|
|
* @brief Parse a given .eot file and fill the database.
|
|
|
|
*
|
|
|
|
* @param[in] filename Name of the file to parse.
|
|
|
|
* @see eolian_eo_file_parse
|
|
|
|
*
|
|
|
|
* @ingroup Eolian
|
|
|
|
*/
|
|
|
|
EAPI Eina_Bool eolian_eot_file_parse(const char *filepath);
|
|
|
|
|
2014-02-11 05:42:59 -08:00
|
|
|
/*
|
|
|
|
* @brief Init Eolian.
|
|
|
|
*
|
|
|
|
* @ingroup Eolian
|
|
|
|
*/
|
2014-02-16 01:41:38 -08:00
|
|
|
EAPI int eolian_init(void);
|
2014-02-11 05:42:59 -08:00
|
|
|
|
|
|
|
/*
|
|
|
|
* @brief Shutdown Eolian.
|
|
|
|
*
|
|
|
|
* @ingroup Eolian
|
|
|
|
*/
|
2014-02-16 01:41:38 -08:00
|
|
|
EAPI int eolian_shutdown(void);
|
2014-02-11 05:42:59 -08:00
|
|
|
|
2014-04-27 00:03:39 -07:00
|
|
|
/*
|
2014-07-07 06:22:41 -07:00
|
|
|
* @brief Scan the given directory (recursively) and search for .eo and
|
|
|
|
* .eot files.
|
2014-04-27 00:03:39 -07:00
|
|
|
*
|
|
|
|
* The found files are just open to extract the class name.
|
|
|
|
*
|
|
|
|
* @param[in] dir the directory to scan
|
|
|
|
* @return EINA_TRUE on success, EINA_FALSE otherwise.
|
|
|
|
*
|
2014-07-07 08:46:12 -07:00
|
|
|
* @see eolian_system_directory_scan
|
|
|
|
*
|
2014-04-27 00:03:39 -07:00
|
|
|
* @ingroup Eolian
|
|
|
|
*/
|
|
|
|
EAPI Eina_Bool eolian_directory_scan(const char *dir);
|
|
|
|
|
2014-07-07 08:46:12 -07:00
|
|
|
/*
|
|
|
|
* @brief Scan the system directory (recursively) and search for .eo and
|
|
|
|
* .eot files.
|
|
|
|
*
|
|
|
|
* @return EINA_TRUE on success, EINA_FALSE otherwise.
|
|
|
|
*
|
|
|
|
* @see eolian_directory_scan
|
|
|
|
*
|
|
|
|
* @ingroup Eolian
|
|
|
|
*/
|
|
|
|
EAPI Eina_Bool eolian_system_directory_scan();
|
|
|
|
|
2014-04-27 06:23:54 -07:00
|
|
|
/*
|
2014-06-24 05:45:51 -07:00
|
|
|
* @brief Force parsing of all the .eo files located in the directories
|
2014-04-27 06:23:54 -07:00
|
|
|
* given in eolian_directory_scan..
|
|
|
|
*
|
|
|
|
* @return EINA_TRUE on success, EINA_FALSE otherwise.
|
|
|
|
*
|
|
|
|
* @see eolian_directory_scan
|
2014-06-24 05:45:51 -07:00
|
|
|
* @see eolian_all_eot_files_parse
|
2014-04-27 06:23:54 -07:00
|
|
|
*
|
|
|
|
* @ingroup Eolian
|
|
|
|
*/
|
|
|
|
EAPI Eina_Bool eolian_all_eo_files_parse();
|
|
|
|
|
2014-06-24 05:45:51 -07:00
|
|
|
/*
|
|
|
|
* @brief Force parsing of all the .eot files located in the directories
|
|
|
|
* given in eolian_directory_scan..
|
|
|
|
*
|
|
|
|
* @return EINA_TRUE on success, EINA_FALSE otherwise.
|
|
|
|
*
|
|
|
|
* @see eolian_directory_scan
|
|
|
|
* @see eolian_all_eo_files_parse
|
|
|
|
*
|
|
|
|
* @ingroup Eolian
|
|
|
|
*/
|
|
|
|
EAPI Eina_Bool eolian_all_eot_files_parse();
|
|
|
|
|
2014-02-11 05:42:59 -08:00
|
|
|
/*
|
|
|
|
* @brief Show information about a given class.
|
|
|
|
*
|
2014-05-22 07:24:50 -07:00
|
|
|
* If klass is NULL, this function will print information of
|
2014-02-11 05:42:59 -08:00
|
|
|
* all the classes stored into the database.
|
|
|
|
*
|
2014-05-22 07:24:50 -07:00
|
|
|
* @param[in] klass the class to show
|
2014-02-11 05:42:59 -08:00
|
|
|
*
|
2014-07-11 05:10:04 -07:00
|
|
|
* @return EINA_TRUE on success, EINA_FALSE otherwise (currently always
|
|
|
|
* succeeds).
|
|
|
|
*
|
|
|
|
* @see eolian_show_typedef
|
|
|
|
* @see eolian_show_struct
|
2014-08-12 07:26:48 -07:00
|
|
|
* @see eolian_show_enum
|
|
|
|
* @see eolian_show_global
|
|
|
|
* @see eolian_show_constant
|
2014-07-11 05:10:04 -07:00
|
|
|
* @see eolian_show_all
|
|
|
|
*
|
|
|
|
* @ingroup Eolian
|
|
|
|
*/
|
|
|
|
EAPI Eina_Bool eolian_show_class(const Eolian_Class *klass);
|
|
|
|
|
|
|
|
/*
|
|
|
|
* @brief Show information about a given typedef.
|
|
|
|
*
|
|
|
|
* If @c alias is NULL, this function will print information of
|
|
|
|
* all the typedefs.
|
|
|
|
*
|
|
|
|
* @param[in] alias the typedef to show.
|
|
|
|
*
|
|
|
|
* @return EINA_TRUE on success, EINA_FALSE otherwise (when typedef is not
|
|
|
|
* found).
|
|
|
|
*
|
|
|
|
* @see eolian_show_class
|
|
|
|
* @see eolian_show_struct
|
2014-08-12 07:26:48 -07:00
|
|
|
* @see eolian_show_enum
|
|
|
|
* @see eolian_show_global
|
|
|
|
* @see eolian_show_constant
|
2014-07-11 05:10:04 -07:00
|
|
|
* @see eolian_show_all
|
|
|
|
*
|
|
|
|
* @ingroup Eolian
|
|
|
|
*/
|
|
|
|
EAPI Eina_Bool eolian_show_typedef(const char *alias);
|
|
|
|
|
|
|
|
/*
|
|
|
|
* @brief Show information about a given struct.
|
|
|
|
*
|
|
|
|
* If @c name is NULL, this function will print information of
|
|
|
|
* all the named global structs.
|
|
|
|
*
|
|
|
|
* @param[in] name the struct to show.
|
|
|
|
*
|
|
|
|
* @return EINA_TRUE on success, EINA_FALSE otherwise (when struct is not
|
|
|
|
* found).
|
|
|
|
*
|
|
|
|
* @see eolian_show_class
|
|
|
|
* @see eolian_show_typedef
|
2014-08-12 07:26:48 -07:00
|
|
|
* @see eolian_show_enum
|
|
|
|
* @see eolian_show_global
|
|
|
|
* @see eolian_show_constant
|
2014-07-11 05:10:04 -07:00
|
|
|
* @see eolian_show_all
|
|
|
|
*
|
|
|
|
* @ingroup Eolian
|
|
|
|
*/
|
|
|
|
EAPI Eina_Bool eolian_show_struct(const char *name);
|
|
|
|
|
2014-08-12 07:26:48 -07:00
|
|
|
/*
|
|
|
|
* @brief Show information about a given enum.
|
|
|
|
*
|
|
|
|
* If @c name is NULL, this function will print information of
|
|
|
|
* all the enums.
|
|
|
|
*
|
|
|
|
* @param[in] name the enum to show.
|
|
|
|
*
|
|
|
|
* @return EINA_TRUE on success, EINA_FALSE otherwise (when enum is not
|
|
|
|
* found).
|
|
|
|
*
|
|
|
|
* @see eolian_show_class
|
|
|
|
* @see eolian_show_typedef
|
|
|
|
* @see eolian_show_struct
|
|
|
|
* @see eolian_show_global
|
|
|
|
* @see eolian_show_constant
|
|
|
|
* @see eolian_show_all
|
|
|
|
*
|
|
|
|
* @ingroup Eolian
|
|
|
|
*/
|
|
|
|
EAPI Eina_Bool eolian_show_enum(const char *name);
|
|
|
|
|
|
|
|
/*
|
|
|
|
* @brief Show information about a given global.
|
|
|
|
*
|
|
|
|
* If @c name is NULL, this function will print information of
|
|
|
|
* all the globals.
|
|
|
|
*
|
|
|
|
* @param[in] name the global to show.
|
|
|
|
*
|
|
|
|
* @return EINA_TRUE on success, EINA_FALSE otherwise (when global is not
|
|
|
|
* found).
|
|
|
|
*
|
|
|
|
* @see eolian_show_class
|
|
|
|
* @see eolian_show_typedef
|
|
|
|
* @see eolian_show_struct
|
|
|
|
* @see eolian_show_enum
|
|
|
|
* @see eolian_show_constant
|
|
|
|
* @see eolian_show_all
|
|
|
|
*
|
|
|
|
* @ingroup Eolian
|
|
|
|
*/
|
|
|
|
EAPI Eina_Bool eolian_show_global(const char *name);
|
|
|
|
|
|
|
|
/*
|
|
|
|
* @brief Show information about a given constant.
|
|
|
|
*
|
|
|
|
* If @c name is NULL, this function will print information of
|
|
|
|
* all the constants.
|
|
|
|
*
|
|
|
|
* @param[in] name the constant to show.
|
|
|
|
*
|
|
|
|
* @return EINA_TRUE on success, EINA_FALSE otherwise (when constant is not
|
|
|
|
* found).
|
|
|
|
*
|
|
|
|
* @see eolian_show_class
|
|
|
|
* @see eolian_show_typedef
|
|
|
|
* @see eolian_show_struct
|
|
|
|
* @see eolian_show_enum
|
|
|
|
* @see eolian_show_global
|
|
|
|
* @see eolian_show_all
|
|
|
|
*
|
|
|
|
* @ingroup Eolian
|
|
|
|
*/
|
|
|
|
EAPI Eina_Bool eolian_show_constant(const char *name);
|
|
|
|
|
2014-07-11 05:10:04 -07:00
|
|
|
/*
|
|
|
|
* @brief Show information about everything.
|
|
|
|
*
|
|
|
|
* This will print a complete dump of all information stored in the Eolian
|
|
|
|
* database.
|
|
|
|
*
|
|
|
|
* @see eolian_show_class
|
|
|
|
* @see eolian_show_typedef
|
|
|
|
* @see eolian_show_struct
|
2014-08-12 07:26:48 -07:00
|
|
|
* @see eolian_show_enum
|
2014-07-11 05:10:04 -07:00
|
|
|
*
|
2014-02-11 05:42:59 -08:00
|
|
|
* @ingroup Eolian
|
|
|
|
*/
|
2014-07-11 05:10:04 -07:00
|
|
|
EAPI void eolian_show_all();
|
2014-05-22 07:24:50 -07:00
|
|
|
|
|
|
|
/*
|
2014-07-23 06:13:21 -07:00
|
|
|
* @brief Gets a class by its name
|
2014-05-22 07:24:50 -07:00
|
|
|
*
|
2014-07-23 06:13:21 -07:00
|
|
|
* @param[in] class_name name of the class to get.
|
2014-05-22 07:24:50 -07:00
|
|
|
* @return the class
|
|
|
|
*
|
|
|
|
* @ingroup Eolian
|
|
|
|
*/
|
2014-07-23 06:13:21 -07:00
|
|
|
EAPI const Eolian_Class *eolian_class_get_by_name(const char *class_name);
|
2014-02-11 05:42:59 -08:00
|
|
|
|
2014-02-16 06:09:06 -08:00
|
|
|
/*
|
2014-07-23 09:15:00 -07:00
|
|
|
* @brief Gets a class by its filename (name.eo)
|
2014-02-16 06:09:06 -08:00
|
|
|
*
|
2014-07-23 09:15:00 -07:00
|
|
|
* @param[in] file_name the filename
|
2014-05-22 07:24:50 -07:00
|
|
|
* @return the class stored in the file
|
2014-02-16 06:09:06 -08:00
|
|
|
*
|
|
|
|
* @ingroup Eolian
|
|
|
|
*/
|
2014-07-23 06:13:21 -07:00
|
|
|
EAPI const Eolian_Class *eolian_class_get_by_file(const char *file_name);
|
2014-02-16 06:09:06 -08:00
|
|
|
|
2014-04-27 22:45:39 -07:00
|
|
|
/*
|
|
|
|
* @brief Returns the name of the file containing the given class.
|
|
|
|
*
|
2014-05-22 07:24:50 -07:00
|
|
|
* @param[in] klass the class.
|
2014-04-27 22:45:39 -07:00
|
|
|
* @return the name of the file on success or NULL otherwise.
|
2014-06-05 09:01:01 -07:00
|
|
|
*
|
|
|
|
* @ingroup Eolian
|
2014-04-27 22:45:39 -07:00
|
|
|
*/
|
2014-07-10 06:04:13 -07:00
|
|
|
EAPI Eina_Stringshare *eolian_class_file_get(const Eolian_Class *klass);
|
2014-05-22 07:24:50 -07:00
|
|
|
|
2014-05-25 03:53:49 -07:00
|
|
|
/*
|
|
|
|
* @brief Returns the full name of the given class.
|
|
|
|
*
|
|
|
|
* @param[in] class the class.
|
|
|
|
* @return the full name of the class on success or NULL otherwise.
|
|
|
|
*
|
|
|
|
* The full name and the name of a class will be different if namespaces
|
|
|
|
* are used.
|
2014-06-05 09:01:01 -07:00
|
|
|
*
|
|
|
|
* @ingroup Eolian
|
2014-05-25 03:53:49 -07:00
|
|
|
*/
|
2014-07-10 06:04:13 -07:00
|
|
|
EAPI Eina_Stringshare *eolian_class_full_name_get(const Eolian_Class *klass);
|
2014-05-25 03:53:49 -07:00
|
|
|
|
2014-05-22 07:24:50 -07:00
|
|
|
/*
|
|
|
|
* @brief Returns the name of the given class.
|
|
|
|
*
|
|
|
|
* @param[in] class the class.
|
|
|
|
* @return the name of the class on success or NULL otherwise.
|
2014-06-05 09:01:01 -07:00
|
|
|
*
|
|
|
|
* @ingroup Eolian
|
2014-05-22 07:24:50 -07:00
|
|
|
*/
|
2014-07-10 06:04:13 -07:00
|
|
|
EAPI Eina_Stringshare *eolian_class_name_get(const Eolian_Class *klass);
|
2014-05-25 03:53:49 -07:00
|
|
|
|
|
|
|
/*
|
2014-07-23 00:24:59 -07:00
|
|
|
* @brief Returns an iterator to the namespaces of the given class.
|
2014-05-25 03:53:49 -07:00
|
|
|
*
|
|
|
|
* @param[in] class the class.
|
2014-07-23 00:24:59 -07:00
|
|
|
* @return the iterator on success or NULL otherwise.
|
2014-06-05 09:01:01 -07:00
|
|
|
*
|
|
|
|
* @ingroup Eolian
|
2014-05-25 03:53:49 -07:00
|
|
|
*/
|
2014-07-23 06:13:21 -07:00
|
|
|
EAPI Eina_Iterator *eolian_class_namespaces_get(const Eolian_Class *klass);
|
2014-04-27 22:45:39 -07:00
|
|
|
|
2014-02-11 05:42:59 -08:00
|
|
|
/*
|
|
|
|
* @brief Returns the class type of the given class
|
|
|
|
*
|
2014-05-22 07:24:50 -07:00
|
|
|
* @param[in] klass the class
|
2014-02-11 05:42:59 -08:00
|
|
|
* @return the class type
|
|
|
|
*
|
|
|
|
* @ingroup Eolian
|
|
|
|
*/
|
2014-07-09 08:33:07 -07:00
|
|
|
EAPI Eolian_Class_Type eolian_class_type_get(const Eolian_Class *klass);
|
2014-02-11 05:42:59 -08:00
|
|
|
|
|
|
|
/*
|
2014-07-23 00:24:59 -07:00
|
|
|
* @brief Returns an iterator to all the classes stored into the database.
|
2014-02-11 05:42:59 -08:00
|
|
|
*
|
2014-07-23 00:24:59 -07:00
|
|
|
* @return the iterator
|
2014-02-11 05:42:59 -08:00
|
|
|
*
|
|
|
|
* @ingroup Eolian
|
|
|
|
*/
|
2014-07-23 06:13:21 -07:00
|
|
|
EAPI Eina_Iterator *eolian_all_classes_get(void);
|
2014-02-11 05:42:59 -08:00
|
|
|
|
|
|
|
/*
|
|
|
|
* @brief Returns the description of a class.
|
|
|
|
*
|
2014-05-22 07:24:50 -07:00
|
|
|
* @param[in] klass the class
|
2014-02-11 05:42:59 -08:00
|
|
|
* @return the description of a class
|
|
|
|
*
|
|
|
|
* @ingroup Eolian
|
|
|
|
*/
|
2014-07-10 06:04:13 -07:00
|
|
|
EAPI Eina_Stringshare *eolian_class_description_get(const Eolian_Class *klass);
|
2014-02-11 05:42:59 -08:00
|
|
|
|
|
|
|
/*
|
|
|
|
* @brief Returns the legacy prefix of a class
|
|
|
|
*
|
2014-05-22 07:24:50 -07:00
|
|
|
* @param[in] klass the class
|
2014-02-11 05:42:59 -08:00
|
|
|
* @return the legacy prefix
|
|
|
|
*
|
|
|
|
* @ingroup Eolian
|
|
|
|
*/
|
2014-07-10 06:04:13 -07:00
|
|
|
EAPI Eina_Stringshare *eolian_class_legacy_prefix_get(const Eolian_Class *klass);
|
2014-02-11 05:42:59 -08:00
|
|
|
|
2014-03-10 02:52:46 -07:00
|
|
|
/*
|
|
|
|
* @brief Returns the eo prefix of a class
|
|
|
|
*
|
2014-05-22 07:24:50 -07:00
|
|
|
* @param[in] klass the class
|
2014-03-10 02:52:46 -07:00
|
|
|
* @return the eo prefix
|
|
|
|
*
|
|
|
|
* @ingroup Eolian
|
|
|
|
*/
|
2014-07-10 06:04:13 -07:00
|
|
|
EAPI Eina_Stringshare* eolian_class_eo_prefix_get(const Eolian_Class *klass);
|
2014-03-10 02:52:46 -07:00
|
|
|
|
|
|
|
/*
|
|
|
|
* @brief Returns the data type of a class
|
|
|
|
*
|
2014-05-22 07:24:50 -07:00
|
|
|
* @param[in] klass the class
|
2014-03-10 02:52:46 -07:00
|
|
|
* @return the data type
|
|
|
|
*
|
|
|
|
* @ingroup Eolian
|
|
|
|
*/
|
2014-07-10 06:04:13 -07:00
|
|
|
EAPI Eina_Stringshare *eolian_class_data_type_get(const Eolian_Class *klass);
|
2014-03-10 02:52:46 -07:00
|
|
|
|
2014-02-11 05:42:59 -08:00
|
|
|
/*
|
2014-07-25 06:31:39 -07:00
|
|
|
* @brief Returns an iterator to the names of inherit classes of a class
|
2014-02-11 05:42:59 -08:00
|
|
|
*
|
2014-05-22 07:24:50 -07:00
|
|
|
* @param[in] klass the class
|
2014-07-23 00:24:59 -07:00
|
|
|
* @return the iterator
|
2014-02-11 05:42:59 -08:00
|
|
|
*
|
|
|
|
* @ingroup Eolian
|
|
|
|
*/
|
2014-07-23 06:13:21 -07:00
|
|
|
EAPI Eina_Iterator *eolian_class_inherits_get(const Eolian_Class *klass);
|
2014-02-11 05:42:59 -08:00
|
|
|
|
|
|
|
/*
|
2014-07-23 00:24:59 -07:00
|
|
|
* @brief Returns an iterator to functions of a class.
|
2014-02-11 05:42:59 -08:00
|
|
|
*
|
2014-05-22 07:24:50 -07:00
|
|
|
* @param[in] klass the class
|
2014-02-11 05:42:59 -08:00
|
|
|
* @param[in] func_type type of the functions to insert into the list.
|
2014-07-23 00:24:59 -07:00
|
|
|
* @return the iterator
|
2014-02-11 05:42:59 -08:00
|
|
|
*
|
|
|
|
* @ingroup Eolian
|
|
|
|
*/
|
2014-07-23 06:13:21 -07:00
|
|
|
EAPI Eina_Iterator *eolian_class_functions_get(const Eolian_Class *klass, Eolian_Function_Type func_type);
|
2014-02-11 05:42:59 -08:00
|
|
|
|
|
|
|
/*
|
|
|
|
* @brief Returns the type of a function
|
|
|
|
*
|
|
|
|
* @param[in] function_id Id of the function
|
|
|
|
* @return the function type
|
|
|
|
*
|
|
|
|
* @ingroup Eolian
|
|
|
|
*/
|
2014-07-09 12:59:31 -07:00
|
|
|
EAPI Eolian_Function_Type eolian_function_type_get(const Eolian_Function *function_id);
|
2014-02-11 05:42:59 -08:00
|
|
|
|
2014-04-03 06:20:58 -07:00
|
|
|
/*
|
|
|
|
* @brief Returns the scope of a function
|
|
|
|
*
|
|
|
|
* @param[in] function_id Id of the function
|
|
|
|
* @return the function scope
|
|
|
|
*
|
|
|
|
* @ingroup Eolian
|
|
|
|
*/
|
2014-08-13 03:53:33 -07:00
|
|
|
EAPI Eolian_Object_Scope eolian_function_scope_get(const Eolian_Function *function_id);
|
2014-04-03 06:20:58 -07:00
|
|
|
|
2014-02-11 05:42:59 -08:00
|
|
|
/*
|
|
|
|
* @brief Returns the name of a function
|
|
|
|
*
|
|
|
|
* @param[in] function_id Id of the function
|
|
|
|
* @return the function name
|
|
|
|
*
|
|
|
|
* @ingroup Eolian
|
|
|
|
*/
|
2014-07-10 06:04:13 -07:00
|
|
|
EAPI Eina_Stringshare *eolian_function_name_get(const Eolian_Function *function_id);
|
2014-02-11 05:42:59 -08:00
|
|
|
|
2014-06-24 09:15:17 -07:00
|
|
|
/*
|
|
|
|
* @brief Returns the full C name of a function (with prefix). It's here
|
|
|
|
* because the C API names are deduplicated (prefix of function and suffix
|
|
|
|
* of prefix merge if applicable) and this helps generators not write the
|
|
|
|
* same code over and over.
|
|
|
|
*
|
|
|
|
* @param[in] function_id Id of the function
|
|
|
|
* @return the function name
|
|
|
|
*
|
|
|
|
* @ingroup Eolian
|
|
|
|
*/
|
2014-07-10 06:04:13 -07:00
|
|
|
EAPI Eina_Stringshare *eolian_function_full_c_name_get(const Eolian_Function *function_id, const char *prefix);
|
2014-06-24 09:15:17 -07:00
|
|
|
|
2014-02-11 05:42:59 -08:00
|
|
|
/*
|
2014-07-23 06:13:21 -07:00
|
|
|
* @brief Get a function in a class by its name and type
|
2014-02-11 05:42:59 -08:00
|
|
|
*
|
2014-05-22 07:24:50 -07:00
|
|
|
* @param[in] klass the class
|
2014-02-11 05:42:59 -08:00
|
|
|
* @param[in] func_name name of the function
|
|
|
|
* @param[in] f_type type of the function
|
2014-02-19 00:30:02 -08:00
|
|
|
* @return the function id if found, NULL otherwise.
|
2014-02-11 05:42:59 -08:00
|
|
|
*
|
|
|
|
* @ingroup Eolian
|
|
|
|
*/
|
2014-07-23 06:13:21 -07:00
|
|
|
EAPI const Eolian_Function *eolian_class_function_get_by_name(const Eolian_Class *klass, const char *func_name, Eolian_Function_Type f_type);
|
2014-02-11 05:42:59 -08:00
|
|
|
|
|
|
|
/*
|
2014-08-15 03:52:11 -07:00
|
|
|
* @brief Returns a legacy name for a function.
|
2014-02-11 05:42:59 -08:00
|
|
|
*
|
|
|
|
* @param[in] function_id Id of the function
|
2014-08-15 03:52:11 -07:00
|
|
|
* @param[in] f_type The function type, for property get/set distinction.
|
|
|
|
* @return the legacy name or NULL.
|
2014-02-11 05:42:59 -08:00
|
|
|
*
|
|
|
|
* @ingroup Eolian
|
|
|
|
*/
|
2014-08-15 03:52:11 -07:00
|
|
|
EAPI Eina_Stringshare *eolian_function_legacy_get(const Eolian_Function *function_id, Eolian_Function_Type f_type);
|
2014-02-11 05:42:59 -08:00
|
|
|
|
2014-02-19 00:30:02 -08:00
|
|
|
/*
|
2014-08-15 03:52:11 -07:00
|
|
|
* @brief Returns a description for a function.
|
2014-02-19 00:30:02 -08:00
|
|
|
*
|
|
|
|
* @param[in] function_id Id of the function
|
2014-08-15 03:52:11 -07:00
|
|
|
* @param[in] f_type The function type, for property get/set distinction.
|
|
|
|
* @return the description or NULL.
|
2014-02-19 00:30:02 -08:00
|
|
|
*
|
|
|
|
* @ingroup Eolian
|
|
|
|
*/
|
2014-08-15 03:52:11 -07:00
|
|
|
EAPI Eina_Stringshare *eolian_function_description_get(const Eolian_Function *function_id, Eolian_Function_Type f_type);
|
2014-02-19 00:30:02 -08:00
|
|
|
|
2014-07-24 04:05:12 -07:00
|
|
|
/*
|
2014-08-15 03:52:11 -07:00
|
|
|
* @brief Indicates if a function is virtual pure.
|
2014-07-24 04:05:12 -07:00
|
|
|
*
|
|
|
|
* @param[in] function_id Id of the function
|
2014-08-15 03:52:11 -07:00
|
|
|
* @param[in] f_type The function type, for property get/set distinction.
|
2014-08-18 06:51:03 -07:00
|
|
|
* @return EINA_TRUE if virtual pure, EINA_FALSE othrewise.
|
2014-07-24 04:05:12 -07:00
|
|
|
*
|
|
|
|
* @ingroup Eolian
|
|
|
|
*/
|
2014-08-15 03:52:11 -07:00
|
|
|
EAPI Eina_Bool eolian_function_is_virtual_pure(const Eolian_Function *function_id, Eolian_Function_Type f_type);
|
2014-07-24 04:05:12 -07:00
|
|
|
|
2014-08-18 06:51:03 -07:00
|
|
|
/*
|
|
|
|
* @brief Indicates if a function is legacy only.
|
|
|
|
*
|
|
|
|
* @param[in] function_id Id of the function
|
|
|
|
* @param[in] f_type The function type, for property get/set distinction.
|
|
|
|
* @return EINA_TRUE if legacy only, EINA_FALSE otherwise.
|
|
|
|
*
|
|
|
|
* @ingroup Eolian
|
|
|
|
*/
|
|
|
|
EAPI Eina_Bool eolian_function_is_legacy_only(const Eolian_Function *function_id, Eolian_Function_Type ftype);
|
|
|
|
|
2014-02-11 05:42:59 -08:00
|
|
|
/*
|
2014-08-15 03:52:11 -07:00
|
|
|
* @brief Get whether a function is a class method/property.
|
2014-02-11 05:42:59 -08:00
|
|
|
*
|
|
|
|
* @param[in] function_id Id of the function
|
2014-08-15 03:52:11 -07:00
|
|
|
* @return EINA_TRUE and EINA_FALSE respectively
|
2014-02-11 05:42:59 -08:00
|
|
|
*
|
|
|
|
* @ingroup Eolian
|
|
|
|
*/
|
2014-08-15 03:52:11 -07:00
|
|
|
EAPI Eina_Bool eolian_function_is_class(const Eolian_Function *function_id);
|
2014-02-11 05:42:59 -08:00
|
|
|
|
|
|
|
/*
|
|
|
|
* @brief Returns a parameter of a function pointed by its id.
|
|
|
|
*
|
|
|
|
* @param[in] function_id Id of the function
|
|
|
|
* @param[in] param_name Name of the parameter
|
|
|
|
* @return a handle to this parameter.
|
|
|
|
*
|
|
|
|
* @ingroup Eolian
|
|
|
|
*/
|
2014-07-23 06:22:25 -07:00
|
|
|
EAPI const Eolian_Function_Parameter *eolian_function_parameter_get_by_name(const Eolian_Function *function_id, const char *param_name);
|
2014-02-11 05:42:59 -08:00
|
|
|
|
|
|
|
/*
|
2014-07-23 06:17:19 -07:00
|
|
|
* @brief Returns an iterator to the parameter handles for a method/ctor/dtor.
|
2014-02-11 05:42:59 -08:00
|
|
|
*
|
|
|
|
* @param[in] function_id Id of the function
|
2014-07-23 00:24:59 -07:00
|
|
|
* @return the iterator
|
2014-02-26 10:02:10 -08:00
|
|
|
*
|
|
|
|
* @ingroup Eolian
|
|
|
|
*/
|
2014-07-23 06:17:19 -07:00
|
|
|
EAPI Eina_Iterator *eolian_function_parameters_get(const Eolian_Function *function_id);
|
2014-02-26 10:02:10 -08:00
|
|
|
|
|
|
|
/*
|
2014-07-23 06:17:19 -07:00
|
|
|
* @brief Returns an iterator to the keys params of a given function.
|
2014-02-26 10:02:10 -08:00
|
|
|
*
|
|
|
|
* @param[in] function_id Id of the function
|
2014-07-23 00:24:59 -07:00
|
|
|
* @return the iterator
|
2014-02-26 10:02:10 -08:00
|
|
|
*
|
|
|
|
* @ingroup Eolian
|
|
|
|
*/
|
2014-07-23 06:17:19 -07:00
|
|
|
EAPI Eina_Iterator *eolian_property_keys_get(const Eolian_Function *foo_id);
|
2014-02-26 10:02:10 -08:00
|
|
|
|
|
|
|
/*
|
2014-07-23 06:17:19 -07:00
|
|
|
* @brief Returns an iterator to the values params of a given function.
|
2014-02-26 10:02:10 -08:00
|
|
|
*
|
|
|
|
* @param[in] function_id Id of the function
|
2014-07-23 00:24:59 -07:00
|
|
|
* @return the iterator
|
2014-02-11 05:42:59 -08:00
|
|
|
*
|
|
|
|
* @ingroup Eolian
|
|
|
|
*/
|
2014-07-23 06:17:19 -07:00
|
|
|
EAPI Eina_Iterator *eolian_property_values_get(const Eolian_Function *foo_id);
|
2014-02-11 05:42:59 -08:00
|
|
|
|
|
|
|
/*
|
2014-08-13 06:08:00 -07:00
|
|
|
* @brief Get direction of a parameter
|
2014-02-11 05:42:59 -08:00
|
|
|
*
|
|
|
|
* @param[in] param_desc parameter handle
|
2014-08-13 06:08:00 -07:00
|
|
|
* @return the direction of the parameter
|
2014-02-11 05:42:59 -08:00
|
|
|
*
|
|
|
|
* @ingroup Eolian
|
|
|
|
*/
|
2014-08-13 06:08:00 -07:00
|
|
|
EAPI Eolian_Parameter_Dir eolian_parameter_direction_get(const Eolian_Function_Parameter *param);
|
2014-04-16 06:17:27 -07:00
|
|
|
|
2014-02-11 05:42:59 -08:00
|
|
|
/*
|
|
|
|
* @brief Get type of a parameter
|
|
|
|
*
|
|
|
|
* @param[in] param_desc parameter handle
|
|
|
|
* @return the type of the parameter
|
|
|
|
*
|
|
|
|
* @ingroup Eolian
|
|
|
|
*/
|
2014-07-09 13:31:03 -07:00
|
|
|
EAPI const Eolian_Type *eolian_parameter_type_get(const Eolian_Function_Parameter *param);
|
2014-04-16 06:17:27 -07:00
|
|
|
|
2014-02-11 05:42:59 -08:00
|
|
|
/*
|
|
|
|
* @brief Get name of a parameter
|
|
|
|
*
|
|
|
|
* @param[in] param_desc parameter handle
|
|
|
|
* @return the name of the parameter
|
|
|
|
*
|
|
|
|
* @ingroup Eolian
|
|
|
|
*/
|
2014-07-09 09:01:19 -07:00
|
|
|
EAPI Eina_Stringshare *eolian_parameter_name_get(const Eolian_Function_Parameter *param);
|
2014-02-11 05:42:59 -08:00
|
|
|
|
2014-08-13 06:08:00 -07:00
|
|
|
/*
|
|
|
|
* @brief Get description of a parameter
|
|
|
|
*
|
|
|
|
* @param[in] param_desc parameter handle
|
|
|
|
* @return the description of the parameter or NULL
|
|
|
|
*
|
|
|
|
* @ingroup Eolian
|
|
|
|
*/
|
|
|
|
EAPI Eina_Stringshare *eolian_parameter_description_get(const Eolian_Function_Parameter *param);
|
|
|
|
|
2014-02-11 05:42:59 -08:00
|
|
|
/*
|
|
|
|
* @brief Indicates if a parameter has a const attribute.
|
|
|
|
*
|
|
|
|
* This function is relevant for properties, to know if a parameter is a const
|
|
|
|
* parameter in the get operation.
|
|
|
|
*
|
|
|
|
* @param[in] param_desc parameter handle
|
2014-03-27 06:16:32 -07:00
|
|
|
* @param[in] is_get indicates if the information needed is for get or set.
|
2014-02-11 05:42:59 -08:00
|
|
|
* @return EINA_TRUE if const in get, EINA_FALSE otherwise
|
|
|
|
*
|
|
|
|
* @ingroup Eolian
|
|
|
|
*/
|
2014-07-09 09:01:19 -07:00
|
|
|
EAPI Eina_Bool eolian_parameter_const_attribute_get(const Eolian_Function_Parameter *param_desc, Eina_Bool is_get);
|
2014-02-11 05:42:59 -08:00
|
|
|
|
2014-02-23 01:19:14 -08:00
|
|
|
/*
|
|
|
|
* @brief Indicates if a parameter cannot be NULL.
|
|
|
|
*
|
|
|
|
* @param[in] param_desc parameter handle
|
|
|
|
* @return EINA_TRUE if cannot be NULL, EINA_FALSE otherwise
|
|
|
|
*
|
|
|
|
* @ingroup Eolian
|
|
|
|
*/
|
2014-07-09 09:01:19 -07:00
|
|
|
EAPI Eina_Bool eolian_parameter_is_nonull(const Eolian_Function_Parameter *param_desc);
|
2014-02-23 01:19:14 -08:00
|
|
|
|
2014-02-11 05:42:59 -08:00
|
|
|
/*
|
|
|
|
* @brief Get the return type of a function.
|
|
|
|
*
|
|
|
|
* @param[in] function_id id of the function
|
|
|
|
* @param[in] ftype type of the function
|
|
|
|
* @return the return type of the function
|
|
|
|
*
|
|
|
|
* The type of the function is needed because a given function can represent a
|
|
|
|
* property, that can be set and get functions.
|
|
|
|
*
|
|
|
|
* @ingroup Eolian
|
|
|
|
*/
|
2014-07-09 13:31:03 -07:00
|
|
|
EAPI const Eolian_Type *eolian_function_return_type_get(const Eolian_Function *function_id, Eolian_Function_Type ftype);
|
2014-04-16 06:17:27 -07:00
|
|
|
|
2014-03-15 23:33:24 -07:00
|
|
|
/*
|
|
|
|
* @brief Get the return default value of a function.
|
|
|
|
*
|
|
|
|
* @param[in] function_id id of the function
|
|
|
|
* @param[in] ftype type of the function
|
|
|
|
* @return the return default value of the function
|
|
|
|
*
|
|
|
|
* The return default value is needed to return an appropriate
|
|
|
|
* value if an error occurs (eo_do failure...).
|
|
|
|
* The default value is not mandatory, so NULL can be returned.
|
|
|
|
*
|
|
|
|
* @ingroup Eolian
|
|
|
|
*/
|
2014-08-07 07:15:07 -07:00
|
|
|
EAPI const Eolian_Expression *
|
2014-07-11 06:30:22 -07:00
|
|
|
eolian_function_return_default_value_get(const Eolian_Function *foo_id, Eolian_Function_Type ftype);
|
2014-03-15 23:33:24 -07:00
|
|
|
|
2014-03-07 07:37:05 -08:00
|
|
|
/*
|
|
|
|
* @brief Get the return comment of a function.
|
|
|
|
*
|
|
|
|
* @param[in] function_id id of the function
|
|
|
|
* @param[in] ftype type of the function
|
|
|
|
* @return the return comment of the function
|
|
|
|
*
|
|
|
|
* The type of the function is needed because a given function can represent a
|
|
|
|
* property, that can be set and get functions.
|
|
|
|
*
|
|
|
|
* @ingroup Eolian
|
|
|
|
*/
|
2014-07-10 06:04:13 -07:00
|
|
|
EAPI Eina_Stringshare *eolian_function_return_comment_get(const Eolian_Function *foo_id, Eolian_Function_Type ftype);
|
2014-03-07 07:37:05 -08:00
|
|
|
|
2014-02-20 06:18:49 -08:00
|
|
|
/*
|
|
|
|
* @brief Indicates if a function return is warn-unused.
|
|
|
|
*
|
|
|
|
* @param[in] function_id id of the function
|
|
|
|
* @param[in] ftype type of the function
|
|
|
|
* @return EINA_TRUE is warn-unused, EINA_FALSE otherwise.
|
|
|
|
*
|
|
|
|
* The type of the function is needed because a given function can represent a
|
|
|
|
* property, that can be set and get functions.
|
|
|
|
*
|
|
|
|
* @ingroup Eolian
|
|
|
|
*/
|
2014-07-09 12:59:31 -07:00
|
|
|
EAPI Eina_Bool eolian_function_return_is_warn_unused(const Eolian_Function *foo_id, Eolian_Function_Type ftype);
|
2014-02-20 06:18:49 -08:00
|
|
|
|
2014-02-11 05:42:59 -08:00
|
|
|
/*
|
|
|
|
* @brief Indicates if a function object is const.
|
|
|
|
*
|
|
|
|
* @param[in] function_id id of the function
|
|
|
|
* @return EINA_TRUE if the object is const, EINA_FALSE otherwise
|
|
|
|
*
|
|
|
|
* @ingroup Eolian
|
|
|
|
*/
|
2014-07-09 12:59:31 -07:00
|
|
|
EAPI Eina_Bool eolian_function_object_is_const(const Eolian_Function *function_id);
|
2014-02-11 05:42:59 -08:00
|
|
|
|
2014-05-29 04:42:16 -07:00
|
|
|
/*
|
|
|
|
* @brief Get full string of an overriding function (implement).
|
|
|
|
*
|
|
|
|
* @param[in] impl handle of the implement
|
|
|
|
* @return the full string.
|
2014-06-05 09:01:01 -07:00
|
|
|
*
|
|
|
|
* @ingroup Eolian
|
2014-05-29 04:42:16 -07:00
|
|
|
*/
|
2014-08-13 05:09:03 -07:00
|
|
|
EAPI Eina_Stringshare *eolian_implement_full_name_get(const Eolian_Implement *impl);
|
2014-05-29 04:42:16 -07:00
|
|
|
|
2014-02-11 05:42:59 -08:00
|
|
|
/*
|
2014-08-13 05:09:03 -07:00
|
|
|
* @brief Get the class of an overriding function (implement).
|
2014-02-11 05:42:59 -08:00
|
|
|
*
|
|
|
|
* @param[in] impl handle of the implement
|
2014-08-13 05:09:03 -07:00
|
|
|
* @return the class handle or NULL.
|
|
|
|
*
|
|
|
|
* @ingroup Eolian
|
|
|
|
*/
|
|
|
|
EAPI const Eolian_Class *eolian_implement_class_get(const Eolian_Implement *impl);
|
|
|
|
|
|
|
|
/*
|
|
|
|
* @brief Get the function of an implement.
|
|
|
|
*
|
|
|
|
* @param[in] impl handle of the implement
|
|
|
|
* @param[out] func_type the function type.
|
|
|
|
* @return the function handle or NULL.
|
2014-02-11 05:42:59 -08:00
|
|
|
*
|
|
|
|
* @ingroup Eolian
|
|
|
|
*/
|
2014-08-13 05:09:03 -07:00
|
|
|
EAPI const Eolian_Function *eolian_implement_function_get(const Eolian_Implement *impl, Eolian_Function_Type *func_type);
|
2014-02-11 05:42:59 -08:00
|
|
|
|
|
|
|
/*
|
2014-07-23 00:24:59 -07:00
|
|
|
* @brief Get an iterator to the overriding functions defined in a class.
|
2014-02-11 05:42:59 -08:00
|
|
|
*
|
2014-05-22 07:24:50 -07:00
|
|
|
* @param[in] klass the class.
|
2014-07-23 00:24:59 -07:00
|
|
|
* @return the iterator
|
2014-02-11 05:42:59 -08:00
|
|
|
*
|
|
|
|
* @ingroup Eolian
|
|
|
|
*/
|
2014-07-23 06:13:21 -07:00
|
|
|
EAPI Eina_Iterator *eolian_class_implements_get(const Eolian_Class *klass);
|
2014-02-11 05:42:59 -08:00
|
|
|
|
|
|
|
/*
|
2014-07-23 00:24:59 -07:00
|
|
|
* @brief Get an iterator to the events defined in a class.
|
2014-02-11 05:42:59 -08:00
|
|
|
*
|
2014-05-22 07:24:50 -07:00
|
|
|
* @param[in] klass the class.
|
2014-07-23 00:24:59 -07:00
|
|
|
* @return the iterator
|
2014-02-11 05:42:59 -08:00
|
|
|
*
|
|
|
|
* @ingroup Eolian
|
|
|
|
*/
|
2014-07-23 06:13:21 -07:00
|
|
|
EAPI Eina_Iterator *eolian_class_events_get(const Eolian_Class *klass);
|
2014-02-11 05:42:59 -08:00
|
|
|
|
|
|
|
/*
|
2014-08-13 04:06:48 -07:00
|
|
|
* @brief Get the name of an event.
|
2014-02-11 05:42:59 -08:00
|
|
|
*
|
2014-08-13 04:06:48 -07:00
|
|
|
* @param[in] event the event handle
|
|
|
|
* @return the name or NULL
|
|
|
|
*
|
|
|
|
* @ingroup Eolian
|
|
|
|
*/
|
|
|
|
EAPI Eina_Stringshare *eolian_event_name_get(const Eolian_Event *event);
|
|
|
|
|
|
|
|
/*
|
|
|
|
* @brief Get the type of an event.
|
|
|
|
*
|
|
|
|
* @param[in] event the event handle
|
|
|
|
* @return the type or NULL
|
|
|
|
*
|
|
|
|
* @ingroup Eolian
|
|
|
|
*/
|
2014-08-13 05:09:03 -07:00
|
|
|
EAPI const Eolian_Type *eolian_event_type_get(const Eolian_Event *event);
|
2014-08-13 04:06:48 -07:00
|
|
|
|
|
|
|
/*
|
|
|
|
* @brief Get the description of an event.
|
|
|
|
*
|
|
|
|
* @param[in] event the event handle
|
|
|
|
* @return the description or NULL
|
2014-02-11 05:42:59 -08:00
|
|
|
*
|
|
|
|
* @ingroup Eolian
|
|
|
|
*/
|
2014-08-13 04:06:48 -07:00
|
|
|
EAPI Eina_Stringshare *eolian_event_description_get(const Eolian_Event *event);
|
2014-02-11 05:42:59 -08:00
|
|
|
|
2014-08-13 03:53:33 -07:00
|
|
|
/*
|
|
|
|
* @brief Returns the scope of an event
|
|
|
|
*
|
|
|
|
* @param[in] event the event handle
|
|
|
|
* @return the event scope
|
|
|
|
*
|
|
|
|
* @ingroup Eolian
|
|
|
|
*/
|
2014-08-13 04:06:48 -07:00
|
|
|
EAPI Eolian_Object_Scope eolian_event_scope_get(const Eolian_Event *event);
|
2014-08-13 03:53:33 -07:00
|
|
|
|
2014-02-20 06:18:49 -08:00
|
|
|
/*
|
|
|
|
* @brief Indicates if the class constructor has to invoke
|
|
|
|
* a non-generated class constructor function.
|
|
|
|
*
|
2014-05-22 07:24:50 -07:00
|
|
|
* @param[in] klass the class.
|
2014-02-20 06:18:49 -08:00
|
|
|
* @return EINA_TRUE if the invocation is needed, EINA_FALSE otherwise.
|
|
|
|
*
|
|
|
|
* @ingroup Eolian
|
|
|
|
*/
|
2014-07-09 08:33:07 -07:00
|
|
|
EAPI Eina_Bool eolian_class_ctor_enable_get(const Eolian_Class *klass);
|
2014-02-18 05:16:51 -08:00
|
|
|
|
2014-02-20 06:18:49 -08:00
|
|
|
/*
|
|
|
|
* @brief Indicates if the class destructor has to invoke
|
|
|
|
* a non-generated class destructor function.
|
|
|
|
*
|
2014-05-22 07:24:50 -07:00
|
|
|
* @param[in] klass the class.
|
2014-02-20 06:18:49 -08:00
|
|
|
* @return EINA_TRUE if the invocation is needed, EINA_FALSE otherwise.
|
|
|
|
*
|
|
|
|
* @ingroup Eolian
|
|
|
|
*/
|
2014-07-09 08:33:07 -07:00
|
|
|
EAPI Eina_Bool eolian_class_dtor_enable_get(const Eolian_Class *klass);
|
2014-02-18 05:16:51 -08:00
|
|
|
|
2014-04-30 02:03:09 -07:00
|
|
|
/*
|
2014-07-23 06:13:21 -07:00
|
|
|
* @brief Get an alias type by name. Supports namespaces.
|
2014-04-30 02:03:09 -07:00
|
|
|
*
|
2014-07-21 09:12:35 -07:00
|
|
|
* @param[in] name the name of the alias
|
|
|
|
* @return the alias type or NULL
|
2014-04-30 02:03:09 -07:00
|
|
|
*
|
|
|
|
* @ingroup Eolian
|
|
|
|
*/
|
2014-07-23 06:13:21 -07:00
|
|
|
EAPI const Eolian_Type *eolian_type_alias_get_by_name(const char *name);
|
2014-06-27 06:47:40 -07:00
|
|
|
|
2014-07-15 07:33:22 -07:00
|
|
|
/*
|
2014-07-23 06:13:21 -07:00
|
|
|
* @brief Get a struct by name. Supports namespaces.
|
2014-07-08 08:42:33 -07:00
|
|
|
*
|
|
|
|
* @param[in] name the name of the struct
|
|
|
|
* @return the struct or NULL
|
|
|
|
*
|
|
|
|
* @ingroup Eolian
|
|
|
|
*/
|
2014-07-23 06:13:21 -07:00
|
|
|
EAPI const Eolian_Type *eolian_type_struct_get_by_name(const char *name);
|
2014-07-08 08:42:33 -07:00
|
|
|
|
2014-08-11 06:56:50 -07:00
|
|
|
/*
|
|
|
|
* @brief Get an enum by name. Supports namespaces.
|
|
|
|
*
|
|
|
|
* @param[in] name the name of the struct
|
|
|
|
* @return the struct or NULL
|
|
|
|
*
|
|
|
|
* @ingroup Eolian
|
|
|
|
*/
|
|
|
|
EAPI const Eolian_Type *eolian_type_enum_get_by_name(const char *name);
|
|
|
|
|
2014-07-22 05:14:44 -07:00
|
|
|
/*
|
|
|
|
* @brief Get an iterator to all aliases contained in a file.
|
|
|
|
*
|
|
|
|
* @param[in] fname the file name without full path
|
|
|
|
* @return the iterator or NULL
|
|
|
|
*
|
|
|
|
* Thanks to internal caching, this is an O(1) operation.
|
|
|
|
*
|
|
|
|
* @ingroup Eolian
|
|
|
|
*/
|
|
|
|
EAPI Eina_Iterator *eolian_type_aliases_get_by_file(const char *fname);
|
|
|
|
|
|
|
|
/*
|
|
|
|
* @brief Get an iterator to all named structs contained in a file.
|
|
|
|
*
|
|
|
|
* @param[in] fname the file name without full path
|
|
|
|
* @return the iterator or NULL
|
|
|
|
*
|
|
|
|
* Thanks to internal caching, this is an O(1) operation.
|
|
|
|
*
|
|
|
|
* @ingroup Eolian
|
|
|
|
*/
|
|
|
|
EAPI Eina_Iterator *eolian_type_structs_get_by_file(const char *fname);
|
|
|
|
|
2014-08-11 06:56:50 -07:00
|
|
|
/*
|
|
|
|
* @brief Get an iterator to all enums contained in a file.
|
|
|
|
*
|
|
|
|
* @param[in] fname the file name without full path
|
|
|
|
* @return the iterator or NULL
|
|
|
|
*
|
|
|
|
* Thanks to internal caching, this is an O(1) operation.
|
|
|
|
*
|
|
|
|
* @ingroup Eolian
|
|
|
|
*/
|
|
|
|
EAPI Eina_Iterator *eolian_type_enums_get_by_file(const char *fname);
|
|
|
|
|
2014-06-27 06:47:40 -07:00
|
|
|
/*
|
|
|
|
* @brief Get the type of a type (regular, function, pointer)
|
|
|
|
*
|
|
|
|
* @param[in] tp the type.
|
2014-07-30 03:57:11 -07:00
|
|
|
* @return an Eolian_Type_Type.
|
2014-06-27 06:47:40 -07:00
|
|
|
*
|
|
|
|
* @ingroup Eolian
|
|
|
|
*/
|
2014-07-09 13:07:15 -07:00
|
|
|
EAPI Eolian_Type_Type eolian_type_type_get(const Eolian_Type *tp);
|
2014-06-27 06:47:40 -07:00
|
|
|
|
|
|
|
/*
|
|
|
|
* @brief Get an iterator to all arguments of a function type.
|
|
|
|
*
|
|
|
|
* @param[in] tp the type.
|
|
|
|
* @return the iterator when @c tp is an EOLIAN_TYPE_FUNCTION, NULL otherwise.
|
|
|
|
*
|
|
|
|
* @ingroup Eolian
|
|
|
|
*/
|
2014-07-23 06:13:21 -07:00
|
|
|
EAPI Eina_Iterator *eolian_type_arguments_get(const Eolian_Type *tp);
|
2014-06-27 06:47:40 -07:00
|
|
|
|
|
|
|
/*
|
|
|
|
* @brief Get an iterator to all subtypes of a type.
|
|
|
|
*
|
|
|
|
* @param[in] tp the type.
|
2014-07-30 03:57:11 -07:00
|
|
|
* @return the iterator when @c tp is a regular/regular struct/class/pointer
|
|
|
|
* type.
|
2014-06-27 06:47:40 -07:00
|
|
|
*
|
|
|
|
* @ingroup Eolian
|
|
|
|
*/
|
2014-07-23 06:13:21 -07:00
|
|
|
EAPI Eina_Iterator *eolian_type_subtypes_get(const Eolian_Type *tp);
|
2014-06-27 06:47:40 -07:00
|
|
|
|
2014-07-08 08:17:44 -07:00
|
|
|
/*
|
|
|
|
* @brief Get an iterator to all field names of a struct type.
|
|
|
|
*
|
|
|
|
* @param[in] tp the type.
|
|
|
|
* @return the iterator when @c tp is EOLIAN_TYPE_STRUCT, NULL otherwise.
|
|
|
|
*
|
|
|
|
* @ingroup Eolian
|
|
|
|
*/
|
2014-07-23 06:13:21 -07:00
|
|
|
EAPI Eina_Iterator *eolian_type_struct_field_names_get(const Eolian_Type *tp);
|
2014-07-08 08:17:44 -07:00
|
|
|
|
|
|
|
/*
|
|
|
|
* @brief Get a field of a struct type.
|
|
|
|
*
|
|
|
|
* @param[in] tp the type.
|
|
|
|
* @param[in] field the field name.
|
|
|
|
* @return the field when @c tp is EOLIAN_TYPE_STRUCT, @c field is not NULL
|
|
|
|
* and the field exists, NULL otherwise.
|
|
|
|
*
|
|
|
|
* @ingroup Eolian
|
|
|
|
*/
|
2014-07-09 13:31:03 -07:00
|
|
|
EAPI const Eolian_Type *eolian_type_struct_field_get(const Eolian_Type *tp, const char *field);
|
2014-07-08 08:17:44 -07:00
|
|
|
|
2014-07-09 04:05:56 -07:00
|
|
|
/*
|
|
|
|
* @brief Get the description of a field of a struct type.
|
|
|
|
*
|
|
|
|
* @param[in] tp the type.
|
|
|
|
* @param[in] field the field name.
|
|
|
|
* @return the description when @c tp is EOLIAN_TYPE_STRUCT, @c field is not NULL
|
|
|
|
* and the field exists, NULL otherwise.
|
|
|
|
*
|
|
|
|
* @ingroup Eolian
|
|
|
|
*/
|
2014-07-10 06:04:13 -07:00
|
|
|
EAPI Eina_Stringshare *eolian_type_struct_field_description_get(const Eolian_Type *tp, const char *field);
|
2014-07-09 04:05:56 -07:00
|
|
|
|
2014-08-11 06:56:50 -07:00
|
|
|
/*
|
|
|
|
* @brief Get an iterator to all field names of an enum type.
|
|
|
|
*
|
|
|
|
* @param[in] tp the type.
|
|
|
|
* @return the iterator when @c tp is EOLIAN_TYPE_ENUM, NULL otherwise.
|
|
|
|
*
|
|
|
|
* @ingroup Eolian
|
|
|
|
*/
|
|
|
|
EAPI Eina_Iterator *eolian_type_enum_field_names_get(const Eolian_Type *tp);
|
|
|
|
|
|
|
|
/*
|
|
|
|
* @brief Get whether an enum field exists.
|
|
|
|
*
|
|
|
|
* @param[in] tp the type.
|
|
|
|
* @param[in] field the field name.
|
|
|
|
* @return EINA_TRUE when the field exists, EINA_FALSE otherwise.
|
|
|
|
*
|
|
|
|
* @ingroup Eolian
|
|
|
|
*/
|
|
|
|
EAPI Eina_Bool eolian_type_enum_field_exists(const Eolian_Type *tp, const char *field);
|
|
|
|
|
|
|
|
/*
|
|
|
|
* @brief Get a field of an enum type.
|
|
|
|
*
|
|
|
|
* @param[in] tp the type.
|
|
|
|
* @param[in] field the field name.
|
|
|
|
* @return the field when @c tp is EOLIAN_TYPE_ENUM, @c field is not NULL,
|
|
|
|
* field exists and has a value set, NULL otherwise.
|
|
|
|
*
|
|
|
|
* Keep in mind that this can return NULL for an existing field, particularly
|
|
|
|
* when the field has no value set (i.e. increments by 1 over previous value).
|
|
|
|
*
|
|
|
|
* @ingroup Eolian
|
|
|
|
*/
|
|
|
|
EAPI const Eolian_Expression *eolian_type_enum_field_get(const Eolian_Type *tp, const char *field);
|
|
|
|
|
|
|
|
/*
|
|
|
|
* @brief Get the description of a field of an enum type.
|
|
|
|
*
|
|
|
|
* @param[in] tp the type.
|
|
|
|
* @param[in] field the field name.
|
|
|
|
* @return the description when @c tp is EOLIAN_TYPE_ENUM, @c field is not NULL
|
|
|
|
* and the field exists, NULL otherwise.
|
|
|
|
*
|
|
|
|
* @ingroup Eolian
|
|
|
|
*/
|
|
|
|
EAPI Eina_Stringshare *eolian_type_enum_field_description_get(const Eolian_Type *tp, const char *field);
|
|
|
|
|
2014-08-12 09:24:24 -07:00
|
|
|
/*
|
|
|
|
* @brief Get the legacy prefix of enum field names. When not specified,
|
|
|
|
* enum name is used.
|
|
|
|
*
|
|
|
|
* @param[in] tp the type.
|
|
|
|
* @return the legacy prefix or NULL.
|
|
|
|
*
|
|
|
|
* @ingroup Eolian
|
|
|
|
*/
|
|
|
|
EAPI Eina_Stringshare *eolian_type_enum_legacy_prefix_get(const Eolian_Type *tp);
|
|
|
|
|
2014-07-09 04:48:16 -07:00
|
|
|
/*
|
2014-07-21 06:38:43 -07:00
|
|
|
* @brief Get the description of a struct/alias type.
|
2014-07-09 04:48:16 -07:00
|
|
|
*
|
|
|
|
* @param[in] tp the type.
|
2014-08-13 08:43:18 -07:00
|
|
|
* @return the description when @c tp is EOLIAN_TYPE_STRUCT or
|
|
|
|
* EOLIAN_TYPE_STRUCT_OPAQUE, NULL otherwise.
|
2014-07-09 04:48:16 -07:00
|
|
|
*
|
|
|
|
* @ingroup Eolian
|
|
|
|
*/
|
2014-07-21 06:38:43 -07:00
|
|
|
EAPI Eina_Stringshare *eolian_type_description_get(const Eolian_Type *tp);
|
2014-07-09 04:48:16 -07:00
|
|
|
|
2014-07-21 04:03:51 -07:00
|
|
|
/*
|
2014-07-21 06:38:43 -07:00
|
|
|
* @brief Get the filename of a struct/alias type.
|
2014-07-21 04:03:51 -07:00
|
|
|
*
|
|
|
|
* @param[in] tp the type.
|
2014-08-13 08:43:18 -07:00
|
|
|
* @return the filename.
|
2014-07-21 04:03:51 -07:00
|
|
|
*
|
|
|
|
* @ingroup Eolian
|
|
|
|
*/
|
2014-07-21 06:38:43 -07:00
|
|
|
EAPI Eina_Stringshare *eolian_type_file_get(const Eolian_Type *tp);
|
2014-07-21 04:03:51 -07:00
|
|
|
|
2014-06-27 06:47:40 -07:00
|
|
|
/*
|
|
|
|
* @brief Get the return type of a function type.
|
|
|
|
*
|
|
|
|
* @param[in] tp the type.
|
|
|
|
* @return the return type when @c tp is an EOLIAN_TYPE_FUNCTION, NULL otherwise.
|
|
|
|
*
|
|
|
|
* @ingroup Eolian
|
|
|
|
*/
|
2014-07-09 13:31:03 -07:00
|
|
|
EAPI const Eolian_Type *eolian_type_return_type_get(const Eolian_Type *tp);
|
2014-06-27 06:47:40 -07:00
|
|
|
|
|
|
|
/*
|
2014-07-21 08:57:45 -07:00
|
|
|
* @brief Get the base type of a pointer or alias type.
|
2014-06-27 06:47:40 -07:00
|
|
|
*
|
|
|
|
* @param[in] tp the type.
|
2014-07-21 08:57:45 -07:00
|
|
|
* @return the base type when @c tp is a pointer or alias, NULL otherwise.
|
2014-06-27 06:47:40 -07:00
|
|
|
*
|
|
|
|
* @ingroup Eolian
|
|
|
|
*/
|
2014-07-09 13:31:03 -07:00
|
|
|
EAPI const Eolian_Type *eolian_type_base_type_get(const Eolian_Type *tp);
|
2014-06-27 06:47:40 -07:00
|
|
|
|
2014-07-30 03:57:11 -07:00
|
|
|
/*
|
|
|
|
* @brief Get the class associated with an EOLIAN_TYPE_CLASS type.
|
|
|
|
*
|
|
|
|
* @param[in] tp the type.
|
|
|
|
* @return the class or NULL.
|
|
|
|
*
|
|
|
|
* @ingroup Eolian
|
|
|
|
*/
|
|
|
|
EAPI const Eolian_Class *eolian_type_class_get(const Eolian_Type *tp);
|
|
|
|
|
2014-06-27 06:47:40 -07:00
|
|
|
/*
|
|
|
|
* @brief Get whether the given type is @own.
|
|
|
|
*
|
|
|
|
* @param[in] tp the type.
|
|
|
|
* @return EINA_TRUE when @c tp is a non-function type and not NULL,
|
|
|
|
* EINA_FALSE otherwise.
|
|
|
|
*
|
|
|
|
* @ingroup Eolian
|
|
|
|
*/
|
2014-07-09 13:07:15 -07:00
|
|
|
EAPI Eina_Bool eolian_type_is_own(const Eolian_Type *tp);
|
2014-06-27 06:47:40 -07:00
|
|
|
|
|
|
|
/*
|
|
|
|
* @brief Get whether the given type is const.
|
|
|
|
*
|
|
|
|
* @param[in] tp the type.
|
|
|
|
* @return EINA_TRUE when @c tp is a non-function type and not NULL,
|
|
|
|
* EINA_FALSE otherwise.
|
|
|
|
*
|
|
|
|
* @ingroup Eolian
|
|
|
|
*/
|
2014-07-09 13:07:15 -07:00
|
|
|
EAPI Eina_Bool eolian_type_is_const(const Eolian_Type *tp);
|
2014-06-27 06:47:40 -07:00
|
|
|
|
2014-07-15 07:33:22 -07:00
|
|
|
/*
|
2014-07-21 06:14:22 -07:00
|
|
|
* @brief Check if a struct or alias type is extern.
|
2014-07-15 07:33:22 -07:00
|
|
|
*
|
|
|
|
* @param[in] tp the type.
|
|
|
|
* @return EINA_TRUE if it's extern, EINA_FALSE otherwise.
|
|
|
|
*
|
|
|
|
* @ingroup Eolian
|
|
|
|
*/
|
2014-07-21 06:14:22 -07:00
|
|
|
EAPI Eina_Bool eolian_type_is_extern(const Eolian_Type *tp);
|
2014-07-15 07:33:22 -07:00
|
|
|
|
2014-06-27 06:47:40 -07:00
|
|
|
/*
|
|
|
|
* @brief Get the full C type name of the given type with a name.
|
|
|
|
*
|
|
|
|
* @param[in] tp the type.
|
|
|
|
* @param[in] name the name.
|
|
|
|
* @return The C type name assuming @c tp is not NULL.
|
|
|
|
*
|
|
|
|
* Providing the name is useful for function types, as in C a function
|
|
|
|
* pointer type alone is not valid syntax. For non-function types, the
|
|
|
|
* name is simply appended to the type (with a space). C type names do
|
2014-07-22 04:11:06 -07:00
|
|
|
* not include subtypes as C doesn't support them. Name is ignored for
|
|
|
|
* alias types. Alias types are turned into C typedefs.
|
2014-06-27 06:47:40 -07:00
|
|
|
*
|
|
|
|
* Keep in mind that if @c name is NULL, the name won't be included.
|
|
|
|
*
|
|
|
|
* @see eolian_type_c_type_get
|
|
|
|
*
|
|
|
|
* @ingroup Eolian
|
|
|
|
*/
|
2014-07-09 13:07:15 -07:00
|
|
|
EAPI Eina_Stringshare *eolian_type_c_type_named_get(const Eolian_Type *tp, const char *name);
|
2014-06-27 06:47:40 -07:00
|
|
|
|
|
|
|
/*
|
|
|
|
* @brief Get the full C type name of the given type without a name.
|
|
|
|
*
|
|
|
|
* @param[in] tp the type.
|
|
|
|
* @return The C type name assuming @c tp is not NULL.
|
|
|
|
*
|
|
|
|
* This behaves exactly like eolian_type_c_type_named_get when name is NULL.
|
|
|
|
* Keep in mind that this is not useful for function types as a function
|
|
|
|
* pointer type in C cannot be used without a name.
|
|
|
|
*
|
|
|
|
* @see eolian_type_c_type_named_get
|
|
|
|
*
|
|
|
|
* @ingroup Eolian
|
|
|
|
*/
|
2014-07-09 13:07:15 -07:00
|
|
|
EAPI Eina_Stringshare *eolian_type_c_type_get(const Eolian_Type *tp);
|
2014-06-27 06:47:40 -07:00
|
|
|
|
|
|
|
/*
|
2014-07-21 06:27:23 -07:00
|
|
|
* @brief Get the name of the given type. You have to manually delete
|
|
|
|
* the stringshare. For EOLIAN_TYPE_REGULAR and EOLIAN_TYPE_REGULAR_STRUCT,
|
2014-08-13 08:43:18 -07:00
|
|
|
* this is for example "int". For EOLIAN_TYPE_STRUCT, EOLIAN_TYPE_STRUCT_OPAQUE
|
|
|
|
* and EOLIAN_TYPE_ALIAS, this is the name of the alias or of the struct. For
|
|
|
|
* EOLIAN_TYPE_CLASS, this can be "Button". Keep in mind that the name doesn't
|
|
|
|
* include namespaces for structs and aliases.
|
2014-06-27 06:47:40 -07:00
|
|
|
*
|
|
|
|
* @param[in] tp the type.
|
2014-07-21 06:27:23 -07:00
|
|
|
* @return the name.
|
2014-06-27 06:47:40 -07:00
|
|
|
*
|
|
|
|
* @ingroup Eolian
|
|
|
|
*/
|
2014-07-09 13:07:15 -07:00
|
|
|
EAPI Eina_Stringshare *eolian_type_name_get(const Eolian_Type *tp);
|
2014-04-30 02:03:09 -07:00
|
|
|
|
2014-07-21 06:27:23 -07:00
|
|
|
/*
|
|
|
|
* @brief Get the full (namespaced) name of a function. Only works on named
|
|
|
|
* types (not pointers, not functions, not void).
|
|
|
|
*
|
|
|
|
* @param[in] tp the type.
|
|
|
|
* @return the name.
|
|
|
|
*
|
|
|
|
* @ingroup Eolian
|
|
|
|
*/
|
|
|
|
EAPI Eina_Stringshare *eolian_type_full_name_get(const Eolian_Type *tp);
|
|
|
|
|
|
|
|
/*
|
|
|
|
* @brief Get an iterator to the list of namespaces of the given type. Only
|
|
|
|
* works on named types (not pointers, not functions, not void).
|
|
|
|
*
|
|
|
|
* @param[in] tp the type.
|
|
|
|
* @return the iterator.
|
|
|
|
*
|
|
|
|
* @ingroup Eolian
|
|
|
|
*/
|
2014-07-23 06:13:21 -07:00
|
|
|
EAPI Eina_Iterator *eolian_type_namespaces_get(const Eolian_Type *tp);
|
2014-07-21 06:27:23 -07:00
|
|
|
|
2014-08-07 07:15:07 -07:00
|
|
|
/*
|
|
|
|
* @brief Evaluate an Eolian expression.
|
|
|
|
*
|
|
|
|
* @param[in] expr the expression.
|
|
|
|
* @param[in] mask the mask of allowed values (can combine with bitwise OR).
|
2014-08-18 05:12:08 -07:00
|
|
|
* @return the value, its type is set to EOLIAN_EXPR_UNKNOWN on error.
|
2014-08-07 07:15:07 -07:00
|
|
|
*
|
|
|
|
* Represents value types from Eolian_Expression_Type. Booleans
|
|
|
|
* are represented as unsigned char, strings as a stringshare.
|
|
|
|
*
|
|
|
|
* @ingroup Eolian
|
|
|
|
*/
|
2014-08-18 05:12:08 -07:00
|
|
|
EAPI Eolian_Value eolian_expression_eval(const Eolian_Expression *expr, Eolian_Expression_Mask m);
|
2014-08-07 07:15:07 -07:00
|
|
|
|
|
|
|
/*
|
|
|
|
* @brief Evaluate an Eolian expression given a type instead of a mask.
|
|
|
|
*
|
|
|
|
* @param[in] expr the expression.
|
|
|
|
* @param[in] type the type the expression is assigned to.
|
2014-08-18 05:12:08 -07:00
|
|
|
* @return the value, its type is set to EOLIAN_EXPR_UNKNOWN on error.
|
2014-08-07 07:15:07 -07:00
|
|
|
*
|
|
|
|
* The mask is automatically decided from the given type, allowing only values
|
|
|
|
* that can be assigned to that type.
|
|
|
|
*
|
|
|
|
* @ingroup Eolian
|
|
|
|
*/
|
2014-08-18 05:12:08 -07:00
|
|
|
EAPI Eolian_Value eolian_expression_eval_type(const Eolian_Expression *expr, const Eolian_Type *type);
|
2014-08-07 07:15:07 -07:00
|
|
|
|
|
|
|
/*
|
2014-08-07 08:32:08 -07:00
|
|
|
* @brief Convert the result of expression evaluation to a literal as in how
|
|
|
|
* it would appear in C (e.g. strings are quoted and escaped).
|
2014-08-07 07:15:07 -07:00
|
|
|
*
|
|
|
|
* @param[in] v the value.
|
|
|
|
* @param[in] etp the eolian type of the value.
|
|
|
|
* @return a stringshare containing the literal (quoted and escaped as needed)
|
|
|
|
* or NULL.
|
|
|
|
*
|
2014-08-07 08:32:08 -07:00
|
|
|
* For e.g. strings this only uses a subset of regular C escape sequences
|
|
|
|
* so that interoperability is wider than just C (no octal escapes). For
|
|
|
|
* languages that differ too much, you can write an equivalent function
|
2014-08-18 05:12:08 -07:00
|
|
|
* yourself.
|
2014-08-07 08:32:08 -07:00
|
|
|
*
|
2014-08-07 07:15:07 -07:00
|
|
|
* @ingroup Eolian
|
|
|
|
*/
|
2014-08-18 05:12:08 -07:00
|
|
|
EAPI Eina_Stringshare *eolian_expression_value_to_literal(const Eolian_Value *v);
|
2014-08-07 07:15:07 -07:00
|
|
|
|
2014-08-13 03:25:04 -07:00
|
|
|
/*
|
|
|
|
* @brief Serialize an expression.
|
|
|
|
*
|
|
|
|
* @param[in] expr the expression.
|
|
|
|
* @return the serialized expression or NULL.
|
|
|
|
*
|
|
|
|
* This serializes the expression into the original form as written in the .eo
|
|
|
|
* file (but with parens on binary operators explicitly specifying precedence).
|
|
|
|
* Keep in mind that it cannot be used alone pasted into C code as it doesn't
|
|
|
|
* resolve namespaces and enum field names.
|
|
|
|
*
|
|
|
|
* @ingroup Eolian
|
|
|
|
*/
|
|
|
|
EAPI Eina_Stringshare *eolian_expression_serialize(const Eolian_Expression *expr);
|
|
|
|
|
2014-08-08 07:26:48 -07:00
|
|
|
/*
|
|
|
|
* @brief Get a global variable by name. Supports namespaces.
|
|
|
|
*
|
|
|
|
* @param[in] name the name of the variable
|
|
|
|
* @return the variable handle or NULL
|
|
|
|
*
|
|
|
|
* @ingroup Eolian
|
|
|
|
*/
|
|
|
|
EAPI const Eolian_Variable *eolian_variable_global_get_by_name(const char *name);
|
|
|
|
|
|
|
|
/*
|
|
|
|
* @brief Get a constant variable by name. Supports namespaces.
|
|
|
|
*
|
|
|
|
* @param[in] name the name of the variable
|
|
|
|
* @return the variable handle or NULL
|
|
|
|
*
|
|
|
|
* @ingroup Eolian
|
|
|
|
*/
|
|
|
|
EAPI const Eolian_Variable *eolian_variable_constant_get_by_name(const char *name);
|
|
|
|
|
|
|
|
/*
|
|
|
|
* @brief Get an iterator to all global variables contained in a file.
|
|
|
|
*
|
|
|
|
* @param[in] fname the file name without full path
|
|
|
|
* @return the iterator or NULL
|
|
|
|
*
|
|
|
|
* Thanks to internal caching, this is an O(1) operation.
|
|
|
|
*
|
|
|
|
* @ingroup Eolian
|
|
|
|
*/
|
|
|
|
EAPI Eina_Iterator *eolian_variable_globals_get_by_file(const char *fname);
|
|
|
|
|
|
|
|
/*
|
|
|
|
* @brief Get an iterator to all constant variables contained in a file.
|
|
|
|
*
|
|
|
|
* @param[in] fname the file name without full path
|
|
|
|
* @return the iterator or NULL
|
|
|
|
*
|
|
|
|
* Thanks to internal caching, this is an O(1) operation.
|
|
|
|
*
|
|
|
|
* @ingroup Eolian
|
|
|
|
*/
|
|
|
|
EAPI Eina_Iterator *eolian_variable_constants_get_by_file(const char *fname);
|
|
|
|
|
|
|
|
/*
|
|
|
|
* @brief Get the type of a variable (global, constant)
|
|
|
|
*
|
|
|
|
* @param[in] var the variable.
|
|
|
|
* @return an Eolian_Type_Type.
|
|
|
|
*
|
|
|
|
* @ingroup Eolian
|
|
|
|
*/
|
|
|
|
EAPI Eolian_Variable_Type eolian_variable_type_get(const Eolian_Variable *var);
|
|
|
|
|
|
|
|
/*
|
|
|
|
* @brief Get the description of a variable.
|
|
|
|
*
|
|
|
|
* @param[in] var the variable.
|
|
|
|
* @return the description or NULL.
|
|
|
|
*
|
|
|
|
* @ingroup Eolian
|
|
|
|
*/
|
|
|
|
EAPI Eina_Stringshare *eolian_variable_description_get(const Eolian_Variable *var);
|
|
|
|
|
|
|
|
/*
|
|
|
|
* @brief Get the filename of a variable.
|
|
|
|
*
|
|
|
|
* @param[in] var the variable.
|
|
|
|
* @return the filename or NULL.
|
|
|
|
*
|
|
|
|
* @ingroup Eolian
|
|
|
|
*/
|
|
|
|
EAPI Eina_Stringshare *eolian_variable_file_get(const Eolian_Variable *var);
|
|
|
|
|
|
|
|
/*
|
|
|
|
* @brief Get the base type of a variable.
|
|
|
|
*
|
|
|
|
* @param[in] var the variable.
|
|
|
|
* @return the base type or NULL.
|
|
|
|
*
|
|
|
|
* @ingroup Eolian
|
|
|
|
*/
|
|
|
|
EAPI const Eolian_Type *eolian_variable_base_type_get(const Eolian_Variable *var);
|
2014-08-08 08:28:31 -07:00
|
|
|
|
|
|
|
/*
|
|
|
|
* @brief Get the value of a variable.
|
|
|
|
*
|
|
|
|
* @param[in] var the variable.
|
|
|
|
* @return the value or NULL.
|
|
|
|
*
|
|
|
|
* @ingroup Eolian
|
|
|
|
*/
|
|
|
|
EAPI const Eolian_Expression *eolian_variable_value_get(const Eolian_Variable *var);
|
2014-08-08 07:26:48 -07:00
|
|
|
|
|
|
|
/*
|
|
|
|
* @brief Get the name of the given variable (without namespaces).
|
|
|
|
*
|
|
|
|
* @param[in] var the variable.
|
|
|
|
* @return the name.
|
|
|
|
*
|
|
|
|
* @ingroup Eolian
|
|
|
|
*/
|
|
|
|
EAPI Eina_Stringshare *eolian_variable_name_get(const Eolian_Variable *var);
|
|
|
|
|
|
|
|
/*
|
|
|
|
* @brief Get the name of the given variable (with namespaces).
|
|
|
|
*
|
|
|
|
* @param[in] var the variable.
|
|
|
|
* @return the name.
|
|
|
|
*
|
|
|
|
* @ingroup Eolian
|
|
|
|
*/
|
|
|
|
EAPI Eina_Stringshare *eolian_variable_full_name_get(const Eolian_Variable *var);
|
|
|
|
|
|
|
|
/*
|
|
|
|
* @brief Get an iterator to the list of namespaces of the given variable.
|
|
|
|
*
|
|
|
|
* @param[in] var the variable.
|
|
|
|
* @return the iterator.
|
|
|
|
*
|
|
|
|
* @ingroup Eolian
|
|
|
|
*/
|
|
|
|
EAPI Eina_Iterator *eolian_variable_namespaces_get(const Eolian_Variable *var);
|
|
|
|
|
2014-08-08 07:57:39 -07:00
|
|
|
/*
|
|
|
|
* @brief Check if a variable is extern.
|
|
|
|
*
|
|
|
|
* @param[in] var the variable.
|
|
|
|
* @return EINA_TRUE if it's extern, EINA_FALSE otherwise.
|
|
|
|
*
|
|
|
|
* @ingroup Eolian
|
|
|
|
*/
|
|
|
|
EAPI Eina_Bool eolian_variable_is_extern(const Eolian_Variable *var);
|
|
|
|
|
2014-02-16 01:41:38 -08:00
|
|
|
#endif
|
|
|
|
|
2014-02-11 05:42:59 -08:00
|
|
|
#ifdef __cplusplus
|
|
|
|
} // extern "C" {
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#endif
|