cz.cuni.amis.pogamut.udk.communication.translator
Class TranslatorContext

Package class diagram package TranslatorContext
java.lang.Object
  extended by cz.cuni.amis.pogamut.udk.communication.translator.TranslatorContext

public class TranslatorContext
extends Object

Translator context serves as the context during the FSM work. It provides respective fsm states an access to the instances of:

WARNING: the same context is used for Bot, ControlServer as well as Observer!

Author:
Jimmy

Constructor Summary
TranslatorContext(IWorldEventQueue events, ItemTranslator itemTranslator, Logger log)
           
 
Method Summary
 IWorldEventQueue getEventQueue()
           
 Map<UnrealId,Item> getItems()
           
 ItemTranslator getItemTranslator()
           
 Logger getLogger()
           
 Map<UnrealId,List<NavPointNeighbourLink>> getNavPointLinks()
           
 Map<UnrealId,NavPoint> getNavPoints()
           
 List<NavPointNeighbourLink> getNeighbours()
           
 void processNavPointLinks()
          Reads getNavPointsLinks() and alters navpoints incoming and outgoing edges.
 void processNavPointsAndItems()
          Interconnects instances of NavPoint and Item from getNavPoints() and getItems() map.
 void reset()
           
 void setItems(Map<UnrealId,Item> items)
           
 void setNavPointLinks(Map<UnrealId,List<NavPointNeighbourLink>> links)
           
 void setNavPoints(Map<UnrealId,NavPoint> navPoints)
           
 void setNeighbours(List<NavPointNeighbourLink> neighs)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TranslatorContext

public TranslatorContext(IWorldEventQueue events,
                         ItemTranslator itemTranslator,
                         Logger log)
Method Detail

reset

public void reset()

getEventQueue

public IWorldEventQueue getEventQueue()

getItemTranslator

public ItemTranslator getItemTranslator()

getLogger

public Logger getLogger()

getNeighbours

public List<NavPointNeighbourLink> getNeighbours()

setNeighbours

public void setNeighbours(List<NavPointNeighbourLink> neighs)

setNavPointLinks

public void setNavPointLinks(Map<UnrealId,List<NavPointNeighbourLink>> links)

getNavPointLinks

public Map<UnrealId,List<NavPointNeighbourLink>> getNavPointLinks()

setNavPoints

public void setNavPoints(Map<UnrealId,NavPoint> navPoints)

getNavPoints

public Map<UnrealId,NavPoint> getNavPoints()

setItems

public void setItems(Map<UnrealId,Item> items)

getItems

public Map<UnrealId,Item> getItems()

processNavPointLinks

public void processNavPointLinks()
Reads getNavPointsLinks() and alters navpoints incoming and outgoing edges.

Does nothing if getNavPoints() or getNavPointsLinks() returns null.


processNavPointsAndItems

public void processNavPointsAndItems()
Interconnects instances of NavPoint and Item from getNavPoints() and getItems() map.

Note that new instances of nav points are created during this process thus the getNavPoints() will return a new map after this method finishes.

Does nothing if getNavPoints() or getItems() returns null.



Copyright © 2014 AMIS research group, Faculty of Mathematics and Physics, Charles University in Prague, Czech Republic. All Rights Reserved.