summaryrefslogtreecommitdiff
path: root/src/scripts/pyolian/eolian.py
diff options
context:
space:
mode:
authorDaniel Kolesa <d.kolesa@osg.samsung.com>2018-03-08 23:01:01 +0100
committerDaniel Kolesa <d.kolesa@osg.samsung.com>2018-03-08 23:01:01 +0100
commitf24fa691e7c25ed6779f78affcbfe7310fa85dda (patch)
tree73b5681b029c4451aca3d49eb51bf0d7376258a0 /src/scripts/pyolian/eolian.py
parentb58c901d2d59ec5e55e85c896f6b1712e81dc51a (diff)
pyolian: wipe out declaration api
Diffstat (limited to 'src/scripts/pyolian/eolian.py')
-rw-r--r--src/scripts/pyolian/eolian.py50
1 files changed, 0 insertions, 50 deletions
diff --git a/src/scripts/pyolian/eolian.py b/src/scripts/pyolian/eolian.py
index 0693ebae05..db4b35fad0 100644
--- a/src/scripts/pyolian/eolian.py
+++ b/src/scripts/pyolian/eolian.py
@@ -53,7 +53,6 @@ class Eolian_Object_Type(IntEnum):
53 IMPLEMENT = 12 53 IMPLEMENT = 12
54 CONSTRUCTOR = 13 54 CONSTRUCTOR = 13
55 DOCUMENTATION = 14 55 DOCUMENTATION = 14
56 DECLARATION = 15
57 56
58class Eolian_Function_Type(IntEnum): 57class Eolian_Function_Type(IntEnum):
59 UNRESOLVED = 0 58 UNRESOLVED = 0
@@ -225,14 +224,6 @@ class Eolian_Unary_Operator(IntEnum):
225 NOT = 3 # ! int, float, bool 224 NOT = 3 # ! int, float, bool
226 BNOT = 4 # ~ int 225 BNOT = 4 # ~ int
227 226
228class Eolian_Declaration_Type(IntEnum):
229 UNKNOWN = 0
230 CLASS = 1
231 ALIAS = 2
232 STRUCT = 3
233 ENUM = 4
234 VAR = 5
235
236class Eolian_Doc_Token_Type(IntEnum): 227class Eolian_Doc_Token_Type(IntEnum):
237 UNKNOWN = 0 228 UNKNOWN = 0
238 TEXT = 1 229 TEXT = 1
@@ -425,19 +416,6 @@ class Eolian_Unit(EolianBaseObject):
425 def namespace_get_by_name(self, name): 416 def namespace_get_by_name(self, name):
426 return Namespace(self, name) 417 return Namespace(self, name)
427 418
428 @property
429 def all_declarations(self):
430 return Iterator(Declaration, lib.eolian_all_declarations_get(self._obj))
431
432 def declaration_get_by_name(self, name):
433 c_decl = lib.eolian_declaration_get_by_name(self._obj, _str_to_bytes(name))
434 return Declaration(c_decl) if c_decl else None
435
436 def declarations_get_by_file(self, fname):
437 return Iterator(Declaration,
438 lib.eolian_declarations_get_by_file(self._obj, _str_to_bytes(fname)))
439
440
441class Eolian_State(Eolian_Unit): 419class Eolian_State(Eolian_Unit):
442 def __init__(self): 420 def __init__(self):
443 self._obj = lib.eolian_state_new() # Eolian_State * 421 self._obj = lib.eolian_state_new() # Eolian_State *
@@ -1458,34 +1436,6 @@ class Variable(Object):
1458 return Documentation(c_doc) if c_doc else None 1436 return Documentation(c_doc) if c_doc else None
1459 1437
1460 1438
1461class Declaration(Object):
1462 def __repr__(self):
1463 return "<eolian.Declaration '{0.name}'>".format(self)
1464
1465 @cached_property
1466 def name(self):
1467 return _str_to_py(lib.eolian_declaration_name_get(self._obj))
1468
1469 @cached_property
1470 def type(self):
1471 return Eolian_Declaration_Type(lib.eolian_declaration_type_get(self._obj))
1472
1473 @cached_property
1474 def class_(self):
1475 c_cls = lib.eolian_declaration_class_get(self._obj)
1476 return Class(c_cls) if c_cls else None
1477
1478 @cached_property
1479 def data_type(self):
1480 c_typedec = lib.eolian_declaration_data_type_get(self._obj)
1481 return Typedecl(c_typedec) if c_typedec else None
1482
1483 @cached_property
1484 def variable(self):
1485 c_var = lib.eolian_declaration_variable_get(self._obj)
1486 return Variable(c_var) if c_var else None
1487
1488
1489class _Eolian_Doc_Token_Struct(ctypes.Structure): 1439class _Eolian_Doc_Token_Struct(ctypes.Structure):
1490 _fields_ = [("type", c_int), 1440 _fields_ = [("type", c_int),
1491 ("text", c_char_p), 1441 ("text", c_char_p),