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

# ACE_Obstack_T Class Template Reference

`#include <Obstack_T.h>`

Collaboration diagram for ACE_Obstack_T:

[legend]
List of all members.

## Public Methods
| ACE_Obstack_T (size_t size = (4096 * sizeof (CHAR)) - sizeof (ACE_Obchunk), ACE_Allocator *allocator_strategy = 0)
| ~ACE_Obstack_T (void)
int | request (size_t len)
| Request Obstack to prepare a block at least len long for building a new string. Return -1 if fail, 0 if success.
CHAR* | grow (CHAR c)
| Inserting a new CHAR c into the current building block without freezing (null terminating) the block. This function will create new chunk by checking the boundary of current Obchunk. Return the location c gets inserted to, or 0 if error.
void | grow_fast (CHAR c)
| Inserting a new CHAR c into the current building block without freezing (null terminating) the block and without checking for out-of-bound error.
CHAR* | freeze (void)
| Freeze the current building block by null terminating it. Return the starting address of the current building block, 0 if error occurs.
CHAR* | copy (const CHAR *data, size_t len)
| Copy the data into the current Obchunk and freeze the current block. Return the starting address of the current building block, 0 if error occurs. len specify the string length, not the actually data size.
size_t | length (void) const
| Return the maximum length or size of a string that can be put into this Obstack. size = length * sizeof (CHAR).
size_t | size (void) const
void | release (void)
| "Release" the entire stack of Obchunks, putting it back on the free list.
void | dump (void) const
| Dump the state of an object.
## Public Attributes
| ACE_ALLOC_HOOK_DECLARE
| Declare the dynamic allocation hooks.
## Protected Methods
class ACE_Obchunk* | new_chunk (void)
## Protected Attributes
ACE_Allocator* | allocator_strategy_
| Pointer to the allocator used by this Obstack.
size_t | size_
| Current size of the Obstack;.
class ACE_Obchunk* | head_
| Head of the Obchunk chain.
class ACE_Obchunk* | curr_
| Pointer to the current Obchunk.

## Constructor & Destructor Documentation

template<classCHAR>
ACE_Obstack_T< CHAR >::ACE_Obstack_T<CHAR> ( | size_t size = (4096 * sizeof (CHAR)) - sizeof (ACE_Obchunk),
| ACE_Allocator * allocator_strategy = 0 )

template<classCHAR>
ACE_Obstack_T< CHAR >::~ACE_Obstack_T<CHAR> ( | void )

## Member Function Documentation

template<classCHAR>
CHAR * ACE_Obstack_T<CHAR>::copy ( | const CHAR * data,
| size_t len )

| Copy the data into the current Obchunk and freeze the current block. Return the starting address of the current building block, 0 if error occurs. len specify the string length, not the actually data size.

template<classCHAR>
void ACE_Obstack_T<CHAR>::dump ( | void ) const

| Dump the state of an object.

template<classCHAR>
ACE_INLINE CHAR * ACE_Obstack_T< CHAR >::freeze ( | void )

| Freeze the current building block by null terminating it. Return the starting address of the current building block, 0 if error occurs.

template<classCHAR>
CHAR * ACE_Obstack_T<CHAR>::grow ( | CHAR c )

| Inserting a new CHAR c into the current building block without freezing (null terminating) the block. This function will create new chunk by checking the boundary of current Obchunk. Return the location c gets inserted to, or 0 if error.

template<classCHAR>
ACE_INLINE void ACE_Obstack_T< CHAR >::grow_fast ( | CHAR c )

| Inserting a new CHAR c into the current building block without freezing (null terminating) the block and without checking for out-of-bound error.

template<classCHAR>
ACE_INLINE size_t ACE_Obstack_T< CHAR >::length ( | void ) const

| Return the maximum length or size of a string that can be put into this Obstack. size = length * sizeof (CHAR).

template<classCHAR>
ACE_Obchunk * ACE_Obstack_T< CHAR >::new_chunk ( | void )`[protected]`

template<classCHAR>
void ACE_Obstack_T<CHAR>::release ( | void )

| "Release" the entire stack of Obchunks, putting it back on the free list.

template<classCHAR>
int ACE_Obstack_T<CHAR>::request ( | size_t len )

| Request Obstack to prepare a block at least len long for building a new string. Return -1 if fail, 0 if success.

template<classCHAR>
ACE_INLINE size_t ACE_Obstack_T< CHAR >::size ( | void ) const

## Member Data Documentation

template<classCHAR>
ACE_Obstack_T<CHAR>::ACE_ALLOC_HOOK_DECLARE

| Declare the dynamic allocation hooks.

template<classCHAR>
ACE_Allocator * ACE_Obstack_T<CHAR>::allocator_strategy_`[protected]`

| Pointer to the allocator used by this Obstack.

template<classCHAR>
class ACE_Obchunk * ACE_Obstack_T<CHAR>::curr_`[protected]`

| Pointer to the current Obchunk.

template<classCHAR>
class ACE_Obchunk * ACE_Obstack_T<CHAR>::head_`[protected]`

| Head of the Obchunk chain.

template<classCHAR>
size_t ACE_Obstack_T<CHAR>::size_`[protected]`

| Current size of the Obstack;.

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

- Obstack_T.h
- Obstack_T.cpp
- Obstack_T.i