diff options
author | Daniel Kolesa <d.kolesa@osg.samsung.com> | 2018-03-08 23:07:01 +0100 |
---|---|---|
committer | Daniel Kolesa <d.kolesa@osg.samsung.com> | 2018-03-08 23:07:01 +0100 |
commit | bee3114c2cfb4109684b6a6103cc6009ccbdfd0a (patch) | |
tree | 9f0b310a1af7f87571c54a5535a5e85894ce24c9 /src/scripts | |
parent | f24fa691e7c25ed6779f78affcbfe7310fa85dda (diff) |
pyolian: add support for object retrieval
Diffstat (limited to 'src/scripts')
-rw-r--r-- | src/scripts/pyolian/eolian.py | 20 | ||||
-rw-r--r-- | src/scripts/pyolian/eolian_lib.py | 20 |
2 files changed, 40 insertions, 0 deletions
diff --git a/src/scripts/pyolian/eolian.py b/src/scripts/pyolian/eolian.py index db4b35fad0..e3ce9d68e2 100644 --- a/src/scripts/pyolian/eolian.py +++ b/src/scripts/pyolian/eolian.py | |||
@@ -351,6 +351,14 @@ class Eolian_Unit(EolianBaseObject): | |||
351 | return _str_to_py(lib.eolian_unit_file_get(self._obj)) | 351 | return _str_to_py(lib.eolian_unit_file_get(self._obj)) |
352 | 352 | ||
353 | @property | 353 | @property |
354 | def objects(self): | ||
355 | return Iterator(Object, lib.eolian_unit_objects_get(self._obj)) | ||
356 | |||
357 | def object_by_name_get(self, name): | ||
358 | c_obj = lib.eolian_unit_object_by_name_get(self._obj, _str_to_bytes(name)) | ||
359 | return Object(c_obj) if c_obj else None | ||
360 | |||
361 | @property | ||
354 | def classes(self): | 362 | def classes(self): |
355 | return Iterator(Class, lib.eolian_unit_classes_get(self._obj)) | 363 | return Iterator(Class, lib.eolian_unit_classes_get(self._obj)) |
356 | 364 | ||
@@ -465,6 +473,18 @@ class Eolian_State(Eolian_Unit): | |||
465 | return Iterator(Eolian_Unit, lib.eolian_state_units_get(self._obj)) | 473 | return Iterator(Eolian_Unit, lib.eolian_state_units_get(self._obj)) |
466 | 474 | ||
467 | @property | 475 | @property |
476 | def objects(self): | ||
477 | return Iterator(Object, lib.eolian_state_objects_get(self._obj)) | ||
478 | |||
479 | def object_by_name_get(self, name): | ||
480 | c_obj = lib.eolian_state_object_by_name_get(self._obj, _str_to_bytes(name)) | ||
481 | return Object(c_obj) if c_obj else None | ||
482 | |||
483 | def objects_by_file_get(self, file_name): | ||
484 | return Iterator(Object, | ||
485 | lib.eolian_state_objects_by_file_get(self._obj, _str_to_bytes(file_name))) | ||
486 | |||
487 | @property | ||
468 | def classes(self): | 488 | def classes(self): |
469 | return Iterator(Class, lib.eolian_state_classes_get(self._obj)) | 489 | return Iterator(Class, lib.eolian_state_classes_get(self._obj)) |
470 | 490 | ||
diff --git a/src/scripts/pyolian/eolian_lib.py b/src/scripts/pyolian/eolian_lib.py index 26d631234c..e226bc1763 100644 --- a/src/scripts/pyolian/eolian_lib.py +++ b/src/scripts/pyolian/eolian_lib.py | |||
@@ -93,6 +93,18 @@ lib.eolian_state_unit_by_file_get.restype = c_void_p | |||
93 | lib.eolian_state_units_get.argtypes = [c_void_p,] | 93 | lib.eolian_state_units_get.argtypes = [c_void_p,] |
94 | lib.eolian_state_units_get.restype = c_void_p | 94 | lib.eolian_state_units_get.restype = c_void_p |
95 | 95 | ||
96 | # EAPI const Eolian_Object *eolian_state_object_by_name_get(const Eolian_State *state, const char *name); | ||
97 | lib.eolian_state_object_by_name_get.argtypes = [c_void_p, c_char_p] | ||
98 | lib.eolian_state_object_by_name_get.restype = c_void_p | ||
99 | |||
100 | # EAPI Eina_Iterator *eolian_state_objects_by_file_get(const Eolian_State *state, const char *file_name); | ||
101 | lib.eolian_state_object_by_file_get.argtypes = [c_void_p, c_char_p] | ||
102 | lib.eolian_state_object_by_file_get.restype = c_void_p | ||
103 | |||
104 | # EAPI Eina_Iterator *eolian_state_objects_get(const Eolian_State *state); | ||
105 | lib.eolian_state_objects_get.argtypes = [c_void_p] | ||
106 | lib.eolian_state_objects_get.restype = c_void_p | ||
107 | |||
96 | # EAPI const Eolian_Class *eolian_state_class_by_name_get(const Eolian_State *state, const char *class_name); | 108 | # EAPI const Eolian_Class *eolian_state_class_by_name_get(const Eolian_State *state, const char *class_name); |
97 | lib.eolian_state_class_by_name_get.argtypes = [c_void_p, c_char_p] | 109 | lib.eolian_state_class_by_name_get.argtypes = [c_void_p, c_char_p] |
98 | lib.eolian_state_class_by_name_get.restype = c_void_p | 110 | lib.eolian_state_class_by_name_get.restype = c_void_p |
@@ -175,6 +187,14 @@ lib.eolian_unit_children_get.restype = c_void_p | |||
175 | lib.eolian_unit_file_get.argtypes = [c_void_p,] | 187 | lib.eolian_unit_file_get.argtypes = [c_void_p,] |
176 | lib.eolian_unit_file_get.restype = c_char_p | 188 | lib.eolian_unit_file_get.restype = c_char_p |
177 | 189 | ||
190 | # EAPI const Eolian_Object *eolian_unit_object_by_name_get(const Eolian_Unit *unit, const char *name); | ||
191 | lib.eolian_unit_object_by_name_get.argtypes = [c_void_p, c_char_p] | ||
192 | lib.eolian_unit_object_by_name_get.restype = c_void_p | ||
193 | |||
194 | # EAPI Eina_Iterator *eolian_unit_objects_get(const Eolian_Unit *unit); | ||
195 | lib.eolian_unit_objects_get.argtypes = [c_void_p] | ||
196 | lib.eolian_unit_objects_get.restype = c_void_p | ||
197 | |||
178 | # EAPI const Eolian_Class *eolian_unit_class_by_name_get(const Eolian_Unit *unit, const char *class_name); | 198 | # EAPI const Eolian_Class *eolian_unit_class_by_name_get(const Eolian_Unit *unit, const char *class_name); |
179 | lib.eolian_unit_class_by_name_get.argtypes = [c_void_p, c_char_p] | 199 | lib.eolian_unit_class_by_name_get.argtypes = [c_void_p, c_char_p] |
180 | lib.eolian_unit_class_by_name_get.restype = c_void_p | 200 | lib.eolian_unit_class_by_name_get.restype = c_void_p |