コード例 #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))
コード例 #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)
コード例 #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)
コード例 #4
0
ファイル: agenda.py プロジェクト: noxdafox/clipspy
    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)
コード例 #5
0
ファイル: functions.py プロジェクト: noxdafox/clipspy
    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)
コード例 #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)
コード例 #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)
コード例 #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)
コード例 #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)