[Package Index | Mudlib Index | Effect Index]

File /std/basic/init.c

This inherit allows you to add callbacks for init().

Written by Woom

Started May 31, 2006

Includes

This class includes the following files /include/function.h

Method index

Public Functions

These are functions that everyone can access.

add_init_callback
int add_init_callback(mixed func,
                      object ob,
                      mixed * args ...)

This adds an init callback.

Parameters:
func - The function to be called. If a function pointer, it will simply be evaluated. If a string, the function of that name will be called on ob, or on previous_object() if ob isn't given
ob - The object to call the function on
args - Any other data you want to pass into the function call

Returns:
An id which can be used to remove the callback, or -1 if it fails


query_init_callbacks
class init_callback * query_init_callbacks()

Returns the current init callbacks on the object.

Returns:
The init callbacks


remove_init_callback
int remove_init_callback(int id)

This returns an init callback based on an id.

Parameters:
id - The init callback id to remove

Returns:
1 if it succeeds, 0 if it fails