Quick Links:

bal | bbl | bdl | bsl

Public Member Functions

bdlcc::ObjectCatalog_AutoCleanup< TYPE > Class Template Reference

#include <bdlcc_objectcatalog.h>

List of all members.

Public Member Functions

 ObjectCatalog_AutoCleanup (ObjectCatalog< TYPE > *catalog)
 ~ObjectCatalog_AutoCleanup ()
void manageNode (typename ObjectCatalog< TYPE >::Node *node, bool deallocateFlag)
void releaseNode ()
void release ()

Detailed Description

template<class TYPE>
class bdlcc::ObjectCatalog_AutoCleanup< TYPE >

This class provides a specialized proctor object that, upon destruction and unless the release method is called (1) removes a managed node from the ObjectCatalog, and (2) deallocates all associated memory as necessary.

See Component bdlcc_objectcatalog


Constructor & Destructor Documentation

template<class TYPE >
bdlcc::ObjectCatalog_AutoCleanup< TYPE >::ObjectCatalog_AutoCleanup ( ObjectCatalog< TYPE > *  catalog  )  [explicit]

Create a proctor to manage the specified catalog.

template<class TYPE >
bdlcc::ObjectCatalog_AutoCleanup< TYPE >::~ObjectCatalog_AutoCleanup (  ) 

Remove a managed node from the ObjectCatalog (by returning it to the catalog's free list or node pool, as specified in manageNode), deallocate all associated memory, and destroy this object.


Member Function Documentation

template<class TYPE >
void bdlcc::ObjectCatalog_AutoCleanup< TYPE >::manageNode ( typename ObjectCatalog< TYPE >::Node *  node,
bool  deallocateFlag 
)

Release from management the catalog node, if any, currently managed by this object and begin managing the specified catalog node. The specified deallocateFlag tells the destructor how to dispose of node if node is managed during the destruction of this object.

template<class TYPE >
void bdlcc::ObjectCatalog_AutoCleanup< TYPE >::releaseNode (  ) 

Release from management the catalog node, if any, currently managed by this object, if any.

template<class TYPE >
void bdlcc::ObjectCatalog_AutoCleanup< TYPE >::release (  ) 

Release from management all resources currently managed by this object, if any.


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