Revamped BundledTileSetRepository to make it easier to add bundles on the

fly in the future; it also now provides efficient tileset name to tileset
id mappings which is exported via the TileSetRepository interface. Lastly,
TileManager now relies on TileSetRepository to efficiently provide tiles
by name or id and no longer maintains its own cache (because the
BundledTileSetRepository already maintains the same mappings).


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2663 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
Michael Bayne
2003-06-18 05:48:45 +00:00
parent 572570de75
commit cbe229ccb7
3 changed files with 80 additions and 101 deletions
@@ -1,5 +1,5 @@
//
// $Id: TileSetRepository.java,v 1.4 2003/01/13 22:49:46 mdb Exp $
// $Id: TileSetRepository.java,v 1.5 2003/06/18 05:48:45 mdb Exp $
package com.threerings.media.tile;
@@ -42,6 +42,18 @@ public interface TileSetRepository
public TileSet getTileSet (int tileSetId)
throws NoSuchTileSetException, PersistenceException;
/**
* Returns the unique identifier of the {@link TileSet} with the
* specified tile set name.
*
* @exception NoSuchTileSetException thrown if no tileset exists with
* the specified name.
* @exception PersistenceException thrown if an error occurs
* communicating with the underlying persistence mechanism.
*/
public int getTileSetId (String setName)
throws NoSuchTileSetException, PersistenceException;
/**
* Returns the {@link TileSet} with the specified tile set name. The
* repository is responsible for configuring the tile set with an