table of contents
shevek::crefbase(3) | Library Functions Manual | shevek::crefbase(3) |
NAME¶
shevek::crefbase - Circular-dependancy-protected reference-counting object base class.SYNOPSIS¶
#include <crefptr.hh>Classes¶
class _objptr
Public Member Functions¶
void init_done (int code=0)
Static Public Member Functions¶
static int set_default_tag (int tag)
Protected Member Functions¶
crefbase ()
Friends¶
class crefptr
Detailed Description¶
Circular-dependancy-protected reference-counting object base class.Member Function Documentation¶
static void shevek::crefbase::check (boolfatal = true) [inline, static]¶
Check if all objects have called init_done. When debugging is enabled, this function checks for all objects if they have called init_done. When debugging is not enabled, no list of objects is kept, and this check does nothing.void shevek::crefbase::init_done (intcode = 0) [inline]¶
After calling this, the object is destroyed without references. On creation, an object does not have any references. To prevent immediate destruction, it is first in an initialisation phase. During that phase, it will not be destroyed, even if it has no references. This function should be called immeiately after creating the object (normally through crefptr::init): shevek::crefptr <foo> bar = foo::create ().init (); If code is not given or 0, the default tag (set with set_default_tag) will be used.static int shevek::crefbase::set_default_tag (inttag) [inline, static]¶
Set the default tag for when init_done is called. If the tag is not set to 1, a message will be printed to standard error on destruction. The previous tag is returned. If tag is set to 0, the old value is not changed. The initial default value is 1.Author¶
Generated automatically by Doxygen for libshevek from the source code.Fri May 11 2012 | libshevek |