diff options
author | Daniel Kolesa <d.kolesa@osg.samsung.com> | 2018-03-16 14:25:44 +0100 |
---|---|---|
committer | Daniel Kolesa <d.kolesa@osg.samsung.com> | 2018-03-16 14:26:15 +0100 |
commit | bf1e3a702fa807d9773c9fa5f0ed93634afc8c07 (patch) | |
tree | e4b9cb1295c0bf3f44b0ae385f38570005514c16 /src/scripts | |
parent | 47ac8689f1372639f410a2e2f612c62db612d143 (diff) |
eolian: event/function_get_by_name -> by_name_get
Diffstat (limited to 'src/scripts')
-rw-r--r-- | src/scripts/elua/apps/docgen/doctree.lua | 4 | ||||
-rw-r--r-- | src/scripts/pyolian/eolian.py | 8 | ||||
-rw-r--r-- | src/scripts/pyolian/eolian_lib.py | 12 | ||||
-rwxr-xr-x | src/scripts/pyolian/test_eolian.py | 14 |
4 files changed, 19 insertions, 19 deletions
diff --git a/src/scripts/elua/apps/docgen/doctree.lua b/src/scripts/elua/apps/docgen/doctree.lua index bad0e68637..f5657d5bfc 100644 --- a/src/scripts/elua/apps/docgen/doctree.lua +++ b/src/scripts/elua/apps/docgen/doctree.lua | |||
@@ -253,12 +253,12 @@ M.Class = Node:clone { | |||
253 | return ret | 253 | return ret |
254 | end, | 254 | end, |
255 | 255 | ||
256 | function_get_by_name = function(self, fn, ft) | 256 | function_by_name_get = function(self, fn, ft) |
257 | local fun = self._cache_func | 257 | local fun = self._cache_func |
258 | if fun then | 258 | if fun then |
259 | return fun | 259 | return fun |
260 | end | 260 | end |
261 | fun = M.Function(self._obj:function_get_by_name(fn, ft)) | 261 | fun = M.Function(self._obj:function_by_name_get(fn, ft)) |
262 | self._cache_func = fun | 262 | self._cache_func = fun |
263 | return fun | 263 | return fun |
264 | end, | 264 | end, |
diff --git a/src/scripts/pyolian/eolian.py b/src/scripts/pyolian/eolian.py index 0dc9b68a02..56b79134c1 100644 --- a/src/scripts/pyolian/eolian.py +++ b/src/scripts/pyolian/eolian.py | |||
@@ -659,8 +659,8 @@ class Class(Object): | |||
659 | def events(self): | 659 | def events(self): |
660 | return Iterator(Event, lib.eolian_class_events_get(self._obj)) | 660 | return Iterator(Event, lib.eolian_class_events_get(self._obj)) |
661 | 661 | ||
662 | def event_get_by_name(self, event_name): | 662 | def event_by_name_get(self, event_name): |
663 | c_event = lib.eolian_class_event_get_by_name(self._obj, | 663 | c_event = lib.eolian_class_event_by_name_get(self._obj, |
664 | _str_to_bytes(event_name)) | 664 | _str_to_bytes(event_name)) |
665 | return Event(c_event) if c_event else None | 665 | return Event(c_event) if c_event else None |
666 | 666 | ||
@@ -703,9 +703,9 @@ class Class(Object): | |||
703 | def dtor_enable(self): | 703 | def dtor_enable(self): |
704 | return bool(lib.eolian_class_dtor_enable_get(self._obj)) | 704 | return bool(lib.eolian_class_dtor_enable_get(self._obj)) |
705 | 705 | ||
706 | def function_get_by_name(self, func_name, | 706 | def function_by_name_get(self, func_name, |
707 | ftype=Eolian_Function_Type.UNRESOLVED): | 707 | ftype=Eolian_Function_Type.UNRESOLVED): |
708 | f = lib.eolian_class_function_get_by_name(self._obj, | 708 | f = lib.eolian_class_function_by_name_get(self._obj, |
709 | _str_to_bytes(func_name), | 709 | _str_to_bytes(func_name), |
710 | ftype) | 710 | ftype) |
711 | return Function(f) if f else None | 711 | return Function(f) if f else None |
diff --git a/src/scripts/pyolian/eolian_lib.py b/src/scripts/pyolian/eolian_lib.py index 66ecccc487..99d862a8de 100644 --- a/src/scripts/pyolian/eolian_lib.py +++ b/src/scripts/pyolian/eolian_lib.py | |||
@@ -251,9 +251,9 @@ lib.eolian_class_inherits_get.restype = c_void_p | |||
251 | lib.eolian_class_functions_get.argtypes = [c_void_p, c_int] | 251 | lib.eolian_class_functions_get.argtypes = [c_void_p, c_int] |
252 | lib.eolian_class_functions_get.restype = c_void_p | 252 | lib.eolian_class_functions_get.restype = c_void_p |
253 | 253 | ||
254 | # EAPI const Eolian_Function *eolian_class_function_get_by_name(const Eolian_Class *klass, const char *func_name, Eolian_Function_Type f_type); | 254 | # EAPI const Eolian_Function *eolian_class_function_by_name_get(const Eolian_Class *klass, const char *func_name, Eolian_Function_Type f_type); |
255 | lib.eolian_class_function_get_by_name.argtypes = [c_void_p, c_char_p, c_int] | 255 | lib.eolian_class_function_by_name_get.argtypes = [c_void_p, c_char_p, c_int] |
256 | lib.eolian_class_function_get_by_name.restype = c_void_p | 256 | lib.eolian_class_function_by_name_get.restype = c_void_p |
257 | 257 | ||
258 | # EAPI Eina_Iterator *eolian_class_implements_get(const Eolian_Class *klass); | 258 | # EAPI Eina_Iterator *eolian_class_implements_get(const Eolian_Class *klass); |
259 | lib.eolian_class_implements_get.argtypes = [c_void_p,] | 259 | lib.eolian_class_implements_get.argtypes = [c_void_p,] |
@@ -271,9 +271,9 @@ lib.eolian_class_events_get.restype = c_void_p | |||
271 | lib.eolian_class_parts_get.argtypes = [c_void_p,] | 271 | lib.eolian_class_parts_get.argtypes = [c_void_p,] |
272 | lib.eolian_class_parts_get.restype = c_void_p | 272 | lib.eolian_class_parts_get.restype = c_void_p |
273 | 273 | ||
274 | # EAPI const Eolian_Event *eolian_class_event_get_by_name(const Eolian_Class *klass, const char *event_name); | 274 | # EAPI const Eolian_Event *eolian_class_event_by_name_get(const Eolian_Class *klass, const char *event_name); |
275 | lib.eolian_class_event_get_by_name.argtypes = [c_void_p, c_char_p] | 275 | lib.eolian_class_event_by_name_get.argtypes = [c_void_p, c_char_p] |
276 | lib.eolian_class_event_get_by_name.restype = c_void_p | 276 | lib.eolian_class_event_by_name_get.restype = c_void_p |
277 | 277 | ||
278 | # EAPI Eina_Bool eolian_class_ctor_enable_get(const Eolian_Class *klass); | 278 | # EAPI Eina_Bool eolian_class_ctor_enable_get(const Eolian_Class *klass); |
279 | lib.eolian_class_ctor_enable_get.argtypes = [c_void_p,] | 279 | lib.eolian_class_ctor_enable_get.argtypes = [c_void_p,] |
diff --git a/src/scripts/pyolian/test_eolian.py b/src/scripts/pyolian/test_eolian.py index 8740837f39..5a22ed83df 100755 --- a/src/scripts/pyolian/test_eolian.py +++ b/src/scripts/pyolian/test_eolian.py | |||
@@ -326,7 +326,7 @@ class TestEolianClass(unittest.TestCase): | |||
326 | class TestEolianFunction(unittest.TestCase): | 326 | class TestEolianFunction(unittest.TestCase): |
327 | def test_function(self): | 327 | def test_function(self): |
328 | cls = eolian_db.class_by_name_get('Efl.Loop.Timer') | 328 | cls = eolian_db.class_by_name_get('Efl.Loop.Timer') |
329 | f = cls.function_get_by_name('delay') | 329 | f = cls.function_by_name_get('delay') |
330 | self.assertIsInstance(f, eolian.Function) | 330 | self.assertIsInstance(f, eolian.Function) |
331 | self.assertEqual(f.name, 'delay') | 331 | self.assertEqual(f.name, 'delay') |
332 | self.assertEqual(f.type, eolian.Eolian_Function_Type.METHOD) | 332 | self.assertEqual(f.type, eolian.Eolian_Function_Type.METHOD) |
@@ -357,7 +357,7 @@ class TestEolianFunction(unittest.TestCase): | |||
357 | 357 | ||
358 | def test_function_parameter(self): | 358 | def test_function_parameter(self): |
359 | cls = eolian_db.class_by_name_get('Efl.Loop.Timer') | 359 | cls = eolian_db.class_by_name_get('Efl.Loop.Timer') |
360 | f = cls.function_get_by_name('delay') | 360 | f = cls.function_by_name_get('delay') |
361 | p = list(f.parameters)[0] | 361 | p = list(f.parameters)[0] |
362 | self.assertEqual(p.direction, eolian.Eolian_Parameter_Dir.IN) | 362 | self.assertEqual(p.direction, eolian.Eolian_Parameter_Dir.IN) |
363 | self.assertEqual(p.name, 'add') | 363 | self.assertEqual(p.name, 'add') |
@@ -372,7 +372,7 @@ class TestEolianFunction(unittest.TestCase): | |||
372 | class TestEolianImplement(unittest.TestCase): | 372 | class TestEolianImplement(unittest.TestCase): |
373 | def test_implement(self): | 373 | def test_implement(self): |
374 | cls = eolian_db.class_by_name_get('Efl.Loop.Timer') | 374 | cls = eolian_db.class_by_name_get('Efl.Loop.Timer') |
375 | f = cls.function_get_by_name('delay') | 375 | f = cls.function_by_name_get('delay') |
376 | im = f.implement | 376 | im = f.implement |
377 | self.assertIsInstance(im, eolian.Implement) | 377 | self.assertIsInstance(im, eolian.Implement) |
378 | self.assertEqual(im.full_name, 'Efl.Loop.Timer.delay') | 378 | self.assertEqual(im.full_name, 'Efl.Loop.Timer.delay') |
@@ -392,7 +392,7 @@ class TestEolianEvent(unittest.TestCase): | |||
392 | def test_event(self): | 392 | def test_event(self): |
393 | cls = eolian_db.class_by_name_get('Efl.Loop.Timer') | 393 | cls = eolian_db.class_by_name_get('Efl.Loop.Timer') |
394 | self.assertEqual([e.name for e in cls.events], ['tick']) | 394 | self.assertEqual([e.name for e in cls.events], ['tick']) |
395 | ev = cls.event_get_by_name('tick') | 395 | ev = cls.event_by_name_get('tick') |
396 | self.assertIsInstance(ev, eolian.Event) | 396 | self.assertIsInstance(ev, eolian.Event) |
397 | self.assertEqual(ev.name, 'tick') | 397 | self.assertEqual(ev.name, 'tick') |
398 | self.assertEqual(ev.c_name, 'EFL_LOOP_TIMER_EVENT_TICK') | 398 | self.assertEqual(ev.c_name, 'EFL_LOOP_TIMER_EVENT_TICK') |
@@ -535,7 +535,7 @@ class TestEolianTypedecl(unittest.TestCase): | |||
535 | class TestEolianType(unittest.TestCase): | 535 | class TestEolianType(unittest.TestCase): |
536 | def test_type_regular_builtin(self): | 536 | def test_type_regular_builtin(self): |
537 | cls = eolian_db.class_by_name_get('Efl.Loop.Timer') | 537 | cls = eolian_db.class_by_name_get('Efl.Loop.Timer') |
538 | func = cls.function_get_by_name('delay') | 538 | func = cls.function_by_name_get('delay') |
539 | param = list(func.parameters)[0] | 539 | param = list(func.parameters)[0] |
540 | t = param.type # type: double | 540 | t = param.type # type: double |
541 | self.assertIsInstance(t, eolian.Type) | 541 | self.assertIsInstance(t, eolian.Type) |
@@ -560,7 +560,7 @@ class TestEolianType(unittest.TestCase): | |||
560 | 560 | ||
561 | def test_type_regular(self): | 561 | def test_type_regular(self): |
562 | cls = eolian_db.class_by_name_get('Efl.Gfx') | 562 | cls = eolian_db.class_by_name_get('Efl.Gfx') |
563 | func = cls.function_get_by_name('geometry') | 563 | func = cls.function_by_name_get('geometry') |
564 | param = list(func.setter_values)[0] | 564 | param = list(func.setter_values)[0] |
565 | t = param.type # type: Eina.Rect | 565 | t = param.type # type: Eina.Rect |
566 | self.assertIsInstance(t, eolian.Type) | 566 | self.assertIsInstance(t, eolian.Type) |
@@ -584,7 +584,7 @@ class TestEolianType(unittest.TestCase): | |||
584 | 584 | ||
585 | def test_type_class(self): | 585 | def test_type_class(self): |
586 | cls = eolian_db.class_by_name_get('Efl.Content') | 586 | cls = eolian_db.class_by_name_get('Efl.Content') |
587 | func = cls.function_get_by_name('content') | 587 | func = cls.function_by_name_get('content') |
588 | param = list(func.setter_values)[0] | 588 | param = list(func.setter_values)[0] |
589 | t = param.type # type: Efl.Gfx (class interface) | 589 | t = param.type # type: Efl.Gfx (class interface) |
590 | self.assertIsInstance(t, eolian.Type) | 590 | self.assertIsInstance(t, eolian.Type) |