Commit Graph

32 Commits

Author SHA1 Message Date
Daniel Zaoui d5256d442d Eolian/Generator: Don't generate sub ids structure if not needed.
If no methods and properties are declared for a class, no base id and
sub_ids structure are generated.

@fix
2014-03-19 07:52:04 +02:00
Daniel Zaoui 15f2bda474 Eolian/Generator: fix generation of events. 2014-03-19 07:04:28 +02:00
Daniel Zaoui 5d1b948508 Eolian/Generator: Retrieve the Eo prefix from the database instead of
guessing it.
2014-03-16 16:00:29 +02:00
Yossi Kantor 6862fa801b Eolian/Generator: Improved event generation
Line breaks in source files and extern definitions
of events in header files.
2014-03-16 09:23:49 +02:00
Daniel Zaoui dcf94e9dd8 Eolian/Generator: fix generation of headers for const params.
When a parameter of a property is const for get but not for set, the
.eo file indicates it by setting a flag 'const' for this parameter.
The generation was checking this flag for C files generation but not for
H files.
2014-03-13 09:14:14 +02:00
Daniel Zaoui fd67c1692c Eolian/Generator: fix generation for return values.
- Remove space between type and variable if a star is present.
- Initialize return value to NULL before eo_do. It is needed in case the
eo_do invocation fails (NULL object...).
- Add const to the internal return value if needed.
2014-03-11 15:43:46 +02:00
Daniel Zaoui d3f343bdcc Eolian/Generator: fix type when no data type exists.
When data is set as "null", the generator was writing for this data
variable "void * *_pd" instead of "void *_pd".
2014-03-11 15:25:24 +02:00
Daniel Zaoui 0d6fadcab9 Eolian/Generator: fix for virtual pure implementations 2014-03-11 15:20:54 +02:00
Yossi Kantor b070981f8f Eolian: Support of unsigned short as int in va_arg 2014-03-11 07:37:47 +02:00
Daniel Zaoui d96c429179 Eolian/Generator: support NULL pointers for return values.
When an Eo operation returns a value, this one is stored in the last
parameter as an out parameter.
In case the caller doesn't set a pointer there, the storing will be done
in a NULL pointer and will bring to a segfault.

The generator has been modified to handle this case. Now, if the ret
pointer is NULL, the value will not be returned.
2014-03-10 15:07:05 +02:00
Daniel Zaoui 4e33fd16e2 Eolian: add support of eo_prefix and data.
You can add in the .eo file the eo_prefix:... and data:... in case
you want to override respectively the Eo prefix and the data type.
If "data: null" is used, no data type will be added.
2014-03-10 15:07:05 +02:00
Daniel Zaoui 4be9526cc2 Eolian/Generator: more fixes related to stars to add to params. 2014-03-09 13:19:30 +02:00
Daniel Zaoui a78f779486 Eolian: Fixes into generated files.
- Added Doxygen description to parameters and return
- Added default description for parameters
- Return type needs to be after all the other parameters
- Better handling of stars for pointers: try to figure if a space is
needed between the type and the variable (e.g int *a / int a)
2014-03-07 17:42:41 +02:00
Daniel Zaoui bb8af681f9 Eolian: Coverity fixes 2014-03-07 17:42:41 +02:00
Daniel Zaoui 7aebf671bf Eolian/Generator: Switch set/get functions generation.
We want to generate first set properties and then get properties to be
in accordance with the current op ids order.
2014-03-06 15:12:51 +02:00
Daniel Zaoui 232a3cf5fc Eolian/Generator: Fix comments generation in headers.
Trailing whitespaces were added in description empty lines.
2014-03-06 15:12:51 +02:00
Daniel Zaoui fe682d9760 Eolian: Valgrind fixes 2014-03-03 18:14:14 +02:00
Yossi Kantor 1287177ac2 Eolian: New features/bugs fixes
1) Include files now have include guards
  2) --gh option generates legacy header with --legacy flag and eo header
  without --legacy flag
  3) EOLIAN keyword is introduced to mark functions used by generated
  file.
  4) * for comments when comment text is empty
2014-03-03 14:09:57 +02:00
Yossi Kantor 67dd5ef497 Eolian: New generation feature tested and bugs fixed
1) Underscore for static global names
  2) Escape special characters for in-code descriptions
  3) Proper spaces for generated lines
2014-03-03 14:09:57 +02:00
Daniel Zaoui 210051ebb3 Eolian/Generator: fix data type for implement function 2014-03-03 14:09:57 +02:00
Daniel Zaoui 21533a0079 Eolian/Generator: errors handling improvement.
Errors occuring during generation are now propagated to the main (i.e
exit code).
Logs have been ported to EINA_LOG instead of printf.
2014-03-03 14:09:56 +02:00
Daniel Zaoui baaf92c93a Eolian/Generator: implementation prototype change
Since we know the type of the private data given as parameter of the
implemented function, we can set it instead of void *.
2014-03-03 14:09:56 +02:00
Yossi Kantor 521701ff70 Eolian: naming convention for implemented functions
The format is now _<current_class>_<inherited_class>_function_name.
2014-03-03 14:09:56 +02:00
Daniel Zaoui 02f4c112ca Eolian/Generator: add private data to the prototypes of implementations 2014-03-03 14:09:56 +02:00
Yossi Kantor c7beca12ec Eolian: Class type and class constructor/destructor generation added 2014-03-03 14:09:56 +02:00
Daniel Zaoui 920c035c57 Eolian: Support of virtual pure functions.
Virtual pure can be defined in Eolian format by adding in the section
implements virtual::class_name::func_name[::func_type].
2014-03-03 14:09:55 +02:00
Daniel Zaoui 5ae7cc962f Eolian: Format changes
- Support keys/values for properties instead of params
- Direction for parameters syntax changed from in to @in...
- obj:const changed to const in .eo
2014-03-03 14:09:55 +02:00
Yossi Kantor 17abdbdd43 Eolian: Code review fixes
1) API defined under EFL_BETA_API_SUPPORT
2) Init counters for init and shutdown
3) void for no-parameters functions
2014-03-03 14:09:54 +02:00
Daniel Zaoui 7a114b18af Eolian/Generator: oups, didn't mean to push that. 2014-03-03 14:09:54 +02:00
Daniel Zaoui 8de58b9757 Eolian/Lexer: rename signals to events. 2014-03-03 14:09:54 +02:00
Daniel Zaoui a934780714 Eolian-generator: fix crash during generation
It happens when no description is supplied for an event.
2014-03-03 14:09:54 +02:00
Daniel Zaoui 5dea8ee0a8 Eolian: first import.
Imported by Tom, from the eolian repo which was written by:
Daniel Zaoui <daniel.zaoui@samsung.com>
Yakov Goldberg <yakov.g@samsung.com>
Yossi Kantor <yossi.kantor@samsung.com>
Savio Sena <savio@expertisesolutions.com.br>
Jérémy Zurcher <jeremy@asynk.ch>

Signed-off-by: Tom Hacohen <tom@stosb.com>
2014-03-03 14:09:53 +02:00