Esempio n. 1
0
    def focus(self):
        """The module associated with the current focus.

        The Python equivalent of the CLIPS get-focus function.

        """
        return Module(self._env, lib.EnvGetFocus(self._env))
Esempio n. 2
0
    def module(self) -> Module:
        """The module in which the Class is defined.

        Equivalent to the CLIPS (defclass-module) function.

        """
        name = ffi.string(lib.DefclassModule(self._ptr())).decode()

        return Module(self._env, name)
Esempio n. 3
0
    def module(self) -> Module:
        """The module in which the DefinedInstances is defined.

        Python equivalent of the CLIPS (definstances-module) command.

        """
        name = ffi.string(lib.DefinstancesModule(self._ptr())).decode()

        return Module(self._env, name)
Esempio n. 4
0
    def focus(self) -> Module:
        """The module associated with the current focus.

        Equivalent to the CLIPS (get-focus) function.

        """
        name = ffi.string(lib.DefmoduleName(lib.GetFocus(self._env))).decode()

        return Module(self._env, name)
Esempio n. 5
0
    def module(self) -> Module:
        """The module in which the Generic is defined.

        Equivalent to the CLIPS (defgeneric-module) generics.

        """
        name = ffi.string(lib.DefgenericModule(self._ptr())).decode()

        return Module(self._env, name)
Esempio n. 6
0
    def module(self):
        """The module in which the Rule is defined.

        Python equivalent of the CLIPS defrule-module command.

        """
        modname = ffi.string(lib.EnvDefruleModule(self._env, self._rule))
        defmodule = lib.EnvFindDefmodule(self._env, modname)

        return Module(self._env, defmodule)
Esempio n. 7
0
    def module(self):
        """The module in which the Function is defined.

        Python equivalent of the CLIPS deffunction-module command.

        """
        modname = ffi.string(lib.EnvDeffunctionModule(self._env, self._fnc))
        defmodule = lib.EnvFindDefmodule(self._env, modname)

        return Module(self._env, defmodule)
Esempio n. 8
0
    def module(self):
        """The module in which the Class is defined.

        Python equivalent of the CLIPS defglobal-module command.

        """
        modname = ffi.string(lib.EnvDefclassModule(self._env, self._cls))
        defmodule = lib.EnvFindDefmodule(self._env, modname)

        return Module(self._env, defmodule)
Esempio n. 9
0
    def module(self):
        modname = ffi.string(lib.EnvDefgenericModule(self._env, self._gnc))
        defmodule = lib.EnvFindDefmodule(self._env, modname)

        return Module(self._env, defmodule)