|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jactr.core.buffer.AbstractActivationBuffer
org.jactr.core.buffer.six.AbstractActivationBuffer6
public abstract class AbstractActivationBuffer6
template for an activation buffer that handles it's own status and inserts only copies of chunks
| Field Summary |
|---|
| Fields inherited from class org.jactr.core.buffer.AbstractActivationBuffer |
|---|
ACTIVATION_PARAM, GOAL_VALUE_PARAM, STRICT_HARVESTING_PARAM |
| Fields inherited from interface org.jactr.core.buffer.six.IStatusBuffer |
|---|
BUFFER_SLOT, STATE_SLOT |
| Fields inherited from interface org.jactr.core.buffer.IActivationBuffer |
|---|
AURAL, AURAL_LOCATION, GOAL, IMAGINAL, MOTOR, RETRIEVAL, VISUAL, VISUAL_LOCATION, VOCAL |
| Constructor Summary | |
|---|---|
AbstractActivationBuffer6(java.lang.String name,
IModule module)
|
|
| Method Summary | |
|---|---|
void |
addSlot(ISlot slot)
Adds a slot |
IChunk |
addSourceChunk(IChunk sourceChunk)
ensure that all chunks added are copies |
int |
bind(SlotBasedRequest request,
java.util.Map<java.lang.String,java.lang.Object> bindings,
boolean isIterative)
Required to permit status buffers to participate in the variable binding process of production instantiation. |
void |
dispose()
clean up resources, called by the module that created the buffer |
IChunk |
getBusyChunk()
|
IChunk |
getEmptyChunk()
|
IChunk |
getErrorChunk()
|
IChunk |
getFreeChunk()
|
IChunk |
getFullChunk()
|
IChunk |
getRequestedChunk()
|
ISlot |
getSlot(java.lang.String name)
return the actual named slot. |
java.util.Collection<? extends ISlot> |
getSlots()
return a duplicate copy of all the slots |
java.util.Collection<ISlot> |
getSlots(java.util.Collection<ISlot> slots)
|
IChunk |
getUnrequestedChunk()
|
void |
initialize()
must be called after the model has started so that we can ensure that the status slot values are properly initialized |
boolean |
isBufferEmpty()
this actually checks the contents of the buffer slot which might not be the best test in the case of buffers that share a common set of state slots (i.e. |
boolean |
isBufferFull()
|
boolean |
isBufferRequested()
|
boolean |
isBufferUnrequested()
|
boolean |
isStateBusy()
|
boolean |
isStateError()
|
boolean |
isStateFree()
|
void |
removeSlot(ISlot slot)
remove a slot |
void |
setBufferChunk(IChunk bufferState)
|
void |
setStateChunk(IChunk chunk)
|
| Methods inherited from class org.jactr.core.buffer.AbstractActivationBuffer |
|---|
addListener, clear, contains, getActivation, getG, getModel, getModule, getName, getParameter, getPossibleParameters, getSetableParameters, getSourceChunk, getSourceChunks, handlesEncoding, isStrictHarvestingEnabled, matched, removeListener, removeSourceChunk, setActivation, setG, setParameter, setStrictHarvestingEnabled, toString |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface org.jactr.core.buffer.IActivationBuffer |
|---|
addListener, clear, contains, getActivation, getG, getModel, getModule, getName, getSourceChunk, getSourceChunks, handlesEncoding, isStrictHarvestingEnabled, matched, removeListener, removeSourceChunk, setActivation, setG |
| Constructor Detail |
|---|
public AbstractActivationBuffer6(java.lang.String name,
IModule module)
| Method Detail |
|---|
public void dispose()
IActivationBuffer
dispose in interface IActivationBufferdispose in class AbstractActivationBufferpublic void addSlot(ISlot slot)
ISlotContainer
addSlot in interface ISlotContainerslot - The feature to be added to the ISlot attributepublic void removeSlot(ISlot slot)
ISlotContainer
removeSlot in interface ISlotContainerslot - Description of Parameterpublic ISlot getSlot(java.lang.String name)
IUniqueSlotContainer
getSlot in interface IUniqueSlotContainerpublic java.util.Collection<? extends ISlot> getSlots()
ISlotContainer
getSlots in interface ISlotContainerpublic java.util.Collection<ISlot> getSlots(java.util.Collection<ISlot> slots)
getSlots in interface ISlotContainerpublic boolean isStateFree()
isStateFree in interface IStatusBufferpublic boolean isStateBusy()
isStateBusy in interface IStatusBufferpublic boolean isStateError()
isStateError in interface IStatusBufferpublic boolean isBufferUnrequested()
isBufferUnrequested in interface IStatusBufferpublic boolean isBufferRequested()
isBufferRequested in interface IStatusBufferpublic boolean isBufferFull()
isBufferFull in interface IStatusBufferpublic boolean isBufferEmpty()
isBufferEmpty in interface IStatusBufferIStatusBuffer.isBufferEmpty()public void setStateChunk(IChunk chunk)
setStateChunk in interface IStatusBufferpublic void setBufferChunk(IChunk bufferState)
setBufferChunk in interface IStatusBufferpublic IChunk getFreeChunk()
public IChunk getBusyChunk()
public IChunk getEmptyChunk()
public IChunk getFullChunk()
public IChunk getErrorChunk()
public IChunk getRequestedChunk()
public IChunk getUnrequestedChunk()
public void initialize()
initialize in interface IInitializableinitialize in class AbstractActivationBufferpublic IChunk addSourceChunk(IChunk sourceChunk)
addSourceChunk in interface IActivationBufferaddSourceChunk in class AbstractActivationBuffersourceChunk - chunk to be added
IActivationBuffer.addSourceChunk(org.jactr.core.chunk.IChunk)
public int bind(SlotBasedRequest request,
java.util.Map<java.lang.String,java.lang.Object> bindings,
boolean isIterative)
throws CannotMatchException
IStatusBuffer
bind in interface IStatusBufferCannotMatchException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||