Package net.sf.gridarta.model.resource
Class AbstractFilesResourcesReader<G extends GameObject<G,A,R>,A extends MapArchObject<A>,R extends Archetype<G,A,R>>
- java.lang.Object
-
- net.sf.gridarta.model.resource.AbstractResourcesReader<G>
-
- net.sf.gridarta.model.resource.AbstractFilesResourcesReader<G,A,R>
-
- Direct Known Subclasses:
FilesResourcesReader,FilesResourcesReader,FilesResourcesReader
public abstract class AbstractFilesResourcesReader<G extends GameObject<G,A,R>,A extends MapArchObject<A>,R extends Archetype<G,A,R>> extends AbstractResourcesReader<G>
Abstract base class forAbstractResourcesReadersthat read from individual files.
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedAbstractFilesResourcesReader(@NotNull java.io.File archDirectory, @NotNull ArchetypeSet<G,A,R> archetypeSet, @NotNull AbstractArchetypeParser<G,A,R,?> archetypeParser, @NotNull ArchFaceProvider archFaceProvider, @NotNull java.io.File collectedDirectory, @Nullable java.lang.String imageSet, @NotNull AnimationObjects animationObjects, @NotNull FaceObjects faceObjects, @NotNull AbstractAnimationObjectsReader animationObjectsReader)Creates a new instance.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract booleanisValidEntry(int folderLevel, java.lang.String name)Returns whether a file name should be processed.@NotNull FaceProviderread(@NotNull ErrorView errorView, @NotNull java.util.List<G> invObjects)Reads the resources.-
Methods inherited from class net.sf.gridarta.model.resource.AbstractResourcesReader
addPNGFace, loadAnimationsFromCollect, loadAnimTree
-
-
-
-
Constructor Detail
-
AbstractFilesResourcesReader
protected AbstractFilesResourcesReader(@NotNull @NotNull java.io.File archDirectory, @NotNull @NotNull ArchetypeSet<G,A,R> archetypeSet, @NotNull @NotNull AbstractArchetypeParser<G,A,R,?> archetypeParser, @NotNull @NotNull ArchFaceProvider archFaceProvider, @NotNull @NotNull java.io.File collectedDirectory, @Nullable @Nullable java.lang.String imageSet, @NotNull @NotNull AnimationObjects animationObjects, @NotNull @NotNull FaceObjects faceObjects, @NotNull @NotNull AbstractAnimationObjectsReader animationObjectsReader)Creates a new instance.- Parameters:
archDirectory- the "arch" directory to readarchetypeSet- the archetype set to updatearchetypeParser- the archetype parser to usearchFaceProvider- the arch face provider to usecollectedDirectory- the collected directoryimageSet- the active image set ornullanimationObjects- the animation objects instancefaceObjects- the face objects instanceanimationObjectsReader- the animation objects reader instance to use
-
-
Method Detail
-
read
@NotNull public @NotNull FaceProvider read(@NotNull @NotNull ErrorView errorView, @NotNull @NotNull java.util.List<G> invObjects)
Description copied from class:AbstractResourcesReaderReads the resources.- Specified by:
readin classAbstractResourcesReader<G extends GameObject<G,A,R>>- Parameters:
errorView- the error view for reporting problemsinvObjects- all read archetypes are added to this list- Returns:
- the face provider for accessing the read faces
-
isValidEntry
protected abstract boolean isValidEntry(int folderLevel, java.lang.String name)Returns whether a file name should be processed.- Parameters:
folderLevel- the folder levelname- the base name of the file name- Returns:
- whether the entry is valid and should be processed
-
-