if isinstance(other, EolianBaseObject):
return self._obj.value == other._obj.value
elif isinstance(other, str):
- if hasattr(self, 'full_name'):
- return self.full_name == other
- elif hasattr(self, 'name'):
+ if hasattr(self, 'name'):
return self.name == other
+ elif hasattr(self, 'short_name'):
+ return self.short_name == other
return False
def __gt__(self, other):
if isinstance(other, EolianBaseObject):
- if hasattr(self, 'full_name'):
- return self.full_name > other.full_name
- elif hasattr(self, 'name'):
+ if hasattr(self, 'name'):
return self.name > other.name
+ elif hasattr(self, 'short_name'):
+ return self.short_name > other.short_name
def __hash__(self):
return self._obj.value
return _str_to_py(lib.eolian_object_name_get(self._obj))
@cached_property
+ def short_name(self):
+ return _str_to_py(lib.eolian_object_short_name_get(self._obj))
+
+ @property
+ def namespaces(self):
+ return Iterator(_str_to_py, lib.eolian_object_namespaces_get(self._obj))
+
+ @cached_property
+ def namespace(self):
+ return '.'.join(self.namespaces)
+
+ @cached_property
def file(self):
return _str_to_py(lib.eolian_object_file_get(self._obj))
class Class(Object):
def __repr__(self):
- return "<eolian.Class '{0.full_name}', {0.type!s}>".format(self)
-
- @cached_property
- def name(self):
- return _str_to_py(lib.eolian_class_name_get(self._obj))
-
- @cached_property
- def full_name(self):
- return _str_to_py(lib.eolian_class_full_name_get(self._obj))
+ return "<eolian.Class '{0.name}', {0.type!s}>".format(self)
@cached_property
def c_name(self):
if len(inherits) > 0:
return inherits[0]
- @property
- def namespaces(self):
- return Iterator(_str_to_py, lib.eolian_class_namespaces_get(self._obj))
-
- @cached_property
- def namespace(self):
- return '.'.join(self.namespaces)
-
@cached_property
def ctor_enable(self):
return bool(lib.eolian_class_ctor_enable_get(self._obj))
return "<eolian.Part '{0.name}'>".format(self)
@cached_property
- def name(self):
- return _str_to_py(lib.eolian_part_name_get(self._obj))
-
- @cached_property
def class_(self):
return Class(lib.eolian_part_class_get(self._obj))
class Constructor(Object):
def __repr__(self):
- return "<eolian.Constructor '{0.full_name}', optional={0.is_optional}>".format(self)
-
- @cached_property
- def full_name(self):
- return _str_to_py(lib.eolian_constructor_full_name_get(self._obj))
+ return "<eolian.Constructor '{0.name}', optional={0.is_optional}>".format(self)
@cached_property
def function(self):
return "<eolian.Event '{0.name}', c_name='{0.c_name}'>".format(self)
@cached_property
- def name(self):
- return _str_to_py(lib.eolian_event_name_get(self._obj))
-
- @cached_property
def c_name(self):
s = lib.eolian_event_c_name_get(self._obj)
ret = _str_to_py(s)
def __repr__(self):
return "<eolian.Function '{0.name}'>".format(self)
- @cached_property
- def name(self):
- return _str_to_py(lib.eolian_function_name_get(self._obj))
-
def full_c_name_get(self, ftype, use_legacy=False):
s = lib.eolian_function_full_c_name_get(self._obj, ftype, use_legacy)
ret = _str_to_py(s)
" optional={0.is_optional}, nullable={0.is_nullable}>".format(self)
@cached_property
- def name(self):
- return _str_to_py(lib.eolian_parameter_name_get(self._obj))
-
- @cached_property
def direction(self):
return Eolian_Parameter_Dir(lib.eolian_parameter_direction_get(self._obj))
class Implement(Object):
def __repr__(self):
- return "<eolian.Implement '{0.full_name}'>".format(self)
-
- @cached_property
- def full_name(self):
- return _str_to_py(lib.eolian_implement_full_name_get(self._obj))
+ return "<eolian.Implement '{0.name}'>".format(self)
@cached_property
def class_(self):
class Type(Object):
def __repr__(self):
- # return "<eolian.Type '{0.full_name}', type: {0.type!s}, c_type: '{0.c_type}'>".format(self)
- return "<eolian.Type '{0.full_name}', type={0.type!s}>".format(self)
-
- @cached_property
- def name(self):
- return _str_to_py(lib.eolian_type_name_get(self._obj))
-
- @cached_property
- def full_name(self):
- return _str_to_py(lib.eolian_type_full_name_get(self._obj))
-
- @property
- def namespaces(self):
- return Iterator(_str_to_py, lib.eolian_type_namespaces_get(self._obj))
-
- @cached_property
- def namespace(self):
- return '.'.join(self.namespaces)
+ # return "<eolian.Type '{0.name}', type: {0.type!s}, c_type: '{0.c_type}'>".format(self)
+ return "<eolian.Type '{0.name}', type={0.type!s}>".format(self)
@cached_property
def free_func(self):
class Typedecl(Object):
def __repr__(self):
- return "<eolian.Typedecl '{0.full_name}', type={0.type!s}>".format(self)
-
- @cached_property
- def name(self):
- return _str_to_py(lib.eolian_typedecl_name_get(self._obj))
-
- @cached_property
- def full_name(self):
- return _str_to_py(lib.eolian_typedecl_full_name_get(self._obj))
+ return "<eolian.Typedecl '{0.name}', type={0.type!s}>".format(self)
@cached_property
def type(self):
lib.eina_stringshare_del(c_void_p(s))
return ret
- @property
- def namespaces(self):
- return Iterator(_str_to_py, lib.eolian_typedecl_namespaces_get(self._obj))
-
- @cached_property
- def namespace(self):
- return '.'.join(self.namespaces)
-
@cached_property
def free_func(self):
return _str_to_py(lib.eolian_typedecl_free_func_get(self._obj))
return "<eolian.Enum_Type_Field '{0.name}', c_name='{0.c_name}'>".format(self)
@cached_property
- def name(self):
- return _str_to_py(lib.eolian_typedecl_enum_field_name_get(self._obj))
-
- @cached_property
def c_name(self):
s = lib.eolian_typedecl_enum_field_c_name_get(self._obj)
ret = _str_to_py(s)
return "<eolian.Struct_Type_Field '{0.name}', type={0.type!s}>".format(self)
@cached_property
- def name(self):
- return _str_to_py(lib.eolian_typedecl_struct_field_name_get(self._obj))
-
- @cached_property
def type(self):
c_type = lib.eolian_typedecl_struct_field_type_get(self._obj)
return Type(c_type) if c_type else None
class Variable(Object):
def __repr__(self):
- return "<eolian.Variable '{0.full_name}', type={0.type!s}, file={0.file}>".format(self)
-
- @cached_property
- def name(self):
- return _str_to_py(lib.eolian_variable_name_get(self._obj))
-
- @cached_property
- def full_name(self):
- return _str_to_py(lib.eolian_variable_full_name_get(self._obj))
-
- @property
- def namespaces(self):
- return Iterator(_str_to_py, lib.eolian_variable_namespaces_get(self._obj))
-
- @cached_property
- def namespace(self):
- return '.'.join(self.namespaces)
+ return "<eolian.Variable '{0.name}', type={0.type!s}, file={0.file}>".format(self)
@cached_property
def type(self):
lib.eolian_object_name_get.argtypes = [c_void_p]
lib.eolian_object_name_get.restype = c_char_p
-### Eolian_Class ############################################################
-
-# EAPI Eina_Stringshare *eolian_class_full_name_get(const Eolian_Class *klass);
-lib.eolian_class_full_name_get.argtypes = [c_void_p,]
-lib.eolian_class_full_name_get.restype = c_char_p
+# EAPI const char *eolian_object_short_name_get(const Eolian_Object *obj);
+lib.eolian_object_short_name_get.argtypes = [c_void_p]
+lib.eolian_object_short_name_get.restype = c_char_p
-# EAPI Eina_Stringshare *eolian_class_name_get(const Eolian_Class *klass);
-lib.eolian_class_name_get.argtypes = [c_void_p,]
-lib.eolian_class_name_get.restype = c_char_p
+# EAPI Eina_Iterator *eolian_object_namespaces_get(const Eolian_Object *obj);
+lib.eolian_object_namespaces_get.argtypes = [c_void_p]
+lib.eolian_object_namespaces_get.restype = c_void_p
-# EAPI Eina_Iterator *eolian_class_namespaces_get(const Eolian_Class *klass);
-lib.eolian_class_namespaces_get.argtypes = [c_void_p,]
-lib.eolian_class_namespaces_get.restype = c_void_p
+### Eolian_Class ############################################################
# EAPI Eolian_Class_Type eolian_class_type_get(const Eolian_Class *klass);
lib.eolian_class_type_get.argtypes = [c_void_p,]
lib.eolian_function_scope_get.argtypes = [c_void_p, c_int]
lib.eolian_function_scope_get.restype = c_int
-# EAPI Eina_Stringshare *eolian_function_name_get(const Eolian_Function *function_id);
-lib.eolian_function_name_get.argtypes = [c_void_p,]
-lib.eolian_function_name_get.restype = c_char_p
-
# EAPI Eina_Stringshare *eolian_function_full_c_name_get(const Eolian_Function *function_id, Eolian_Function_Type ftype, Eina_Bool use_legacy);
lib.eolian_function_full_c_name_get.argtypes = [c_void_p, c_int, c_bool]
lib.eolian_function_full_c_name_get.restype = c_void_p # Stringshare TO BE FREED
lib.eolian_parameter_default_value_get.argtypes = [c_void_p,]
lib.eolian_parameter_default_value_get.restype = c_void_p
-# EAPI Eina_Stringshare *eolian_parameter_name_get(const Eolian_Function_Parameter *param);
-lib.eolian_parameter_name_get.argtypes = [c_void_p,]
-lib.eolian_parameter_name_get.restype = c_char_p
-
# EAPI const Eolian_Documentation *eolian_parameter_documentation_get(const Eolian_Function_Parameter *param);
lib.eolian_parameter_documentation_get.argtypes = [c_void_p,]
lib.eolian_parameter_documentation_get.restype = c_void_p
### Eolian_Implement ########################################################
-# EAPI Eina_Stringshare *eolian_implement_full_name_get(const Eolian_Implement *impl);
-lib.eolian_implement_full_name_get.argtypes = [c_void_p,]
-lib.eolian_implement_full_name_get.restype = c_char_p
-
# EAPI const Eolian_Class *eolian_implement_class_get(const Eolian_Implement *impl);
lib.eolian_implement_class_get.argtypes = [c_void_p,]
lib.eolian_implement_class_get.restype = c_void_p
### Eolian_Constructor ######################################################
-# EAPI Eina_Stringshare *eolian_constructor_full_name_get(const Eolian_Constructor *ctor);
-lib.eolian_constructor_full_name_get.argtypes = [c_void_p,]
-lib.eolian_constructor_full_name_get.restype = c_char_p
-
# EAPI const Eolian_Class *eolian_constructor_class_get(const Eolian_Constructor *ctor);
lib.eolian_constructor_class_get.argtypes = [c_void_p,]
lib.eolian_constructor_class_get.restype = c_void_p
### Eolian_Event ############################################################
-# EAPI Eina_Stringshare *eolian_event_name_get(const Eolian_Event *event);
-lib.eolian_event_name_get.argtypes = [c_void_p,]
-lib.eolian_event_name_get.restype = c_char_p
-
# EAPI Eina_Stringshare *eolian_event_c_name_get(const Eolian_Event *event);
lib.eolian_event_c_name_get.argtypes = [c_void_p,]
lib.eolian_event_c_name_get.restype = c_void_p # Stringshare TO BE FREED
### Eolian_Part #############################################################
-# EAPI Eina_Stringshare *eolian_part_name_get(const Eolian_Part *part);
-lib.eolian_part_name_get.argtypes = [c_void_p,]
-lib.eolian_part_name_get.restype = c_char_p
-
# EAPI const Eolian_Class *eolian_part_class_get(const Eolian_Part *part);
lib.eolian_part_class_get.argtypes = [c_void_p,]
lib.eolian_part_class_get.restype = c_void_p
lib.eolian_typedecl_struct_field_get.argtypes = [c_void_p, c_char_p]
lib.eolian_typedecl_struct_field_get.restype = c_void_p
-# EAPI Eina_Stringshare *eolian_typedecl_struct_field_name_get(const Eolian_Struct_Type_Field *fl);
-lib.eolian_typedecl_struct_field_name_get.argtypes = [c_void_p,]
-lib.eolian_typedecl_struct_field_name_get.restype = c_char_p
-
# EAPI const Eolian_Documentation *eolian_typedecl_struct_field_documentation_get(const Eolian_Struct_Type_Field *fl);
lib.eolian_typedecl_struct_field_documentation_get.argtypes = [c_void_p,]
lib.eolian_typedecl_struct_field_documentation_get.restype = c_void_p
lib.eolian_typedecl_enum_field_get.argtypes = [c_void_p, c_char_p]
lib.eolian_typedecl_enum_field_get.restype = c_void_p
-# EAPI Eina_Stringshare *eolian_typedecl_enum_field_name_get(const Eolian_Enum_Type_Field *fl);
-lib.eolian_typedecl_enum_field_name_get.argtypes = [c_void_p,]
-lib.eolian_typedecl_enum_field_name_get.restype = c_char_p
-
# EAPI Eina_Stringshare *eolian_typedecl_enum_field_c_name_get(const Eolian_Enum_Type_Field *fl);
lib.eolian_typedecl_enum_field_c_name_get.argtypes = [c_void_p,]
lib.eolian_typedecl_enum_field_c_name_get.restype = c_void_p # Stringshare TO BE FREED
lib.eolian_typedecl_c_type_get.argtypes = [c_void_p,]
lib.eolian_typedecl_c_type_get.restype = c_void_p # Stringshare TO BE FREED
-# EAPI Eina_Stringshare *eolian_typedecl_name_get(const Eolian_Typedecl *tp);
-lib.eolian_typedecl_name_get.argtypes = [c_void_p,]
-lib.eolian_typedecl_name_get.restype = c_char_p
-
-# EAPI Eina_Stringshare *eolian_typedecl_full_name_get(const Eolian_Typedecl *tp);
-lib.eolian_typedecl_full_name_get.argtypes = [c_void_p,]
-lib.eolian_typedecl_full_name_get.restype = c_char_p
-
-# EAPI Eina_Iterator *eolian_typedecl_namespaces_get(const Eolian_Typedecl *tp);
-lib.eolian_typedecl_namespaces_get.argtypes = [c_void_p,]
-lib.eolian_typedecl_namespaces_get.restype = c_void_p
-
# EAPI Eina_Stringshare *eolian_typedecl_free_func_get(const Eolian_Typedecl *tp);
lib.eolian_typedecl_free_func_get.argtypes = [c_void_p,]
lib.eolian_typedecl_free_func_get.restype = c_char_p
lib.eolian_type_c_type_get.argtypes = [c_void_p, c_int]
lib.eolian_type_c_type_get.restype = c_void_p # Stringshare TO BE FREED
-# EAPI Eina_Stringshare *eolian_type_name_get(const Eolian_Type *tp);
-lib.eolian_type_name_get.argtypes = [c_void_p,]
-lib.eolian_type_name_get.restype = c_char_p
-
-# EAPI Eina_Stringshare *eolian_type_full_name_get(const Eolian_Type *tp);
-lib.eolian_type_full_name_get.argtypes = [c_void_p,]
-lib.eolian_type_full_name_get.restype = c_char_p
-
-# EAPI Eina_Iterator *eolian_type_namespaces_get(const Eolian_Type *tp);
-lib.eolian_type_namespaces_get.argtypes = [c_void_p,]
-lib.eolian_type_namespaces_get.restype = c_void_p
-
# EAPI Eina_Stringshare *eolian_type_free_func_get(const Eolian_Type *tp);
lib.eolian_type_free_func_get.argtypes = [c_void_p,]
lib.eolian_type_free_func_get.restype = c_char_p
lib.eolian_variable_value_get.argtypes = [c_void_p,]
lib.eolian_variable_value_get.restype = c_void_p
-# EAPI Eina_Stringshare *eolian_variable_name_get(const Eolian_Variable *var);
-lib.eolian_variable_name_get.argtypes = [c_void_p,]
-lib.eolian_variable_name_get.restype = c_char_p
-
-# EAPI Eina_Stringshare *eolian_variable_full_name_get(const Eolian_Variable *var);
-lib.eolian_variable_full_name_get.argtypes = [c_void_p,]
-lib.eolian_variable_full_name_get.restype = c_char_p
-
-# EAPI Eina_Iterator *eolian_variable_namespaces_get(const Eolian_Variable *var);
-lib.eolian_variable_namespaces_get.argtypes = [c_void_p,]
-lib.eolian_variable_namespaces_get.restype = c_void_p
-
# EAPI Eina_Bool eolian_variable_is_extern(const Eolian_Variable *var);
lib.eolian_variable_is_extern.argtypes = [c_void_p,]
lib.eolian_variable_is_extern.restype = c_bool