Poster of Linux kernelThe best gift for a Linux geek
ost::RefPointer

ost::RefPointer

Section: C Library Functions (3) Updated: 16 Feb 2010
Local index Up
 

NAME

ost::RefPointer -

Pointer to reference counted objects.

 

SYNOPSIS


#include <object.h>  

Public Member Functions


RefPointer ()
Create an unattached pointer.
RefPointer (RefObject *obj)
Create a pointer attached to a reference counted object.
RefPointer (const RefPointer &ptr)
A copy constructor.
virtual ~RefPointer ()

RefPointer & operator= (const RefObject &ref)

void * operator* () const

void * operator-> () const

void * getObject (void) const

bool operator! () const
 

Protected Member Functions


void detach (void)
Detach current object, for example, when changing pointer.
virtual void enterLock (void)
Patch point for mutex in derived class.
virtual void leaveLock (void)
Patch point for a mutex in derived class.  

Protected Attributes


RefObject * ref
 

Detailed Description

Pointer to reference counted objects.

This is a non-template form of a reference count smart pointer, and so uses common code. This can be subclassed to return explicit object types.

Author:

David Sugar <dyfet@gnutelephony.org> Pointer to reference count managed objects.

 

Constructor & Destructor Documentation

 

ost::RefPointer::RefPointer () [inline]

Create an unattached pointer.  

ost::RefPointer::RefPointer (RefObject * obj)

Create a pointer attached to a reference counted object. Object being referenced.  

ost::RefPointer::RefPointer (const RefPointer & ptr)

A copy constructor. Pointer being copied.  

virtual ost::RefPointer::~RefPointer () [virtual]

 

Member Function Documentation

 

void ost::RefPointer::detach (void) [protected]

Detach current object, for example, when changing pointer.  

virtual void ost::RefPointer::enterLock (void) [protected, virtual]

Patch point for mutex in derived class. This may often be a single static mutex shared by a managed type.  

void* ost::RefPointer::getObject (void) const

 

virtual void ost::RefPointer::leaveLock (void) [protected, virtual]

Patch point for a mutex in derived class. This may often be a single static mutex shared by a managed type.  

bool ost::RefPointer::operator! () const

 

void* ost::RefPointer::operator* () const [inline]

 

void* ost::RefPointer::operator-> () const [inline]

 

RefPointer& ost::RefPointer::operator= (const RefObject & ref)

 

Member Data Documentation

 

RefObject* ost::RefPointer::ref [protected]

 

Author

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


 

Index

NAME
SYNOPSIS
Public Member Functions
Protected Member Functions
Protected Attributes
Detailed Description
Constructor & Destructor Documentation
ost::RefPointer::RefPointer () [inline]
ost::RefPointer::RefPointer (RefObject * obj)
ost::RefPointer::RefPointer (const RefPointer & ptr)
virtual ost::RefPointer::~RefPointer () [virtual]
Member Function Documentation
void ost::RefPointer::detach (void) [protected]
virtual void ost::RefPointer::enterLock (void) [protected, virtual]
void* ost::RefPointer::getObject (void) const
virtual void ost::RefPointer::leaveLock (void) [protected, virtual]
bool ost::RefPointer::operator! () const
void* ost::RefPointer::operator* () const [inline]
void* ost::RefPointer::operator-> () const [inline]
RefPointer& ost::RefPointer::operator= (const RefObject & ref)
Member Data Documentation
RefObject* ost::RefPointer::ref [protected]
Author

This document was created by man2html, using the manual pages.
Time: 21:51:51 GMT, April 16, 2011