Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

shevek_crefbase(3) [debian man page]

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 class _ptr struct _ptrdata class _ptrptr Public Member Functions void init_done (int code=0) After calling this, the object is destroyed without references. Static Public Member Functions static int set_default_tag (int tag) Set the default tag for when init_done is called. static void check (bool fatal=true) Check if all objects have called init_done. Protected Member Functions crefbase () Constructor, which is called when an object is created. virtual ~crefbase () Virtual destructor, which does nothing except allowing derived class to have a virtual destructor. Friends class crefptr Detailed Description Circular-dependancy-protected reference-counting object base class. Objects which derive from this class are reference-counted in a way that detects dependency loops and destroys the entire loop when it is no longer externally referenced. For this, it is important that objects which contain pointers register them appropriately. 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. libshevek Fri May 11 2012 shevek::crefbase(3)

Check Out this Related Man Page

shevek::relative_time(3)				     Library Functions Manual					  shevek::relative_time(3)

NAME
shevek::relative_time - Time interval. SYNOPSIS
#include <time.hh> Public Member Functions relative_time () The default constructor creates an interval of 0. relative_time (timetype days, int hours, int minutes, int seconds, int nanoseconds=0) Construct an interval of a given size. relative_time (timetype seconds, unsigned nanoseconds) Fast constructor. relative_time operator+ (relative_time that) const Add two intervals. absolute_time operator+ (absolute_time that) const Add an interval to a moment. relative_time operator- (relative_time that) const Subtract two intervals. relative_time operator- () const Negate an interval. relative_time operator* (float c) const Scale an interval. relative_time operator/ (float c) const Scale an interval. relative_time operator% (relative_time that) const Modulo operator for two intervals. double operator/ (relative_time that) const Division of two intervals. relative_time & operator+= (relative_time that) Add an interval. relative_time & operator-= (relative_time that) Subtract an interval. relative_time & operator*= (float c) Scale the interval. relative_time & operator/= (float c) Scale the interval. relative_time & operator%= (relative_time that) Modulo. bool operator< (relative_time that) const Compare with another interval. bool operator> (relative_time that) const Compare with another interval. bool operator<= (relative_time that) const Compare with another interval. bool operator>= (relative_time that) const Compare with another interval. bool operator== (relative_time that) const bool operator!= (relative_time that) const unsigned nanoseconds () const Number of nanoseconds. unsigned seconds () const Number of seconds. unsigned minutes () const Number of minutes. unsigned hours () const Number of hours. unsigned days () const Number of days. bool isnegative () const Is this a negative interval? timetype total () const Total number of seconds, as encoded. Static Public Member Functions static void set_digits (unsigned num) Set number of digits to use when printing (for fractions of seconds). static unsigned get_digits () Get the number of digits that is used when printing. Friends std::ostream & operator<< (std::ostream &s, relative_time t) Write the interval to a std::ostream. Detailed Description Time interval. Constructor &; Destructor Documentation shevek::relative_time::relative_time (timetypeseconds, unsignednanoseconds) Fast constructor. This directly fills the members and is therefore slightly faster than the other constructors. However, the others aren't really slow either. Member Function Documentation bool shevek::relative_time::operator!= (relative_timethat) const Compare two intervals. Note that this is rarely a useful operation, because minor errors may be introduced by computations. bool shevek::relative_time::operator== (relative_timethat) const Compare two intervals. Note that this is rarely a useful operation, because minor errors may be introduced by computations. Author Generated automatically by Doxygen for libshevek from the source code. libshevek Fri May 11 2012 shevek::relative_time(3)
Man Page