def __str__(self): string = ffi.string(lib.EnvGetDefglobalPPForm(self._env, self._glb)) return string.decode().rstrip('\n')
def description(self): buf = ffi.new('char[1024]') lib.EnvGetDefmethodDescription(self._env, buf, 1024, self._gnc, self._idx) return ffi.string(buf).decode()
def __repr__(self): string = lib.EnvGetDefrulePPForm(self._env, self._rule) return "%s: %s" % (self.__class__.__name__, ffi.string(string).decode())
def name(self): return ffi.string(lib.EnvGetDefgenericName(self._env, self._gnc)).decode()
def __str__(self): string = ffi.string( lib.EnvGetDefmethodPPForm(self._env, self._gnc, self._idx)) return string.decode().rstrip('\n')
def __str__(self): string = ffi.string(lib.EnvGetDeffunctionPPForm(self._env, self._fnc)) return string.decode().rstrip('\n')
def name(self): """Function name.""" return ffi.string(lib.EnvGetDeffunctionName(self._env, self._fnc)).decode()
def fact_pp_string(env, fact): buf = ffi.new('char[1024]') lib.EnvGetFactPPForm(env, buf, 1024, fact) return ffi.string(buf).decode()
def query_function(env: ffi.CData, name: ffi.CData, context: ffi.CData): router = ffi.from_handle(context) return bool(router.query(ffi.string(name).decode()))
def name(self): """Global name.""" return ffi.string(lib.EnvGetDefmoduleName(self._env, self._mdl)).decode()
def name(self): """Template name.""" return ffi.string(lib.EnvGetDeftemplateName(self._env, self._tpl)).decode()
def __repr__(self): module = lib.EnvGetDefmodulePPForm(self._env, self._mdl) strn = ffi.string(module).decode() if module != ffi.NULL else self.name return "%s: %s" % (self.__class__.__name__, strn)
def __str__(self): module = lib.EnvGetDefmodulePPForm(self._env, self._mdl) return ffi.string(module).decode() if module != ffi.NULL else self.name
def name(self): """Global name.""" return ffi.string(lib.EnvGetDefglobalName(self._env, self._glb)).decode()
def instance_pp_string(env, ist): buf = ffi.new('char[1024]') lib.EnvGetInstancePPForm(env, buf, 1024, ist) return ffi.string(buf).decode()
def __str__(self): strn = lib.EnvGetDefclassPPForm(self._env, self._cls) strn = ffi.string(strn).decode() if strn != ffi.NULL else self.name return strn.rstrip('\n')
def string_to_str(string): return ffi.string(lib.to_string(string)).decode()
def __repr__(self): strn = lib.EnvGetDefclassPPForm(self._env, self._cls) strn = ffi.string(strn).decode() if strn != ffi.NULL else self.name return "%s: %s" % (self.__class__.__name__, strn.rstrip('\n'))
def __repr__(self): string = ffi.string(lib.EnvGetDeffunctionPPForm(self._env, self._fnc)) return "%s: %s" % (self.__class__.__name__, string.decode().rstrip('\n'))
def name(self): """Class name.""" return ffi.string(lib.EnvGetDefclassName(self._env, self._cls)).decode()
def __str__(self): string = ffi.string(lib.EnvGetDefgenericPPForm(self._env, self._gnc)) return string.decode().rstrip('\n')
def name(self): """Instance name.""" return ffi.string(lib.EnvGetInstanceName(self._env, self._ist)).decode()
def module(self): modname = ffi.string(lib.EnvDefgenericModule(self._env, self._gnc)) defmodule = lib.EnvFindDefmodule(self._env, modname) return Module(self._env, defmodule)
def __str__(self): string = ffi.string(lib.EnvGetDefmessageHandlerPPForm( self._env, self._cls, self._idx)) return string.decode().rstrip('\n')
def __repr__(self): string = ffi.string( lib.EnvGetDefmethodPPForm(self._env, self._gnc, self._idx)) return "%s: %s" % (self.__class__.__name__, string.decode().rstrip('\n'))
def name(self): """MessageHandler name.""" return ffi.string(lib.EnvGetDefmessageHandlerName( self._env, self._cls, self._idx)).decode()
def __str__(self): return ffi.string( lib.EnvGetDefrulePPForm(self._env, self._rule)).decode()
def type(self): """MessageHandler type.""" return ffi.string(lib.EnvGetDefmessageHandlerType( self._env, self._cls, self._idx)).decode()
def name(self): """Rule name.""" return ffi.string(lib.EnvGetDefruleName(self._env, self._rule)).decode()
def __repr__(self): string = lib.DefrulePPForm(self._ptr()) string = ffi.string(string).decode() if string != ffi.NULL else '' return "%s: %s" % (self.__class__.__name__, ' '.join(string.split()))