public class TranslatorContext extends Object
WARNING: the same context is used for Bot, ControlServer as well as Observer!
Constructor and Description |
---|
TranslatorContext(IWorldEventQueue events,
ItemTranslator itemTranslator,
Logger log) |
Modifier and Type | Method and Description |
---|---|
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) |
public TranslatorContext(IWorldEventQueue events, ItemTranslator itemTranslator, Logger log)
public void reset()
public IWorldEventQueue getEventQueue()
public ItemTranslator getItemTranslator()
public Logger getLogger()
public List<NavPointNeighbourLink> getNeighbours()
public void setNeighbours(List<NavPointNeighbourLink> neighs)
public void setNavPointLinks(Map<UnrealId,List<NavPointNeighbourLink>> links)
public Map<UnrealId,List<NavPointNeighbourLink>> getNavPointLinks()
public void processNavPointLinks()
Does nothing if getNavPoints() or getNavPointsLinks() returns null.
public void processNavPointsAndItems()
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 © 2012 AMIS research group, Faculty of Mathematics and Physics, Charles University in Prague, Czech Republic. All Rights Reserved.