Package net.sf.gridarta.model.io
Class DefaultMapWriter<G extends GameObject<G,A,R>,A extends MapArchObject<A>,R extends Archetype<G,A,R>>
- java.lang.Object
-
- net.sf.gridarta.model.io.DefaultMapWriter<G,A,R>
-
- All Implemented Interfaces:
MapWriter<G,A,R>
public class DefaultMapWriter<G extends GameObject<G,A,R>,A extends MapArchObject<A>,R extends Archetype<G,A,R>> extends java.lang.Object implements MapWriter<G,A,R>
Default implementation ofMapWriter.
-
-
Constructor Summary
Constructors Constructor Description DefaultMapWriter(@NotNull MapArchObjectParserFactory<A> mapArchObjectParserFactory, @NotNull GameObjectParser<G,A,R> gameObjectParser)Creates a new instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidencodeMapFile(@NotNull MapModel<G,A,R> mapModel, @NotNull java.io.Writer writer)Write the whole map-data into a file.
-
-
-
Constructor Detail
-
DefaultMapWriter
public DefaultMapWriter(@NotNull @NotNull MapArchObjectParserFactory<A> mapArchObjectParserFactory, @NotNull @NotNull GameObjectParser<G,A,R> gameObjectParser)Creates a new instance.- Parameters:
mapArchObjectParserFactory- the map arch object parser factory to usegameObjectParser- the game object parser to use
-
-
Method Detail
-
encodeMapFile
public void encodeMapFile(@NotNull @NotNull MapModel<G,A,R> mapModel, @NotNull @NotNull java.io.Writer writer) throws java.io.IOExceptionDescription copied from interface:MapWriterWrite the whole map-data into a file.- Specified by:
encodeMapFilein interfaceMapWriter<G extends GameObject<G,A,R>,A extends MapArchObject<A>,R extends Archetype<G,A,R>>- Parameters:
mapModel- the MapModel to encodewriter- the writer to write to- Throws:
java.io.IOException- In case of I/O problems when writing the map file.
-
-