indexing description: "[ Objects that holds the pool of scenes, items, closups. ]" author: "Steiner Fabrizio" date: "$Date$" revision: "$Revision$" frozen class OBJECT_POOL create make feature make is -- Creates a new Object Poool do create items.make(default_size) create scenes.make(default_size) create closeups.make(default_size) end get_scene (a_name:STRING):SCENE is -- gets a scene object with name a_name do result := scenes.item (a_name) if result = void then create result.make result.set_name (a_name) scenes.put (result,a_name) end end get_item (a_name:STRING):ITEM is -- gets a item object with name a_name do result := items.item (a_name) if result = void then create result.make items.put (result,a_name) end end get_closeup (a_name:STRING):CLOSEUP is -- gets a item object with name a_name do result := closeups.item (a_name) if result = void then create result.make closeups.put (result,a_name) end end get_directory: STRING is -- returns directroy of xml file do result := directory end set_directory(a_directory: STRING) is -- sets directory of xml file require a_directory /= void do directory := a_directory end clear_pool is -- clears the pool of objects do scenes.clear_all items.clear_all closeups.clear_all end feature {NONE} -- Implementation scenes: HASH_TABLE[SCENE,STRING] items: HASH_TABLE[ITEM,STRING] closeups: HASH_TABLE[CLOSEUP,STRING] directory: STRING default_size: INTEGER is 100 invariant scenes /= void and items /= void and closeups /= void end -- class OBJECT_POOL