HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
POP_ContextDataHandle Class Reference

#include <POP_ContextData.h>

Public Member Functions

 POP_ContextDataHandle ()
 
 POP_ContextDataHandle (const POP_ContextDataHandle &handle)
 
 ~POP_ContextDataHandle ()
 
const POP_ContextDataHandleoperator= (const POP_ContextDataHandle &handle)
 
POP_ContextDatagetContextData () const
 Return a pointer to the bound data if it is still valid, 0 otherwise. More...
 
void clear ()
 Clear reference to any bound POP_ContextData. Equivalent to bind(0). More...
 
void bind (POP_ContextData *data)
 Bind to the specified data, releasing any current binding. More...
 

Detailed Description

A POP_ContextDataHandle is designed to allow arms length references to a POP_ContextData. The handle is notified upon deletion of the underlying data buffering any code using the handle from potentially dereferencing a deleted object. This class does not provide any sort of access control to the underlying POP_ContextData, nor does it bump the reference count on the POP_ContextData. In other words, an active handle to a particular POP_ContextData instance will not prevent said instance from destruction.

Definition at line 541 of file POP_ContextData.h.

Constructor & Destructor Documentation

POP_ContextDataHandle::POP_ContextDataHandle ( )
POP_ContextDataHandle::POP_ContextDataHandle ( const POP_ContextDataHandle handle)
POP_ContextDataHandle::~POP_ContextDataHandle ( )

Member Function Documentation

void POP_ContextDataHandle::bind ( POP_ContextData data)

Bind to the specified data, releasing any current binding.

void POP_ContextDataHandle::clear ( )

Clear reference to any bound POP_ContextData. Equivalent to bind(0).

POP_ContextData* POP_ContextDataHandle::getContextData ( ) const

Return a pointer to the bound data if it is still valid, 0 otherwise.

const POP_ContextDataHandle& POP_ContextDataHandle::operator= ( const POP_ContextDataHandle handle)

The documentation for this class was generated from the following file: