public class DefaultVisualLocationBuffer6 extends AbstractPMActivationBuffer6 implements IVisualLocationBuffer, ICompilableBuffer
Modifier and Type | Field and Description |
---|---|
protected ICompilableContext |
_compilableContext |
protected IChunk |
_currentVisualLocation |
protected ChunkTypeRequest |
_defaultSearchRequest |
protected IChunk |
_lastVisualLocation |
protected VisualSearchRequestDelegate |
_scanDelegate |
protected IVisualActivationBuffer |
_visualActivationBuffer |
protected IChunkType |
_visualLocationChunkType |
static org.apache.commons.logging.Log |
LOGGER
logger definition
|
_pendingTimedEvents
ACTIVATION_PARAM, GOAL_VALUE_PARAM, STRICT_HARVESTING_PARAM
EXECUTION_SLOT, IS_BUFFER_STUFF_REQUEST, MODALITY_SLOT, PREPARATION_SLOT, PROCESSOR_SLOT
BUFFER_SLOT, ERROR_CHANGED_TOO_MUCH_CHUNK, ERROR_DELETED_CHUNK, ERROR_INVALID_INDEX_CHUNK, ERROR_NO_LONGER_AVAILABLE_CHUNK, ERROR_NOTHING_AVAILABLE_CHUNK, ERROR_NOTHING_MATCHES_CHUNK, ERROR_SLOT, ERROR_UNKNOWN_CHUNK, STATE_SLOT
AURAL, AURAL_LOCATION, GOAL, IMAGINAL, MOTOR, RETRIEVAL, VISUAL, VISUAL_LOCATION, VOCAL
Constructor and Description |
---|
DefaultVisualLocationBuffer6(IVisualActivationBuffer visualBuffer,
IVisualModule module) |
Modifier and Type | Method and Description |
---|---|
void |
cancelBufferStuff() |
void |
checkForBufferStuff()
we stuff the buffer if this buffer is empty and free AND the visual buffer
is free.
|
protected java.util.Collection<IChunk> |
clearInternal()
clear the buffer and abort any timed events that are pending
|
protected void |
clearLastLocation() |
ICompilableContext |
getCompilableContext() |
IChunk |
getCurrentVisualLocation()
returns the current visual location in the buffer or the last attended
location
|
ChunkTypeRequest |
getDefaultSearch() |
protected void |
grabReferences()
called once the model is started.
|
boolean |
handlesEncoding()
so that we don't try to encode the visual locations which are taken care of
by the visual map..
|
void |
initialize()
intialize this component
|
protected void |
installDefaultChunkPatternProcessors() |
boolean |
isBufferStuffPending() |
protected boolean |
isValidChunkType(IChunkType chunkType)
check to see if a chunk of this chunktype can be added as a source chunk
|
protected boolean |
removeSourceChunkInternal(IChunk chunkToRemove)
do the actual work of removing chunkToRemove from the buffer.
|
void |
setDefaultSearch(ChunkTypeRequest request) |
protected void |
setSourceChunkInternal(IChunk chunk) |
protected boolean |
shouldCopyOnInsertion(IChunk sourceChunk)
since the visual location chunks are reused, we want to turn off the copy
mechanism
|
addSourceChunkInternal, clear, dispose, enqueueTimedEvent, isExecutionBusy, isExecutionFree, isModalityBusy, isModalityFree, isPreparationBusy, isPreparationFree, isProcessorBusy, isProcessorFree, setExecutionChunk, setModalityChunk, setPreparationChunk, setProcessorChunk, willAccept
addRequestDelegate, getRequestDelegates, getSourceChunkInternal, getSourceChunksInternal, removeRequestDelegate, requestInternal
request
addListener, addSlot, addSourceChunk, bind, checkStatusSlotContent, getBusyChunk, getEmptyChunk, getErrorChunk, getFreeChunk, getFullChunk, getRequestedChunk, getSlot, getSlots, getSlots, getUnrequestedChunk, hasSlot, isBufferEmpty, isBufferFull, isBufferRequested, isBufferUnrequested, isErrorSet, isStateBusy, isStateError, isStateFree, removeListener, removeSlot, setBufferChunk, setErrorChunk, setStateChunk, setStatusSlotContent, shouldAcceptAsSource, sourceChunkCopied, valueChanged
addListener, contains, containsExact, getActivation, getActivationSpreader, getEventDispatcher, getG, getLock, getModel, getModule, getName, getParameter, getPossibleParameters, getSetableParameters, getSourceChunk, getSourceChunks, getSourceChunks, isStrictHarvestingEnabled, matched, matchedInternal, removeListener, removeSourceChunk, setActivation, setActivationSpreader, setG, setParameter, setStrictHarvestingEnabled, toString
addAdapterFactory, getAdapter, removeAdapterFactory
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
isExecutionBusy, isExecutionFree, isModalityBusy, isModalityFree, isPreparationBusy, isPreparationFree, isProcessorBusy, isProcessorFree, setExecutionChunk, setModalityChunk, setPreparationChunk, setProcessorChunk
bind, isBufferEmpty, isBufferFull, isBufferRequested, isBufferUnrequested, isErrorSet, isStateBusy, isStateError, isStateFree, setBufferChunk, setErrorChunk, setStateChunk
addListener, removeListener, valueChanged
getSlot, hasSlot
addSlot, getSlots, getSlots, removeSlot
addRequestDelegate, getRequestDelegates, removeRequestDelegate
request, willAccept
addListener, addSourceChunk, clear, contains, dispose, getActivation, getG, getModel, getModule, getName, getSourceChunk, getSourceChunks, getSourceChunks, isStrictHarvestingEnabled, matched, removeListener, removeSourceChunk, setActivation, setG
getAdapter
enqueueTimedEvent
public static final org.apache.commons.logging.Log LOGGER
protected IChunk _currentVisualLocation
protected IChunk _lastVisualLocation
protected IChunkType _visualLocationChunkType
protected IVisualActivationBuffer _visualActivationBuffer
protected VisualSearchRequestDelegate _scanDelegate
protected ChunkTypeRequest _defaultSearchRequest
protected ICompilableContext _compilableContext
public DefaultVisualLocationBuffer6(IVisualActivationBuffer visualBuffer, IVisualModule module)
public void initialize()
IInitializable
initialize
in interface IInitializable
initialize
in class AbstractPMActivationBuffer6
protected void grabReferences()
AbstractActivationBuffer
grabReferences
in class AbstractPMActivationBuffer6
protected java.util.Collection<IChunk> clearInternal()
AbstractPMActivationBuffer6
clearInternal
in class AbstractPMActivationBuffer6
AbstractActivationBuffer.clear()
protected boolean shouldCopyOnInsertion(IChunk sourceChunk)
shouldCopyOnInsertion
in class AbstractPMActivationBuffer6
org.jactr.core.buffer.six.AbstractActivationBuffer6#copyChunkOnInsertion()
public IChunk getCurrentVisualLocation()
getCurrentVisualLocation
in interface IVisualLocationBuffer
IVisualLocationBuffer.getCurrentVisualLocation()
protected void setSourceChunkInternal(IChunk chunk)
setSourceChunkInternal
in class DefaultDelegatedRequestableBuffer6
protected void clearLastLocation()
protected boolean removeSourceChunkInternal(IChunk chunkToRemove)
AbstractActivationBuffer
removeSourceChunkInternal
in class AbstractPMActivationBuffer6
chunkToRemove
- chunk that is in the buffer, never nullAbstractActivationBuffer.removeSourceChunkInternal(org.jactr.core.chunk.IChunk)
protected void installDefaultChunkPatternProcessors()
protected boolean isValidChunkType(IChunkType chunkType)
AbstractPMActivationBuffer6
isValidChunkType
in class AbstractPMActivationBuffer6
public void checkForBufferStuff()
checkForBufferStuff
in interface IVisualLocationBuffer
IVisualLocationBuffer.checkForBufferStuff()
public boolean handlesEncoding()
handlesEncoding
in interface IActivationBuffer
handlesEncoding
in class AbstractActivationBuffer
AbstractActivationBuffer.handlesEncoding()
public boolean isBufferStuffPending()
isBufferStuffPending
in interface IVisualLocationBuffer
public void cancelBufferStuff()
cancelBufferStuff
in interface IVisualLocationBuffer
public void setDefaultSearch(ChunkTypeRequest request)
setDefaultSearch
in interface IVisualLocationBuffer
public ChunkTypeRequest getDefaultSearch()
getDefaultSearch
in interface IVisualLocationBuffer
public ICompilableContext getCompilableContext()
getCompilableContext
in interface ICompilableBuffer
getCompilableContext
in class AbstractPMActivationBuffer6