register

lib
OBJECT
        /obj/lib/register


LAST UPDATE
	Thragor, 13-Jun-95, 20:00 MET


SYNOPSIS
	inherit "/obj/lib/register";
	or
	"/obj/lib/register"->fun(<logname>)

DESCRIPTION
	The register is meant to keep a list of all sub-objects of one
	object. One use is to keep a list of all shops in the mud.
	This will be done by an object inheriting /obj/lib/register.
	All shops do a call_other on this register and it'll save
	them, if they are new.
	The objects are logged as their blueprints and if the objects
	are clones the blueprints of their creators will be logged,
	too.
	If you don't want to write your own register, you just have to
	call the register-funs with an additional argument <logname>,
	thats the file where the infos shall be logged.

	  void LoadRegister(void|string logname)
	    Load the register either from the file set with
	    SetSaveFile or from <logname> if given.

	  void SaveRegister(void|string logname)
	    Save the register. Works just as LoadRegister.

	  string SetSaveFile(string file)
	  string QuerySaveFile()
	    This should be used if you write your own register. Just
	    set the savefile in its create.

	  mapping SetRegister(mapping r,void|string logname)
	  mapping QueryRegister()
	    You might modify/query the register with this.
	    The register is stored as:
	      ([<filename>:({<list of creators>})])

	  void Register(object|string filename,void|string logname)
	    Add <filename> to the register if not already done.
	    If <filename> is a clone and the creator of <filename> is
	    not a player nor the xtool, then log the creator, too.

	  void RemoveEntry(object|string filename,void|string logname)
	    Sometimes you need to clean the log. This can be done with
	    RemoveEntry which removes <filename> from the register.

	  string *ClearEntries(void|string logname)
	    This clears all entries from the register, where the
	    filename doesn't exist anymore. All removed entries are
	    returned as result.

	  void create()
	    This only controls, that you don't clone the register.


INHERITANCE TREE
        register


SEE ALSO