cz.cuni.amis.pogamut.ut2004multi.communication.worldview
Class UT2004VisionLocalWorldView

java.lang.Object
  extended by cz.cuni.amis.pogamut.multi.communication.worldview.impl.AbstractLocalWorldView
      extended by cz.cuni.amis.pogamut.multi.communication.worldview.impl.EventDrivenLocalWorldView
          extended by cz.cuni.amis.pogamut.multi.communication.worldview.impl.VisionLocalWorldView
              extended by cz.cuni.amis.pogamut.multi.communication.worldview.impl.BatchAwareLocalWorldView
                  extended by cz.cuni.amis.pogamut.ut2004multi.communication.worldview.UT2004VisionLocalWorldView
All Implemented Interfaces:
IComponent, ILocalWorldView, ITimedWorldChangeEventInput, IVisionLocalWorldView
Direct Known Subclasses:
UT2004LockableLocalWorldView

public abstract class UT2004VisionLocalWorldView
extends BatchAwareLocalWorldView


Nested Class Summary
 
Nested classes/interfaces inherited from class cz.cuni.amis.pogamut.multi.communication.worldview.impl.AbstractLocalWorldView
AbstractLocalWorldView.LazyCompositeObjectMap<T extends ICompositeWorldObject>
 
Field Summary
protected  java.util.Collection<ILocalGBViewable> currentBatch
           
protected  java.util.Collection<ILocalGBViewable> lastBatch
           
 
Fields inherited from class cz.cuni.amis.pogamut.multi.communication.worldview.impl.VisionLocalWorldView
syncVisibleClassMap, syncVisibleMap, visibleClassMap, visibleMap
 
Fields inherited from class cz.cuni.amis.pogamut.multi.communication.worldview.impl.EventDrivenLocalWorldView
notifyEventsList, receiveEventProcessing, WORLDVIEW_DEPENDENCY
 
Fields inherited from class cz.cuni.amis.pogamut.multi.communication.worldview.impl.AbstractLocalWorldView
actLocalWorldObjects, agentId, classMap, COMPONENT_ID, control, controller, eventBus, log, sharedWorldView, syncClassMap
 
Constructor Summary
UT2004VisionLocalWorldView(ComponentDependencies dependencies, ILifecycleBus bus, IAgentLogger logger, ISharedWorldView parentWorldView, ITeamedAgentId agentId)
           
 
Method Summary
protected  ICompositeWorldObject createCompositeObject(ILocalWorldObject localObject, ISharedWorldObject sharedObject, IStaticWorldObject staticObject)
          Method used for returning the appropriate CompositeObject type made from the three provided object parts.
protected  void localEventNotify(ILocalWorldObjectUpdatedEvent event)
          If the event updates a Viewable object, this method manages making it disappear when no update is recieved for it - this means the object is not in FoW of our agent.
 void notify(IWorldChangeEvent event)
           
 
Methods inherited from class cz.cuni.amis.pogamut.multi.communication.worldview.impl.BatchAwareLocalWorldView
isBatchBeginEvent, isBatchEndEvent, lock, notifySharedBegin, sharedBatchFinished, unlock
 
Methods inherited from class cz.cuni.amis.pogamut.multi.communication.worldview.impl.VisionLocalWorldView
addVisible, getAllVisible, getAllVisible, getVisible, getVisible, objectAppeared, objectCreated, objectDestroyed, objectDisappeared, objectUpdatedEvent, removeVisible
 
Methods inherited from class cz.cuni.amis.pogamut.multi.communication.worldview.impl.EventDrivenLocalWorldView
innerNotify, objectUpdated, raiseEvent
 
Methods inherited from class cz.cuni.amis.pogamut.multi.communication.worldview.impl.AbstractLocalWorldView
addEventListener, addLocalWorldObject, addObjectListener, addObjectListener, addObjectListener, addObjectListener, addOldLocalWorldObject, cleanUp, get, get, get, get, getAgentId, getAll, getAll, getAll, getAll, getComponentId, getCurrentTimeKey, getEventBus, getLocal, getLocal, getMostRecentLocalWorldObject, getSingle, getSingle, isListening, isListening, isListening, isListening, isListening, isListening, isPaused, isRunning, kill, lockTime, pause, prePause, preStop, removeEventListener, removeListener, removeLocalWorldObject, removeObjectListener, removeObjectListener, removeObjectListener, removeObjectListener, reset, resume, setCurrentTime, setInitialTime, start, stop, unlockTime
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface cz.cuni.amis.pogamut.multi.communication.worldview.ILocalWorldView
addEventListener, addObjectListener, addObjectListener, addObjectListener, addObjectListener, get, get, getAgentId, getAll, getAll, getCurrentTimeKey, getEventBus, getLocal, getSingle, isListening, isListening, isListening, isListening, isListening, isListening, lockTime, removeEventListener, removeListener, removeObjectListener, removeObjectListener, removeObjectListener, removeObjectListener, setCurrentTime, setInitialTime, unlockTime
 
Methods inherited from interface cz.cuni.amis.pogamut.base.component.IComponent
getComponentId
 

Field Detail

lastBatch

protected java.util.Collection<ILocalGBViewable> lastBatch

currentBatch

protected java.util.Collection<ILocalGBViewable> currentBatch
Constructor Detail

UT2004VisionLocalWorldView

public UT2004VisionLocalWorldView(ComponentDependencies dependencies,
                                  ILifecycleBus bus,
                                  IAgentLogger logger,
                                  ISharedWorldView parentWorldView,
                                  ITeamedAgentId agentId)
Method Detail

createCompositeObject

protected ICompositeWorldObject createCompositeObject(ILocalWorldObject localObject,
                                                      ISharedWorldObject sharedObject,
                                                      IStaticWorldObject staticObject)
Description copied from class: AbstractLocalWorldView

Method used for returning the appropriate CompositeObject type made from the three provided object parts. All parts must share the same WorldObjectId and must belong to the same CompositeObject class. Also, none of the parts may be null.

The method should return a proxy-type CompositeObject, meaning that the object will only wrap all objectParts and no data will actually be copied.

This method must be overriden by a object-awareWorldView which has information about all the object classes in the world and is able to call the correct constructors

Specified by:
createCompositeObject in class AbstractLocalWorldView
Parameters:
localObject - local part of the object
sharedObject - shared part of the object
staticObject - static part of the object
Returns:
Proxy-type compositeObject.

notify

public void notify(IWorldChangeEvent event)
Specified by:
notify in interface ITimedWorldChangeEventInput
Overrides:
notify in class BatchAwareLocalWorldView

localEventNotify

protected void localEventNotify(ILocalWorldObjectUpdatedEvent event)
If the event updates a Viewable object, this method manages making it disappear when no update is recieved for it - this means the object is not in FoW of our agent.

Parameters:
event -