summaryrefslogtreecommitdiff
path: root/src/scripts
diff options
context:
space:
mode:
authorDave Andreoli <dave@gurumeditation.it>2018-03-17 10:49:42 +0100
committerDave Andreoli <dave@gurumeditation.it>2018-03-17 10:49:42 +0100
commit35316db2f0714eb4cc599f171e95023f01d6df5f (patch)
treebcc477ce1a609f7f0d203c65360fc4a0797a0103 /src/scripts
parentef3e487b0c481e6c929cd8ddfb6568c96090887b (diff)
Pyolian: let ctypes automatically convert types
Not a big improvement and not so much automatically... but for sure a bit less to type :)
Diffstat (limited to 'src/scripts')
-rw-r--r--src/scripts/pyolian/eolian.py313
1 files changed, 159 insertions, 154 deletions
diff --git a/src/scripts/pyolian/eolian.py b/src/scripts/pyolian/eolian.py
index ec39443c9f..8a395c9a09 100644
--- a/src/scripts/pyolian/eolian.py
+++ b/src/scripts/pyolian/eolian.py
@@ -308,6 +308,11 @@ class EolianBaseObject(object):
308 def __hash__(self): 308 def __hash__(self):
309 return self._obj.value 309 return self._obj.value
310 310
311 @property
312 def _as_parameter_(self):
313 """ Used by ctypes to convert instances when calling C functions """
314 return self._obj
315
311 316
312### Main Eolian Unit ######################################################## 317### Main Eolian Unit ########################################################
313 318
@@ -317,71 +322,71 @@ class Eolian_Unit(EolianBaseObject):
317 322
318 @property 323 @property
319 def children(self): 324 def children(self):
320 return Iterator(Eolian_Unit, lib.eolian_unit_children_get(self._obj)) 325 return Iterator(Eolian_Unit, lib.eolian_unit_children_get(self))
321 326
322 @cached_property 327 @cached_property
323 def file(self): 328 def file(self):
324 return _str_to_py(lib.eolian_unit_file_get(self._obj)) 329 return _str_to_py(lib.eolian_unit_file_get(self))
325 330
326 @cached_property 331 @cached_property
327 def state(self): 332 def state(self):
328 c_state = lib.eolian_unit_state_get(self._obj) 333 c_state = lib.eolian_unit_state_get(self)
329 return Eolian_State(c_state) if c_state else None 334 return Eolian_State(c_state) if c_state else None
330 335
331 @property 336 @property
332 def objects(self): 337 def objects(self):
333 return Iterator(Object, lib.eolian_unit_objects_get(self._obj)) 338 return Iterator(Object, lib.eolian_unit_objects_get(self))
334 339
335 def object_by_name_get(self, name): 340 def object_by_name_get(self, name):
336 c_obj = lib.eolian_unit_object_by_name_get(self._obj, _str_to_bytes(name)) 341 c_obj = lib.eolian_unit_object_by_name_get(self, _str_to_bytes(name))
337 return Object(c_obj) if c_obj else None 342 return Object(c_obj) if c_obj else None
338 343
339 @property 344 @property
340 def classes(self): 345 def classes(self):
341 return Iterator(Class, lib.eolian_unit_classes_get(self._obj)) 346 return Iterator(Class, lib.eolian_unit_classes_get(self))
342 347
343 def class_by_name_get(self, class_name): 348 def class_by_name_get(self, class_name):
344 c_cls = lib.eolian_unit_class_by_name_get(self._obj, _str_to_bytes(class_name)) 349 c_cls = lib.eolian_unit_class_by_name_get(self, _str_to_bytes(class_name))
345 return Class(c_cls) if c_cls else None 350 return Class(c_cls) if c_cls else None
346 351
347 @property 352 @property
348 def constants(self): 353 def constants(self):
349 return Iterator(Variable, lib.eolian_unit_constants_get(self._obj)) 354 return Iterator(Variable, lib.eolian_unit_constants_get(self))
350 355
351 def constant_by_name_get(self, name): 356 def constant_by_name_get(self, name):
352 c_var = lib.eolian_unit_constant_by_name_get(self._obj, _str_to_bytes(name)) 357 c_var = lib.eolian_unit_constant_by_name_get(self, _str_to_bytes(name))
353 return Variable(c_var) if c_var else None 358 return Variable(c_var) if c_var else None
354 359
355 @property 360 @property
356 def globals(self): 361 def globals(self):
357 return Iterator(Variable, lib.eolian_unit_globals_get(self._obj)) 362 return Iterator(Variable, lib.eolian_unit_globals_get(self))
358 363
359 def global_by_name_get(self, name): 364 def global_by_name_get(self, name):
360 c_var = lib.eolian_unit_global_by_name_get(self._obj, _str_to_bytes(name)) 365 c_var = lib.eolian_unit_global_by_name_get(self, _str_to_bytes(name))
361 return Variable(c_var) if c_var else None 366 return Variable(c_var) if c_var else None
362 367
363 @property 368 @property
364 def enums(self): 369 def enums(self):
365 return Iterator(Typedecl, lib.eolian_unit_enums_get(self._obj)) 370 return Iterator(Typedecl, lib.eolian_unit_enums_get(self))
366 371
367 def enum_by_name_get(self, name): 372 def enum_by_name_get(self, name):
368 c_tdecl = lib.eolian_unit_enum_by_name_get(self._obj, _str_to_bytes(name)) 373 c_tdecl = lib.eolian_unit_enum_by_name_get(self, _str_to_bytes(name))
369 return Typedecl(c_tdecl) if c_tdecl else None 374 return Typedecl(c_tdecl) if c_tdecl else None
370 375
371 @property 376 @property
372 def structs(self): 377 def structs(self):
373 return Iterator(Typedecl, lib.eolian_unit_structs_get(self._obj)) 378 return Iterator(Typedecl, lib.eolian_unit_structs_get(self))
374 379
375 def struct_by_name_get(self, name): 380 def struct_by_name_get(self, name):
376 c_tdecl = lib.eolian_unit_struct_by_name_get(self._obj, _str_to_bytes(name)) 381 c_tdecl = lib.eolian_unit_struct_by_name_get(self, _str_to_bytes(name))
377 return Typedecl(c_tdecl) if c_tdecl else None 382 return Typedecl(c_tdecl) if c_tdecl else None
378 383
379 @property 384 @property
380 def aliases(self): 385 def aliases(self):
381 return Iterator(Typedecl, lib.eolian_unit_aliases_get(self._obj)) 386 return Iterator(Typedecl, lib.eolian_unit_aliases_get(self))
382 387
383 def alias_by_name_get(self, name): 388 def alias_by_name_get(self, name):
384 c_tdecl = lib.eolian_unit_alias_by_name_get(self._obj, _str_to_bytes(name)) 389 c_tdecl = lib.eolian_unit_alias_by_name_get(self, _str_to_bytes(name))
385 return Typedecl(c_tdecl) if c_tdecl else None 390 return Typedecl(c_tdecl) if c_tdecl else None
386 391
387 392
@@ -411,78 +416,78 @@ class Eolian_State(Eolian_Unit):
411 416
412 def __del__(self): 417 def __del__(self):
413 if not _already_halted: # do not free after eolian_shutdown 418 if not _already_halted: # do not free after eolian_shutdown
414 lib.eolian_state_free(self._obj) 419 lib.eolian_state_free(self)
415 420
416 def __repr__(self): 421 def __repr__(self):
417 return "<eolian.Eolian_State, %d units loaded>" % len(list(self.units)) 422 return "<eolian.Eolian_State, %d units loaded>" % len(list(self.units))
418 423
419 def file_parse(self, filepath): 424 def file_parse(self, filepath):
420 c_unit = lib.eolian_state_file_parse(self._obj, _str_to_bytes(filepath)) 425 c_unit = lib.eolian_state_file_parse(self, _str_to_bytes(filepath))
421 return Eolian_Unit(c_unit) if c_unit else None 426 return Eolian_Unit(c_unit) if c_unit else None
422 427
423 @property 428 @property
424 def eo_file_paths(self): 429 def eo_file_paths(self):
425 return Iterator(_str_to_py, lib.eolian_state_eo_file_paths_get(self._obj)) 430 return Iterator(_str_to_py, lib.eolian_state_eo_file_paths_get(self))
426 431
427 @property 432 @property
428 def eot_file_paths(self): 433 def eot_file_paths(self):
429 return Iterator(_str_to_py, lib.eolian_state_eot_file_paths_get(self._obj)) 434 return Iterator(_str_to_py, lib.eolian_state_eot_file_paths_get(self))
430 435
431 @property 436 @property
432 def eo_files(self): 437 def eo_files(self):
433 return Iterator(_str_to_py, lib.eolian_state_eo_files_get(self._obj)) 438 return Iterator(_str_to_py, lib.eolian_state_eo_files_get(self))
434 439
435 @property 440 @property
436 def eot_files(self): 441 def eot_files(self):
437 return Iterator(_str_to_py, lib.eolian_state_eot_files_get(self._obj)) 442 return Iterator(_str_to_py, lib.eolian_state_eot_files_get(self))
438 443
439 def directory_add(self, dir_path): 444 def directory_add(self, dir_path):
440 return bool(lib.eolian_state_directory_add(self._obj, _str_to_bytes(dir_path))) 445 return bool(lib.eolian_state_directory_add(self, _str_to_bytes(dir_path)))
441 446
442 def system_directory_add(self): 447 def system_directory_add(self):
443 return bool(lib.eolian_state_system_directory_add(self._obj)) 448 return bool(lib.eolian_state_system_directory_add(self))
444 449
445 def all_eo_files_parse(self): 450 def all_eo_files_parse(self):
446 return bool(lib.eolian_state_all_eo_files_parse(self._obj)) 451 return bool(lib.eolian_state_all_eo_files_parse(self))
447 452
448 def all_eot_files_parse(self): 453 def all_eot_files_parse(self):
449 return bool(lib.eolian_state_all_eot_files_parse(self._obj)) 454 return bool(lib.eolian_state_all_eot_files_parse(self))
450 455
451 def unit_by_file_get(self, file_name): 456 def unit_by_file_get(self, file_name):
452 c_unit = lib.eolian_state_unit_by_file_get(self._obj, _str_to_bytes(file_name)) 457 c_unit = lib.eolian_state_unit_by_file_get(self, _str_to_bytes(file_name))
453 return Eolian_Unit(c_unit) if c_unit else None 458 return Eolian_Unit(c_unit) if c_unit else None
454 459
455 @property 460 @property
456 def units(self): 461 def units(self):
457 return Iterator(Eolian_Unit, lib.eolian_state_units_get(self._obj)) 462 return Iterator(Eolian_Unit, lib.eolian_state_units_get(self))
458 463
459 def objects_by_file_get(self, file_name): 464 def objects_by_file_get(self, file_name):
460 return Iterator(Object, 465 return Iterator(Object,
461 lib.eolian_state_objects_by_file_get(self._obj, _str_to_bytes(file_name))) 466 lib.eolian_state_objects_by_file_get(self, _str_to_bytes(file_name)))
462 467
463 def class_by_file_get(self, file_name): 468 def class_by_file_get(self, file_name):
464 c_cls = lib.eolian_state_class_by_file_get(self._obj, _str_to_bytes(file_name)) 469 c_cls = lib.eolian_state_class_by_file_get(self, _str_to_bytes(file_name))
465 return Class(c_cls) if c_cls else None 470 return Class(c_cls) if c_cls else None
466 471
467 def constants_by_file_get(self, file_name): 472 def constants_by_file_get(self, file_name):
468 return Iterator(Variable, 473 return Iterator(Variable,
469 lib.eolian_state_constants_by_file_get(self._obj, _str_to_bytes(file_name))) 474 lib.eolian_state_constants_by_file_get(self, _str_to_bytes(file_name)))
470 475
471 def globals_by_file_get(self, file_name): 476 def globals_by_file_get(self, file_name):
472 return Iterator(Variable, 477 return Iterator(Variable,
473 lib.eolian_state_globals_by_file_get(self._obj, _str_to_bytes(file_name))) 478 lib.eolian_state_globals_by_file_get(self, _str_to_bytes(file_name)))
474 479
475 def aliases_by_file_get(self, file_name): 480 def aliases_by_file_get(self, file_name):
476 return Iterator(Typedecl, 481 return Iterator(Typedecl,
477 lib.eolian_state_aliases_by_file_get(self._obj, _str_to_bytes(file_name))) 482 lib.eolian_state_aliases_by_file_get(self, _str_to_bytes(file_name)))
478 483
479 def structs_by_file_get(self, file_name): 484 def structs_by_file_get(self, file_name):
480 return Iterator(Typedecl, 485 return Iterator(Typedecl,
481 lib.eolian_state_structs_by_file_get(self._obj, _str_to_bytes(file_name))) 486 lib.eolian_state_structs_by_file_get(self, _str_to_bytes(file_name)))
482 487
483 def enums_by_file_get(self, file_name): 488 def enums_by_file_get(self, file_name):
484 return Iterator(Typedecl, 489 return Iterator(Typedecl,
485 lib.eolian_state_enums_by_file_get(self._obj, _str_to_bytes(file_name))) 490 lib.eolian_state_enums_by_file_get(self, _str_to_bytes(file_name)))
486 491
487 492
488### Namespace Utility Class ################################################# 493### Namespace Utility Class #################################################
@@ -586,20 +591,20 @@ class Object(EolianBaseObject):
586 591
587 @cached_property 592 @cached_property
588 def unit(self): 593 def unit(self):
589 c_unit = lib.eolian_object_unit_get(self._obj) 594 c_unit = lib.eolian_object_unit_get(self)
590 return Eolian_Unit(c_unit) if c_unit else None 595 return Eolian_Unit(c_unit) if c_unit else None
591 596
592 @cached_property 597 @cached_property
593 def name(self): 598 def name(self):
594 return _str_to_py(lib.eolian_object_name_get(self._obj)) 599 return _str_to_py(lib.eolian_object_name_get(self))
595 600
596 @cached_property 601 @cached_property
597 def short_name(self): 602 def short_name(self):
598 return _str_to_py(lib.eolian_object_short_name_get(self._obj)) 603 return _str_to_py(lib.eolian_object_short_name_get(self))
599 604
600 @property 605 @property
601 def namespaces(self): 606 def namespaces(self):
602 return Iterator(_str_to_py, lib.eolian_object_namespaces_get(self._obj)) 607 return Iterator(_str_to_py, lib.eolian_object_namespaces_get(self))
603 608
604 @cached_property 609 @cached_property
605 def namespace(self): 610 def namespace(self):
@@ -607,15 +612,15 @@ class Object(EolianBaseObject):
607 612
608 @cached_property 613 @cached_property
609 def file(self): 614 def file(self):
610 return _str_to_py(lib.eolian_object_file_get(self._obj)) 615 return _str_to_py(lib.eolian_object_file_get(self))
611 616
612 @cached_property 617 @cached_property
613 def line(self): 618 def line(self):
614 return int(lib.eolian_object_line_get(self._obj)) 619 return int(lib.eolian_object_line_get(self))
615 620
616 @cached_property 621 @cached_property
617 def column(self): 622 def column(self):
618 return int(lib.eolian_object_column_get(self._obj)) 623 return int(lib.eolian_object_column_get(self))
619 624
620 625
621class Class(Object): 626class Class(Object):
@@ -624,66 +629,66 @@ class Class(Object):
624 629
625 @cached_property 630 @cached_property
626 def c_name(self): 631 def c_name(self):
627 s = lib.eolian_class_c_name_get(self._obj) 632 s = lib.eolian_class_c_name_get(self)
628 ret = _str_to_py(s) 633 ret = _str_to_py(s)
629 lib.eina_stringshare_del(c_void_p(s)) 634 lib.eina_stringshare_del(c_void_p(s))
630 return ret 635 return ret
631 636
632 @cached_property 637 @cached_property
633 def c_get_function_name(self): 638 def c_get_function_name(self):
634 s = lib.eolian_class_c_get_function_name_get(self._obj) 639 s = lib.eolian_class_c_get_function_name_get(self)
635 ret = _str_to_py(s) 640 ret = _str_to_py(s)
636 lib.eina_stringshare_del(c_void_p(s)) 641 lib.eina_stringshare_del(c_void_p(s))
637 return ret 642 return ret
638 643
639 @cached_property 644 @cached_property
640 def type(self): 645 def type(self):
641 return Eolian_Class_Type(lib.eolian_class_type_get(self._obj)) 646 return Eolian_Class_Type(lib.eolian_class_type_get(self))
642 647
643 @cached_property 648 @cached_property
644 def data_type(self): 649 def data_type(self):
645 return _str_to_py(lib.eolian_class_data_type_get(self._obj)) 650 return _str_to_py(lib.eolian_class_data_type_get(self))
646 651
647 @cached_property 652 @cached_property
648 def c_data_type(self): 653 def c_data_type(self):
649 s = lib.eolian_class_c_data_type_get(self._obj) 654 s = lib.eolian_class_c_data_type_get(self)
650 ret = _str_to_py(s) 655 ret = _str_to_py(s)
651 lib.eina_stringshare_del(c_void_p(s)) 656 lib.eina_stringshare_del(c_void_p(s))
652 return ret 657 return ret
653 658
654 @cached_property 659 @cached_property
655 def legacy_prefix(self): 660 def legacy_prefix(self):
656 return _str_to_py(lib.eolian_class_legacy_prefix_get(self._obj)) 661 return _str_to_py(lib.eolian_class_legacy_prefix_get(self))
657 662
658 @cached_property 663 @cached_property
659 def eo_prefix(self): 664 def eo_prefix(self):
660 return _str_to_py(lib.eolian_class_eo_prefix_get(self._obj)) 665 return _str_to_py(lib.eolian_class_eo_prefix_get(self))
661 666
662 @cached_property 667 @cached_property
663 def event_prefix(self): 668 def event_prefix(self):
664 return _str_to_py(lib.eolian_class_event_prefix_get(self._obj)) 669 return _str_to_py(lib.eolian_class_event_prefix_get(self))
665 670
666 @cached_property 671 @cached_property
667 def documentation(self): 672 def documentation(self):
668 c_doc = lib.eolian_class_documentation_get(self._obj) 673 c_doc = lib.eolian_class_documentation_get(self)
669 return Documentation(c_doc) if c_doc else None 674 return Documentation(c_doc) if c_doc else None
670 675
671 @property 676 @property
672 def constructors(self): 677 def constructors(self):
673 return Iterator(Constructor, lib.eolian_class_constructors_get(self._obj)) 678 return Iterator(Constructor, lib.eolian_class_constructors_get(self))
674 679
675 @property 680 @property
676 def events(self): 681 def events(self):
677 return Iterator(Event, lib.eolian_class_events_get(self._obj)) 682 return Iterator(Event, lib.eolian_class_events_get(self))
678 683
679 def event_by_name_get(self, event_name): 684 def event_by_name_get(self, event_name):
680 c_event = lib.eolian_class_event_by_name_get(self._obj, 685 c_event = lib.eolian_class_event_by_name_get(self,
681 _str_to_bytes(event_name)) 686 _str_to_bytes(event_name))
682 return Event(c_event) if c_event else None 687 return Event(c_event) if c_event else None
683 688
684 @property 689 @property
685 def inherits(self): 690 def inherits(self):
686 return Iterator(Class, lib.eolian_class_inherits_get(self._obj)) 691 return Iterator(Class, lib.eolian_class_inherits_get(self))
687 692
688 @cached_property 693 @cached_property
689 def inherits_full(self): 694 def inherits_full(self):
@@ -714,21 +719,21 @@ class Class(Object):
714 719
715 @cached_property 720 @cached_property
716 def ctor_enable(self): 721 def ctor_enable(self):
717 return bool(lib.eolian_class_ctor_enable_get(self._obj)) 722 return bool(lib.eolian_class_ctor_enable_get(self))
718 723
719 @cached_property 724 @cached_property
720 def dtor_enable(self): 725 def dtor_enable(self):
721 return bool(lib.eolian_class_dtor_enable_get(self._obj)) 726 return bool(lib.eolian_class_dtor_enable_get(self))
722 727
723 def function_by_name_get(self, func_name, 728 def function_by_name_get(self, func_name,
724 ftype=Eolian_Function_Type.UNRESOLVED): 729 ftype=Eolian_Function_Type.UNRESOLVED):
725 f = lib.eolian_class_function_by_name_get(self._obj, 730 f = lib.eolian_class_function_by_name_get(self,
726 _str_to_bytes(func_name), 731 _str_to_bytes(func_name),
727 ftype) 732 ftype)
728 return Function(f) if f else None 733 return Function(f) if f else None
729 734
730 def functions_get(self, ftype): 735 def functions_get(self, ftype):
731 return Iterator(Function, lib.eolian_class_functions_get(self._obj, ftype)) 736 return Iterator(Function, lib.eolian_class_functions_get(self, ftype))
732 737
733 @property 738 @property
734 def methods(self): 739 def methods(self):
@@ -740,11 +745,11 @@ class Class(Object):
740 745
741 @property 746 @property
742 def implements(self): 747 def implements(self):
743 return Iterator(Implement, lib.eolian_class_implements_get(self._obj)) 748 return Iterator(Implement, lib.eolian_class_implements_get(self))
744 749
745 @property 750 @property
746 def parts(self): 751 def parts(self):
747 return Iterator(Part, lib.eolian_class_parts_get(self._obj)) 752 return Iterator(Part, lib.eolian_class_parts_get(self))
748 753
749 754
750class Part(Object): 755class Part(Object):
@@ -753,11 +758,11 @@ class Part(Object):
753 758
754 @cached_property 759 @cached_property
755 def class_(self): 760 def class_(self):
756 return Class(lib.eolian_part_class_get(self._obj)) 761 return Class(lib.eolian_part_class_get(self))
757 762
758 @cached_property 763 @cached_property
759 def documentation(self): 764 def documentation(self):
760 c_doc = lib.eolian_part_documentation_get(self._obj) 765 c_doc = lib.eolian_part_documentation_get(self)
761 return Documentation(c_doc) if c_doc else None 766 return Documentation(c_doc) if c_doc else None
762 767
763 768
@@ -767,15 +772,15 @@ class Constructor(Object):
767 772
768 @cached_property 773 @cached_property
769 def function(self): 774 def function(self):
770 return Function(lib.eolian_constructor_function_get(self._obj)) 775 return Function(lib.eolian_constructor_function_get(self))
771 776
772 @cached_property 777 @cached_property
773 def is_optional(self): 778 def is_optional(self):
774 return bool(lib.eolian_constructor_is_optional(self._obj)) 779 return bool(lib.eolian_constructor_is_optional(self))
775 780
776 @cached_property 781 @cached_property
777 def class_(self): 782 def class_(self):
778 return Class(lib.eolian_constructor_class_get(self._obj)) 783 return Class(lib.eolian_constructor_class_get(self))
779 784
780 785
781class Event(Object): 786class Event(Object):
@@ -784,36 +789,36 @@ class Event(Object):
784 789
785 @cached_property 790 @cached_property
786 def c_name(self): 791 def c_name(self):
787 s = lib.eolian_event_c_name_get(self._obj) 792 s = lib.eolian_event_c_name_get(self)
788 ret = _str_to_py(s) 793 ret = _str_to_py(s)
789 lib.eina_stringshare_del(c_void_p(s)) 794 lib.eina_stringshare_del(c_void_p(s))
790 return ret 795 return ret
791 796
792 @cached_property 797 @cached_property
793 def type(self): 798 def type(self):
794 c_type = lib.eolian_event_type_get(self._obj) 799 c_type = lib.eolian_event_type_get(self)
795 return Type(c_type) if c_type else None 800 return Type(c_type) if c_type else None
796 801
797 @cached_property 802 @cached_property
798 def documentation(self): 803 def documentation(self):
799 c_doc = lib.eolian_event_documentation_get(self._obj) 804 c_doc = lib.eolian_event_documentation_get(self)
800 return Documentation(c_doc) if c_doc else None 805 return Documentation(c_doc) if c_doc else None
801 806
802 @cached_property 807 @cached_property
803 def scope(self): 808 def scope(self):
804 return Eolian_Object_Scope(lib.eolian_event_scope_get(self._obj)) 809 return Eolian_Object_Scope(lib.eolian_event_scope_get(self))
805 810
806 @cached_property 811 @cached_property
807 def is_beta(self): 812 def is_beta(self):
808 return bool(lib.eolian_event_is_beta(self._obj)) 813 return bool(lib.eolian_event_is_beta(self))
809 814
810 @cached_property 815 @cached_property
811 def is_hot(self): 816 def is_hot(self):
812 return bool(lib.eolian_event_is_hot(self._obj)) 817 return bool(lib.eolian_event_is_hot(self))
813 818
814 @cached_property 819 @cached_property
815 def is_restart(self): 820 def is_restart(self):
816 return bool(lib.eolian_event_is_restart(self._obj)) 821 return bool(lib.eolian_event_is_restart(self))
817 822
818 823
819class Function(Object): 824class Function(Object):
@@ -821,7 +826,7 @@ class Function(Object):
821 return "<eolian.Function '{0.name}'>".format(self) 826 return "<eolian.Function '{0.name}'>".format(self)
822 827
823 def full_c_name_get(self, ftype, use_legacy=False): 828 def full_c_name_get(self, ftype, use_legacy=False):
824 s = lib.eolian_function_full_c_name_get(self._obj, ftype, use_legacy) 829 s = lib.eolian_function_full_c_name_get(self, ftype, use_legacy)
825 ret = _str_to_py(s) 830 ret = _str_to_py(s)
826 lib.eina_stringshare_del(c_void_p(s)) 831 lib.eina_stringshare_del(c_void_p(s))
827 return ret 832 return ret
@@ -852,10 +857,10 @@ class Function(Object):
852 857
853 @cached_property 858 @cached_property
854 def type(self): 859 def type(self):
855 return Eolian_Function_Type(lib.eolian_function_type_get(self._obj)) 860 return Eolian_Function_Type(lib.eolian_function_type_get(self))
856 861
857 def scope_get(self, ftype): 862 def scope_get(self, ftype):
858 return Eolian_Object_Scope(lib.eolian_function_scope_get(self._obj, ftype)) 863 return Eolian_Object_Scope(lib.eolian_function_scope_get(self, ftype))
859 864
860 @cached_property 865 @cached_property
861 def method_scope(self): 866 def method_scope(self):
@@ -870,43 +875,43 @@ class Function(Object):
870 return self.scope_get(Eolian_Function_Type.PROP_SET) 875 return self.scope_get(Eolian_Function_Type.PROP_SET)
871 876
872 def legacy_get(self, ftype): 877 def legacy_get(self, ftype):
873 return _str_to_py(lib.eolian_function_legacy_get(self._obj, ftype)) 878 return _str_to_py(lib.eolian_function_legacy_get(self, ftype))
874 879
875 def is_legacy_only(self, ftype): 880 def is_legacy_only(self, ftype):
876 return bool(lib.eolian_function_is_legacy_only(self._obj, ftype)) 881 return bool(lib.eolian_function_is_legacy_only(self, ftype))
877 882
878 @cached_property 883 @cached_property
879 def is_class(self): 884 def is_class(self):
880 return bool(lib.eolian_function_is_class(self._obj)) 885 return bool(lib.eolian_function_is_class(self))
881 886
882 @cached_property 887 @cached_property
883 def is_beta(self): 888 def is_beta(self):
884 return bool(lib.eolian_function_is_beta(self._obj)) 889 return bool(lib.eolian_function_is_beta(self))
885 890
886 @cached_property 891 @cached_property
887 def object_is_const(self): 892 def object_is_const(self):
888 return bool(lib.eolian_function_object_is_const(self._obj)) 893 return bool(lib.eolian_function_object_is_const(self))
889 894
890 @cached_property 895 @cached_property
891 def class_(self): 896 def class_(self):
892 c_cls = lib.eolian_function_class_get(self._obj) 897 c_cls = lib.eolian_function_class_get(self)
893 return Class(c_cls) if c_cls else None 898 return Class(c_cls) if c_cls else None
894 899
895 def is_constructor(self, klass): 900 def is_constructor(self, klass):
896 return bool(lib.eolian_function_is_constructor(self._obj, klass._obj)) 901 return bool(lib.eolian_function_is_constructor(self, klass._obj))
897 902
898 # @cached_property 903 # @cached_property
899 # def is_function_pointer(self): 904 # def is_function_pointer(self):
900 # return bool(lib.eolian_function_is_function_pointer(self._obj)) 905 # return bool(lib.eolian_function_is_function_pointer(self))
901 906
902 @property 907 @property
903 def parameters(self): 908 def parameters(self):
904 return Iterator(Function_Parameter, 909 return Iterator(Function_Parameter,
905 lib.eolian_function_parameters_get(self._obj)) 910 lib.eolian_function_parameters_get(self))
906 911
907 def values_get(self, ftype): # TODO rename in property_values_get (or implement a proper Property class?) 912 def values_get(self, ftype): # TODO rename in property_values_get (or implement a proper Property class?)
908 return Iterator(Function_Parameter, 913 return Iterator(Function_Parameter,
909 lib.eolian_property_values_get(self._obj, ftype)) 914 lib.eolian_property_values_get(self, ftype))
910 915
911 @property 916 @property
912 def getter_values(self): # TODO rename ... 917 def getter_values(self): # TODO rename ...
@@ -918,7 +923,7 @@ class Function(Object):
918 923
919 def keys_get(self, ftype): # TODO rename in property_keys_get (or implement a proper Property class?) 924 def keys_get(self, ftype): # TODO rename in property_keys_get (or implement a proper Property class?)
920 return Iterator(Function_Parameter, 925 return Iterator(Function_Parameter,
921 lib.eolian_property_keys_get(self._obj, ftype)) 926 lib.eolian_property_keys_get(self, ftype))
922 927
923 @property 928 @property
924 def getter_keys(self): # TODO rename ... 929 def getter_keys(self): # TODO rename ...
@@ -929,7 +934,7 @@ class Function(Object):
929 return self.keys_get(Eolian_Function_Type.PROP_SET) 934 return self.keys_get(Eolian_Function_Type.PROP_SET)
930 935
931 def return_type_get(self, ftype): 936 def return_type_get(self, ftype):
932 c_type = lib.eolian_function_return_type_get(self._obj, ftype) 937 c_type = lib.eolian_function_return_type_get(self, ftype)
933 return Type(c_type) if c_type else None 938 return Type(c_type) if c_type else None
934 939
935 def return_default_value(self, ftye): 940 def return_default_value(self, ftye):
@@ -937,11 +942,11 @@ class Function(Object):
937 return Expression(c_expr) if c_expr else None 942 return Expression(c_expr) if c_expr else None
938 943
939 def return_documentation(self, ftype): 944 def return_documentation(self, ftype):
940 c_doc = lib.eolian_function_return_documentation_get(self._obj, ftype) 945 c_doc = lib.eolian_function_return_documentation_get(self, ftype)
941 return Documentation(c_doc) if c_doc else None 946 return Documentation(c_doc) if c_doc else None
942 947
943 def return_is_warn_unused(self, ftype): 948 def return_is_warn_unused(self, ftype):
944 return bool(lib.eolian_function_return_is_warn_unused(self._obj, ftype)) 949 return bool(lib.eolian_function_return_is_warn_unused(self, ftype))
945 950
946 @cached_property 951 @cached_property
947 def method_return_type(self): 952 def method_return_type(self):
@@ -959,19 +964,19 @@ class Function(Object):
959 def prop_readable(self): 964 def prop_readable(self):
960 # TODO: maybe there is a better way to do this... 965 # TODO: maybe there is a better way to do this...
961 ftype = Eolian_Function_Type.PROP_GET 966 ftype = Eolian_Function_Type.PROP_GET
962 scope = lib.eolian_function_scope_get(self._obj, ftype) 967 scope = lib.eolian_function_scope_get(self, ftype)
963 return True if scope != Eolian_Object_Scope.UNKNOWN else False 968 return True if scope != Eolian_Object_Scope.UNKNOWN else False
964 969
965 @cached_property 970 @cached_property
966 def prop_writable(self): 971 def prop_writable(self):
967 # TODO: maybe there is a better way to do this... 972 # TODO: maybe there is a better way to do this...
968 ftype = Eolian_Function_Type.PROP_SET 973 ftype = Eolian_Function_Type.PROP_SET
969 scope = lib.eolian_function_scope_get(self._obj, ftype) 974 scope = lib.eolian_function_scope_get(self, ftype)
970 return True if scope != Eolian_Object_Scope.UNKNOWN else False 975 return True if scope != Eolian_Object_Scope.UNKNOWN else False
971 976
972 @cached_property 977 @cached_property
973 def implement(self): 978 def implement(self):
974 c_impl = lib.eolian_function_implement_get(self._obj) 979 c_impl = lib.eolian_function_implement_get(self)
975 return Implement(c_impl) if c_impl else None 980 return Implement(c_impl) if c_impl else None
976 981
977 982
@@ -982,33 +987,33 @@ class Function_Parameter(Object):
982 987
983 @cached_property 988 @cached_property
984 def direction(self): 989 def direction(self):
985 return Eolian_Parameter_Dir(lib.eolian_parameter_direction_get(self._obj)) 990 return Eolian_Parameter_Dir(lib.eolian_parameter_direction_get(self))
986 991
987 @cached_property 992 @cached_property
988 def documentation(self): 993 def documentation(self):
989 c_doc = lib.eolian_parameter_documentation_get(self._obj) 994 c_doc = lib.eolian_parameter_documentation_get(self)
990 return Documentation(c_doc) if c_doc else None 995 return Documentation(c_doc) if c_doc else None
991 996
992 @cached_property 997 @cached_property
993 def is_nonull(self): 998 def is_nonull(self):
994 return bool(lib.eolian_parameter_is_nonull(self._obj)) 999 return bool(lib.eolian_parameter_is_nonull(self))
995 1000
996 @cached_property 1001 @cached_property
997 def is_nullable(self): 1002 def is_nullable(self):
998 return bool(lib.eolian_parameter_is_nullable(self._obj)) 1003 return bool(lib.eolian_parameter_is_nullable(self))
999 1004
1000 @cached_property 1005 @cached_property
1001 def is_optional(self): 1006 def is_optional(self):
1002 return bool(lib.eolian_parameter_is_optional(self._obj)) 1007 return bool(lib.eolian_parameter_is_optional(self))
1003 1008
1004 @cached_property 1009 @cached_property
1005 def type(self): 1010 def type(self):
1006 c_type = lib.eolian_parameter_type_get(self._obj) 1011 c_type = lib.eolian_parameter_type_get(self)
1007 return Type(c_type) if c_type else None 1012 return Type(c_type) if c_type else None
1008 1013
1009 @cached_property 1014 @cached_property
1010 def default_value(self): 1015 def default_value(self):
1011 c_expr = lib.eolian_parameter_default_value_get(self._obj) 1016 c_expr = lib.eolian_parameter_default_value_get(self)
1012 return Expression(c_expr) if c_expr else None 1017 return Expression(c_expr) if c_expr else None
1013 1018
1014 1019
@@ -1018,39 +1023,39 @@ class Implement(Object):
1018 1023
1019 @cached_property 1024 @cached_property
1020 def class_(self): 1025 def class_(self):
1021 c_cls = lib.eolian_implement_class_get(self._obj) 1026 c_cls = lib.eolian_implement_class_get(self)
1022 return Class(c_cls) if c_cls else None 1027 return Class(c_cls) if c_cls else None
1023 1028
1024 @cached_property 1029 @cached_property
1025 def function(self): 1030 def function(self):
1026 c_func = lib.eolian_implement_function_get(self._obj, None) 1031 c_func = lib.eolian_implement_function_get(self, None)
1027 return Function(c_func) if c_func else None 1032 return Function(c_func) if c_func else None
1028 1033
1029 def documentation_get(self, ftype=Eolian_Function_Type.METHOD): 1034 def documentation_get(self, ftype=Eolian_Function_Type.METHOD):
1030 # something strange in this eolian api :/ (see 'documentation' property 1035 # something strange in this eolian api :/ (see 'documentation' property
1031 c_doc = lib.eolian_implement_documentation_get(self._obj, ftype) 1036 c_doc = lib.eolian_implement_documentation_get(self, ftype)
1032 return Documentation(c_doc) if c_doc else None 1037 return Documentation(c_doc) if c_doc else None
1033 # TODO implement util properties for documentation_get 1038 # TODO implement util properties for documentation_get
1034 1039
1035 def is_auto(self, ftype=Eolian_Function_Type.METHOD): 1040 def is_auto(self, ftype=Eolian_Function_Type.METHOD):
1036 return bool(lib.eolian_implement_is_auto(self._obj, ftype)) 1041 return bool(lib.eolian_implement_is_auto(self, ftype))
1037 # TODO implement util properties for is_auto 1042 # TODO implement util properties for is_auto
1038 1043
1039 def is_empty(self, ftype=Eolian_Function_Type.METHOD): 1044 def is_empty(self, ftype=Eolian_Function_Type.METHOD):
1040 return bool(lib.eolian_implement_is_empty(self._obj, ftype)) 1045 return bool(lib.eolian_implement_is_empty(self, ftype))
1041 # TODO implement util properties for is_empty 1046 # TODO implement util properties for is_empty
1042 1047
1043 def is_pure_virtual(self, ftype=Eolian_Function_Type.METHOD): 1048 def is_pure_virtual(self, ftype=Eolian_Function_Type.METHOD):
1044 return bool(lib.eolian_implement_is_pure_virtual(self._obj, ftype)) 1049 return bool(lib.eolian_implement_is_pure_virtual(self, ftype))
1045 # TODO implement util properties for is_pure_virtual 1050 # TODO implement util properties for is_pure_virtual
1046 1051
1047 @cached_property 1052 @cached_property
1048 def is_prop_set(self): 1053 def is_prop_set(self):
1049 return bool(lib.eolian_implement_is_prop_set(self._obj)) 1054 return bool(lib.eolian_implement_is_prop_set(self))
1050 1055
1051 @cached_property 1056 @cached_property
1052 def is_prop_get(self): 1057 def is_prop_get(self):
1053 return bool(lib.eolian_implement_is_prop_get(self._obj)) 1058 return bool(lib.eolian_implement_is_prop_get(self))
1054 1059
1055 @property 1060 @property
1056 def is_property(self): 1061 def is_property(self):
@@ -1068,18 +1073,18 @@ class Type(Object):
1068 1073
1069 @cached_property 1074 @cached_property
1070 def free_func(self): 1075 def free_func(self):
1071 return _str_to_py(lib.eolian_type_free_func_get(self._obj)) 1076 return _str_to_py(lib.eolian_type_free_func_get(self))
1072 1077
1073 @cached_property 1078 @cached_property
1074 def type(self): 1079 def type(self):
1075 return Eolian_Type_Type(lib.eolian_type_type_get(self._obj)) 1080 return Eolian_Type_Type(lib.eolian_type_type_get(self))
1076 1081
1077 @cached_property 1082 @cached_property
1078 def builtin_type(self): 1083 def builtin_type(self):
1079 return Eolian_Type_Builtin_Type(lib.eolian_type_builtin_type_get(self._obj)) 1084 return Eolian_Type_Builtin_Type(lib.eolian_type_builtin_type_get(self))
1080 1085
1081 def c_type_get(self, ctype): 1086 def c_type_get(self, ctype):
1082 s = lib.eolian_type_c_type_get(self._obj, ctype) 1087 s = lib.eolian_type_c_type_get(self, ctype)
1083 ret = _str_to_py(s) 1088 ret = _str_to_py(s)
1084 lib.eina_stringshare_del(c_void_p(s)) 1089 lib.eina_stringshare_del(c_void_p(s))
1085 return ret 1090 return ret
@@ -1098,40 +1103,40 @@ class Type(Object):
1098 1103
1099 @cached_property 1104 @cached_property
1100 def typedecl(self): 1105 def typedecl(self):
1101 c_tdecl = lib.eolian_type_typedecl_get(self._obj) 1106 c_tdecl = lib.eolian_type_typedecl_get(self)
1102 return Typedecl(c_tdecl) if c_tdecl else None 1107 return Typedecl(c_tdecl) if c_tdecl else None
1103 1108
1104 @cached_property 1109 @cached_property
1105 def base_type(self): 1110 def base_type(self):
1106 c_type = lib.eolian_type_base_type_get(self._obj) 1111 c_type = lib.eolian_type_base_type_get(self)
1107 return Type(c_type) if c_type else None 1112 return Type(c_type) if c_type else None
1108 1113
1109 @cached_property 1114 @cached_property
1110 def next_type(self): 1115 def next_type(self):
1111 c_type = lib.eolian_type_next_type_get(self._obj) 1116 c_type = lib.eolian_type_next_type_get(self)
1112 return Type(c_type) if c_type else None 1117 return Type(c_type) if c_type else None
1113 1118
1114 @cached_property 1119 @cached_property
1115 def aliased_base(self): 1120 def aliased_base(self):
1116 c_type = lib.eolian_type_aliased_base_get(self._obj) 1121 c_type = lib.eolian_type_aliased_base_get(self)
1117 return Type(c_type) if c_type else None 1122 return Type(c_type) if c_type else None
1118 1123
1119 @cached_property 1124 @cached_property
1120 def class_(self): 1125 def class_(self):
1121 c_cls = lib.eolian_type_class_get(self._obj) 1126 c_cls = lib.eolian_type_class_get(self)
1122 return Class(c_cls) if c_cls else None 1127 return Class(c_cls) if c_cls else None
1123 1128
1124 @cached_property 1129 @cached_property
1125 def is_owned(self): 1130 def is_owned(self):
1126 return bool(lib.eolian_type_is_owned(self._obj)) 1131 return bool(lib.eolian_type_is_owned(self))
1127 1132
1128 @cached_property 1133 @cached_property
1129 def is_const(self): 1134 def is_const(self):
1130 return bool(lib.eolian_type_is_const(self._obj)) 1135 return bool(lib.eolian_type_is_const(self))
1131 1136
1132 @cached_property 1137 @cached_property
1133 def is_ptr(self): 1138 def is_ptr(self):
1134 return bool(lib.eolian_type_is_ptr(self._obj)) 1139 return bool(lib.eolian_type_is_ptr(self))
1135 1140
1136 1141
1137class Typedecl(Object): 1142class Typedecl(Object):
@@ -1140,63 +1145,63 @@ class Typedecl(Object):
1140 1145
1141 @cached_property 1146 @cached_property
1142 def type(self): 1147 def type(self):
1143 return Eolian_Typedecl_Type(lib.eolian_typedecl_type_get(self._obj)) 1148 return Eolian_Typedecl_Type(lib.eolian_typedecl_type_get(self))
1144 1149
1145 @cached_property 1150 @cached_property
1146 def c_type(self): 1151 def c_type(self):
1147 s = lib.eolian_typedecl_c_type_get(self._obj) 1152 s = lib.eolian_typedecl_c_type_get(self)
1148 ret = _str_to_py(s) 1153 ret = _str_to_py(s)
1149 lib.eina_stringshare_del(c_void_p(s)) 1154 lib.eina_stringshare_del(c_void_p(s))
1150 return ret 1155 return ret
1151 1156
1152 @cached_property 1157 @cached_property
1153 def free_func(self): 1158 def free_func(self):
1154 return _str_to_py(lib.eolian_typedecl_free_func_get(self._obj)) 1159 return _str_to_py(lib.eolian_typedecl_free_func_get(self))
1155 1160
1156 @cached_property 1161 @cached_property
1157 def is_extern(self): 1162 def is_extern(self):
1158 return bool(lib.eolian_typedecl_is_extern(self._obj)) 1163 return bool(lib.eolian_typedecl_is_extern(self))
1159 1164
1160 @property 1165 @property
1161 def enum_fields(self): 1166 def enum_fields(self):
1162 return Iterator(Enum_Type_Field, 1167 return Iterator(Enum_Type_Field,
1163 lib.eolian_typedecl_enum_fields_get(self._obj)) 1168 lib.eolian_typedecl_enum_fields_get(self))
1164 1169
1165 def enum_field_get(self, field): 1170 def enum_field_get(self, field):
1166 c_field = lib.eolian_typedecl_enum_field_get(self._obj, _str_to_bytes(field)) 1171 c_field = lib.eolian_typedecl_enum_field_get(self, _str_to_bytes(field))
1167 return Enum_Type_Field(c_field) if c_field else None 1172 return Enum_Type_Field(c_field) if c_field else None
1168 1173
1169 @property 1174 @property
1170 def struct_fields(self): 1175 def struct_fields(self):
1171 return Iterator(Struct_Type_Field, 1176 return Iterator(Struct_Type_Field,
1172 lib.eolian_typedecl_struct_fields_get(self._obj)) 1177 lib.eolian_typedecl_struct_fields_get(self))
1173 1178
1174 def struct_field_get(self, field): 1179 def struct_field_get(self, field):
1175 c_field = lib.eolian_typedecl_struct_field_get(self._obj, _str_to_bytes(field)) 1180 c_field = lib.eolian_typedecl_struct_field_get(self, _str_to_bytes(field))
1176 return Struct_Type_Field(c_field) if c_field else None 1181 return Struct_Type_Field(c_field) if c_field else None
1177 1182
1178 @cached_property 1183 @cached_property
1179 def base_type(self): 1184 def base_type(self):
1180 c_type = lib.eolian_typedecl_base_type_get(self._obj) 1185 c_type = lib.eolian_typedecl_base_type_get(self)
1181 return Type(c_type) if c_type else None 1186 return Type(c_type) if c_type else None
1182 1187
1183 @cached_property 1188 @cached_property
1184 def aliased_base(self): 1189 def aliased_base(self):
1185 c_type = lib.eolian_typedecl_aliased_base_get(self._obj) 1190 c_type = lib.eolian_typedecl_aliased_base_get(self)
1186 return Type(c_type) if c_type else None 1191 return Type(c_type) if c_type else None
1187 1192
1188 @cached_property 1193 @cached_property
1189 def documentation(self): 1194 def documentation(self):
1190 c_doc = lib.eolian_typedecl_documentation_get(self._obj) 1195 c_doc = lib.eolian_typedecl_documentation_get(self)
1191 return Documentation(c_doc) if c_doc else None 1196 return Documentation(c_doc) if c_doc else None
1192 1197
1193 @cached_property 1198 @cached_property
1194 def enum_legacy_prefix(self): 1199 def enum_legacy_prefix(self):
1195 return _str_to_py(lib.eolian_typedecl_enum_legacy_prefix_get(self._obj)) 1200 return _str_to_py(lib.eolian_typedecl_enum_legacy_prefix_get(self))
1196 1201
1197 @cached_property 1202 @cached_property
1198 def function_pointer(self): 1203 def function_pointer(self):
1199 c_func = lib.eolian_typedecl_function_pointer_get(self._obj) 1204 c_func = lib.eolian_typedecl_function_pointer_get(self)
1200 return Function(c_func) if c_func else None 1205 return Function(c_func) if c_func else None
1201 1206
1202 1207
@@ -1206,19 +1211,19 @@ class Enum_Type_Field(Object):
1206 1211
1207 @cached_property 1212 @cached_property
1208 def c_name(self): 1213 def c_name(self):
1209 s = lib.eolian_typedecl_enum_field_c_name_get(self._obj) 1214 s = lib.eolian_typedecl_enum_field_c_name_get(self)
1210 ret = _str_to_py(s) 1215 ret = _str_to_py(s)
1211 lib.eina_stringshare_del(c_void_p(s)) 1216 lib.eina_stringshare_del(c_void_p(s))
1212 return ret 1217 return ret
1213 1218
1214 @cached_property 1219 @cached_property
1215 def value(self): 1220 def value(self):
1216 c_expr = lib.eolian_typedecl_enum_field_value_get(self._obj, True) 1221 c_expr = lib.eolian_typedecl_enum_field_value_get(self, True)
1217 return Expression(c_expr) if c_expr else None 1222 return Expression(c_expr) if c_expr else None
1218 1223
1219 @cached_property 1224 @cached_property
1220 def documentation(self): 1225 def documentation(self):
1221 c_doc = lib.eolian_typedecl_enum_field_documentation_get(self._obj) 1226 c_doc = lib.eolian_typedecl_enum_field_documentation_get(self)
1222 return Documentation(c_doc) if c_doc else None 1227 return Documentation(c_doc) if c_doc else None
1223 1228
1224 1229
@@ -1228,12 +1233,12 @@ class Struct_Type_Field(Object):
1228 1233
1229 @cached_property 1234 @cached_property
1230 def type(self): 1235 def type(self):
1231 c_type = lib.eolian_typedecl_struct_field_type_get(self._obj) 1236 c_type = lib.eolian_typedecl_struct_field_type_get(self)
1232 return Type(c_type) if c_type else None 1237 return Type(c_type) if c_type else None
1233 1238
1234 @cached_property 1239 @cached_property
1235 def documentation(self): 1240 def documentation(self):
1236 c_doc = lib.eolian_typedecl_struct_field_documentation_get(self._obj) 1241 c_doc = lib.eolian_typedecl_struct_field_documentation_get(self)
1237 return Documentation(c_doc) if c_doc else None 1242 return Documentation(c_doc) if c_doc else None
1238 1243
1239 1244
@@ -1243,40 +1248,40 @@ class Expression(Object):
1243 1248
1244 @cached_property 1249 @cached_property
1245 def type(self): 1250 def type(self):
1246 return Eolian_Expression_Type(lib.eolian_expression_type_get(self._obj)) 1251 return Eolian_Expression_Type(lib.eolian_expression_type_get(self))
1247 1252
1248 # TODO: EAPI Eolian_Value eolian_expression_value_get(const Eolian_Expression *expr); 1253 # TODO: EAPI Eolian_Value eolian_expression_value_get(const Eolian_Expression *expr);
1249 1254
1250 @cached_property 1255 @cached_property
1251 def serialize(self): 1256 def serialize(self):
1252 s = lib.eolian_expression_serialize(self._obj) 1257 s = lib.eolian_expression_serialize(self)
1253 ret = _str_to_py(s) 1258 ret = _str_to_py(s)
1254 lib.eina_stringshare_del(c_void_p(s)) 1259 lib.eina_stringshare_del(c_void_p(s))
1255 return ret 1260 return ret
1256 1261
1257 @cached_property 1262 @cached_property
1258 def binary_operator(self): 1263 def binary_operator(self):
1259 c_op = lib.eolian_expression_binary_operator_get(self._obj) 1264 c_op = lib.eolian_expression_binary_operator_get(self)
1260 return Eolian_Binary_Operator(c_op) if c_op is not None else None 1265 return Eolian_Binary_Operator(c_op) if c_op is not None else None
1261 1266
1262 @cached_property 1267 @cached_property
1263 def binary_lhs(self): 1268 def binary_lhs(self):
1264 c_expr = lib.eolian_expression_binary_lhs_get(self._obj) 1269 c_expr = lib.eolian_expression_binary_lhs_get(self)
1265 return Expression(c_expr) if c_expr else None 1270 return Expression(c_expr) if c_expr else None
1266 1271
1267 @cached_property 1272 @cached_property
1268 def binary_rhs(self): 1273 def binary_rhs(self):
1269 c_expr = lib.eolian_expression_binary_rhs_get(self._obj) 1274 c_expr = lib.eolian_expression_binary_rhs_get(self)
1270 return Expression(c_expr) if c_expr else None 1275 return Expression(c_expr) if c_expr else None
1271 1276
1272 @cached_property 1277 @cached_property
1273 def unary_operator(self): 1278 def unary_operator(self):
1274 c_op = lib.eolian_expression_unary_operator_get(self._obj) 1279 c_op = lib.eolian_expression_unary_operator_get(self)
1275 return Eolian_Unary_Operator(c_op) if c_op is not None else None 1280 return Eolian_Unary_Operator(c_op) if c_op is not None else None
1276 1281
1277 @cached_property 1282 @cached_property
1278 def unary_expression(self): 1283 def unary_expression(self):
1279 c_expr = lib.eolian_expression_unary_expression_get(self._obj) 1284 c_expr = lib.eolian_expression_unary_expression_get(self)
1280 return Expression(c_expr) if c_expr is not None else None 1285 return Expression(c_expr) if c_expr is not None else None
1281 1286
1282 1287
@@ -1286,25 +1291,25 @@ class Variable(Object):
1286 1291
1287 @cached_property 1292 @cached_property
1288 def type(self): 1293 def type(self):
1289 return Eolian_Variable_Type(lib.eolian_variable_type_get(self._obj)) 1294 return Eolian_Variable_Type(lib.eolian_variable_type_get(self))
1290 1295
1291 @cached_property 1296 @cached_property
1292 def value(self): 1297 def value(self):
1293 c_expr = lib.eolian_variable_value_get(self._obj) 1298 c_expr = lib.eolian_variable_value_get(self)
1294 return Expression(c_expr) if c_expr else None 1299 return Expression(c_expr) if c_expr else None
1295 1300
1296 @cached_property 1301 @cached_property
1297 def base_type(self): 1302 def base_type(self):
1298 c_type = lib.eolian_variable_base_type_get(self._obj) 1303 c_type = lib.eolian_variable_base_type_get(self)
1299 return Type(c_type) if c_type else None 1304 return Type(c_type) if c_type else None
1300 1305
1301 @cached_property 1306 @cached_property
1302 def is_extern(self): 1307 def is_extern(self):
1303 return bool(lib.eolian_variable_is_extern(self._obj)) 1308 return bool(lib.eolian_variable_is_extern(self))
1304 1309
1305 @cached_property 1310 @cached_property
1306 def documentation(self): 1311 def documentation(self):
1307 c_doc = lib.eolian_variable_documentation_get(self._obj) 1312 c_doc = lib.eolian_variable_documentation_get(self)
1308 return Documentation(c_doc) if c_doc else None 1313 return Documentation(c_doc) if c_doc else None
1309 1314
1310 1315
@@ -1324,15 +1329,15 @@ class Documentation(Object): # OK (1 TODO Unit*)
1324 1329
1325 @cached_property 1330 @cached_property
1326 def summary(self): 1331 def summary(self):
1327 return _str_to_py(lib.eolian_documentation_summary_get(self._obj)) 1332 return _str_to_py(lib.eolian_documentation_summary_get(self))
1328 1333
1329 @cached_property 1334 @cached_property
1330 def description(self): 1335 def description(self):
1331 return _str_to_py(lib.eolian_documentation_description_get(self._obj)) 1336 return _str_to_py(lib.eolian_documentation_description_get(self))
1332 1337
1333 @cached_property 1338 @cached_property
1334 def since(self): 1339 def since(self):
1335 return _str_to_py(lib.eolian_documentation_since_get(self._obj)) 1340 return _str_to_py(lib.eolian_documentation_since_get(self))
1336 1341
1337 @cached_property 1342 @cached_property
1338 def summary_tokens(self): 1343 def summary_tokens(self):