DOKK / manpages / debian 11 / libcommoncpp2-doc / ost_RefObject.3.en
ost::RefObject(3) Library Functions Manual ost::RefObject(3)

ost::RefObject - A reference countable object.

#include <object.h>


virtual void * getObject (void)=0
The actual object being managed can be returned by this method as a void and then recast to the actual type.


RefObject ()
The constructor simply initializes the count. virtual ~RefObject ()
The destructor is called when the reference count returns to zero.


unsigned refCount


class RefPointer

A reference countable object.

This is used in association with smart pointers (RefPointer).

Author

David Sugar dyfet@gnutelephony.org

Object managed by smart pointer reference count.

The constructor simply initializes the count.

The destructor is called when the reference count returns to zero. This is done through a virtual destructor.

The actual object being managed can be returned by this method as a void and then recast to the actual type. This removes the need to dynamic cast from RefObject and the dependence on rtti this implies.

Returns

underlying object being referenced.

Generated automatically by Doxygen for GNU CommonC++ from the source code.

Sun Dec 27 2020 GNU CommonC++