Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## madkit.scheme
Class SchemeAgent

    java.lang.Object
      madkit.kernel.AbstractAgent
          madkit.kernel.Agent
              madkit.scheme.SchemeAgent

All Implemented Interfaces:
  java.io.Serializable, java.lang.Runnable

Direct Known Subclasses:
  EditSchemeAgent, LiveScheme

    public class SchemeAgent

extends Agent

A wrapper class for agents coded in Scheme with Kawa

See Also:
  Serialized Form

Field Summary
`protected Environment` | `env`
`static int` | `envcount`
`protected OutPort` | `err_p`
`static Scheme` | `interp`
`protected OutPort` | `out_p`

Constructor Summary
`SchemeAgent()` The constructor instantiates a new Scheme interpreter with a local environment and load the SchemeAgentLib glue
`SchemeAgent(java.io.File s)`
`SchemeAgent(java.lang.String s)` The constructor instantiates a new Scheme interpreter with a local environment and load the SchemeAgentLib glue

Method Summary
`void` | `activate()` Loads the Scheme agent code, then evaluates the activate function, if bounded
`void` | `doLaunchAgent(AbstractAgent a, java.lang.String n, boolean gui)`
`void` | `end()` Evaluates the end function, if bounded
`void` | `initGUI()` This method is called by the specific external graphic system (as the G-Box) to ask the agent to prepare a graphical interface.
`void` | `InternalDebug(java.lang.String g)`
`void` | `live()` Evaluates the live function, if bounded
`void` | `makeLaunchAgent(java.lang.String cl, java.lang.String n)` Java-Scheme glue code
`void` | `print(java.lang.Object o)`
`void` | `println(java.lang.Object o)`
`void` | `println(java.lang.String s)` Prints text information in a environment-independant way (GUI, console, ...)
`LList` | `schemeGetAgentsWithRole(java.lang.String g, java.lang.String r)` Java-Scheme glue code : getAgentsWithRole
`LList` | `schemeGetAgentsWithRole(java.lang.String c, java.lang.String g, java.lang.String r)`
`LList` | `schemeGetAvailableCommunities()` Java-Scheme glue code : getAvailableCommunities
`LList` | `schemeGetExistingGroups()` Java-Scheme glue code : getExistingGroups
`LList` | `schemeGetExistingGroups(java.lang.String c)`
`LList` | `schemeGetExistingRoles(java.lang.String g)` Java-Scheme glue code : getRoles
`LList` | `schemeGetExistingRoles(java.lang.String c, java.lang.String g)`
`LList` | `schemeGetMyGroups()` Java-Scheme glue code : getMyGroups
`LList` | `schemeGetMyGroups(java.lang.String c)`
`LList` | `schemeGetMyRoles(java.lang.String g)` Java-Scheme glue code : getRoles
`LList` | `schemeGetMyRoles(java.lang.String c, java.lang.String g)`
`LList` | `schemeGetRoles(java.lang.String g)` Java-Scheme glue code : getRoles
`LList` | `schemeGetRoles(java.lang.String c, java.lang.String g)`

Methods inherited from class madkit.kernel.Agent
`connectAgencyToAgency, createPlace, createPlace, enableMobility, enableMobility, exitImmediatlyOnKill, getAgencyNamed, joinPlace, joinPlace, joinPlace, pause, receiveMessage, run, waitNextMessage, waitNextMessage`

Methods inherited from class madkit.kernel.AbstractAgent
`broadcastMessage, broadcastMessage, connectedWithCommunity, createGroup, createGroup, debug, disposeMyGUI, foundGroup, getAddress, getAgentInformation, getAgentsWithRole, getAgentsWithRole, getAgentWithRole, getAgentWithRole, getAvailableCommunities, getBean, getController, getCurrentKernelAddress, getDebug, getExistingGroups, getExistingGroups, getExistingRoles, getExistingRoles, getGroups, getGUIObject, getMessageBoxSize, getMyGroups, getMyGroups, getMyRoles, getMyRoles, getName, getRoles, hasGUI, isBelongingToGroup, isBelongingToGroup, isCommunity, isGroup, isGroup, isMemberOf, isMemberOf, isMessageBoxEmpty, isRole, isRole, joinGroup, killAgent, launchAgent, launchAgent, leaveGroup, leaveGroup, leaveRole, leaveRole, nextMessage, print, redisplayMyGUI, requestRole, requestRole, requestRole, restoreAgent, sendMessage, sendMessage, sendMessage, setBean, setController, setDebug, setGUIObject, setName, setOutput, setOutputWriter, windowClosing`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### env

    protected Environment env

### interp

    public static Scheme interp

### envcount

    public static int envcount

### out_p

    protected OutPort out_p

### err_p

    protected OutPort err_p

Constructor Detail

### SchemeAgent

    public SchemeAgent()

  The constructor instantiates a new Scheme interpreter with a local environment and load the SchemeAgentLib glue

### SchemeAgent

    public SchemeAgent(java.lang.String s)

  The constructor instantiates a new Scheme interpreter with a local environment and load the SchemeAgentLib glue

### SchemeAgent

    public SchemeAgent(java.io.File s)

Method Detail

### initGUI

    public void initGUI()

  Description copied from class: `AbstractAgent`
  This method is called by the specific external graphic system (as the G-Box) to ask the agent to prepare a graphical interface. The agent developper should use a setGUIObject(...) within this method, as well as other necessary initializations. If the developper does not overload this method, a vanilla text output might be used as the default interface.

  Overrides:
    `initGUI` in class `AbstractAgent`

### activate

    public void activate()

  Loads the Scheme agent code, then evaluates the activate function, if bounded

  Overrides:
    `activate` in class `AbstractAgent`

### live

    public void live()

  Evaluates the live function, if bounded

  Overrides:
    `live` in class `Agent`

### end

    public void end()

  Evaluates the end function, if bounded

  Overrides:
    `end` in class `AbstractAgent`

### println

    public void println(java.lang.String s)

  Description copied from class: `AbstractAgent`
  Prints text information in a environment-independant way (GUI, console, ...)

  Overrides:
    `println` in class `AbstractAgent`

### println

    public void println(java.lang.Object o)

### print

    public void print(java.lang.Object o)

### makeLaunchAgent

    public void makeLaunchAgent(java.lang.String cl,
                                java.lang.String n)

  Java-Scheme glue code

### doLaunchAgent

    public void doLaunchAgent(AbstractAgent a,
                              java.lang.String n,
                              boolean gui)

### schemeGetAgentsWithRole

    public LList schemeGetAgentsWithRole(java.lang.String g,
                                         java.lang.String r)

  Java-Scheme glue code : getAgentsWithRole

### schemeGetAgentsWithRole

    public LList schemeGetAgentsWithRole(java.lang.String c,
                                         java.lang.String g,
                                         java.lang.String r)

### schemeGetMyGroups

    public LList schemeGetMyGroups()

  Java-Scheme glue code : getMyGroups

### schemeGetMyGroups

    public LList schemeGetMyGroups(java.lang.String c)

### schemeGetExistingGroups

    public LList schemeGetExistingGroups()

  Java-Scheme glue code : getExistingGroups

### schemeGetExistingGroups

    public LList schemeGetExistingGroups(java.lang.String c)

### schemeGetRoles

    public LList schemeGetRoles(java.lang.String g)

  Java-Scheme glue code : getRoles

### schemeGetRoles

    public LList schemeGetRoles(java.lang.String c,
                                java.lang.String g)

### schemeGetExistingRoles

    public LList schemeGetExistingRoles(java.lang.String g)

  Java-Scheme glue code : getRoles

### schemeGetExistingRoles

    public LList schemeGetExistingRoles(java.lang.String c,
                                        java.lang.String g)

### schemeGetMyRoles

    public LList schemeGetMyRoles(java.lang.String g)

  Java-Scheme glue code : getRoles

### schemeGetMyRoles

    public LList schemeGetMyRoles(java.lang.String c,
                                  java.lang.String g)

### schemeGetAvailableCommunities

    public LList schemeGetAvailableCommunities()

  Java-Scheme glue code : getAvailableCommunities

### InternalDebug

    public void InternalDebug(java.lang.String g)

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © Madkit Team (O. Gutknecht, J. Ferber, F. Michel et al.) All Rights Reserved.