Main Page Class Hierarchy Alphabetical List Compound List File List Compound Members File Members Related Pages

# ACE_Managed_Object Class Template Reference

Wrapper for interface to allocate an object managed by the ACE_Object_Manager. More...

`#include <Managed_Object.h>`

List of all members.

## Static Public Methods
TYPE* | get_preallocated_object (ACE_Object_Manager::Preallocated_Object id)
TYPE* | get_preallocated_array (ACE_Object_Manager::Preallocated_Array id)
## Private Methods
| ACE_Managed_Object (void)
| ACE_Managed_Object (const ACE_Managed_Object<TYPE> &)
void | operator= (const ACE_Managed_Object<TYPE> &)
## Friends
class | this_prevents_compiler_warning_about_only_private_constructors

## Detailed Description

### template<class TYPE> template class ACE_Managed_Object

Wrapper for interface to allocate an object managed by the ACE_Object_Manager.

This template class wraps an interface that is used to allocate and access an object that is managed by the ACE_Object_Manager. Because static template member functions are not supported by some compilers, it is a separate (template) class. This interface is typically used to replace a static object with one that is dynamically allocated. It helps to avoid problems with order of static object construction/destruction. Managed objects won't be allocated until needed, but should be allocated when first needed. And they are destroyed in the reverse order of construction. <get_preallocated_object> accesses a "preallocated" object, i.e., one that is identified by a value in the ACE_Object_Manager:: Preallocated_Object enum. These objects are used internally by the ACE library. Hooks are provided for the application to preallocate objects via the same mechanism. ACE_APPLICATION_PREALLOCATED_OBJECT_DECLARATIONS can be used to define enum values; ACE_APPLICATION_PREALLOCATED_OBJECT_DEFINITIONS can be used to define the corresponding objects. The format of the ACE internal library definitions should be followed. And similarly, ACE_APPLICATION_PREALLOCATED_ARRAY_DECLARATIONS and ACE_APPLICATION_PREALLOCATED_ARRAY_DEFINITIONS can be used to preallocate arrays. By default, preallocation uses dynamic allocation. The preallocated objects and arrays are allocated off the heap in the ACE_Object_Manager constructor. To statically place the preallocated objects in program global data instead of on the heap, define ACE_HAS_STATIC_PREALLOCATION prior to building the ACE library.

## Constructor & Destructor Documentation

template<classTYPE>
ACE_Managed_Object<TYPE>::ACE_Managed_Object<TYPE> ( | void )`[private]`

template<classTYPE>
ACE_Managed_Object<TYPE>::ACE_Managed_Object<TYPE> ( | const ACE_Managed_Object< TYPE >& )`[private]`

## Member Function Documentation

template<classTYPE>
TYPE * ACE_Managed_Object<TYPE>::get_preallocated_array ( | ACE_Object_Manager::Preallocated_Array id )`[inline, static]`

template<classTYPE>
TYPE * ACE_Managed_Object<TYPE>::get_preallocated_object ( | ACE_Object_Manager::Preallocated_Object id )`[inline, static]`

template<classTYPE>
void ACE_Managed_Object<TYPE>::operator= ( | const ACE_Managed_Object< TYPE >& )`[private]`

## Friends And Related Function Documentation

template<classTYPE>
class this_prevents_compiler_warning_about_only_private_constructors`[friend]`

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

- Managed_Object.h