ACE_Data_Block Class ReferenceStores the data payload that is accessed via one or more ACE_Message_Block's. More...
Inheritance diagram for ACE_Data_Block:
![]()
Collaboration diagram for ACE_Data_Block:
![]()
Detailed DescriptionStores the data payload that is accessed via one or more ACE_Message_Block's.This data structure is reference counted to maximize sharing. It also contains the <locking_strategy_> (which protects the reference count from race conditions in concurrent programs) and the <allocation_strategy_> (which determines what memory pool is used to allocate the memory). Constructor & Destructor Documentation
Default "do-nothing" constructor.
Initialize.
Delete all the resources held in the message.
Member Function Documentation
Get type of the message.
Set type of the message.
Get message data pointer.
Set message data pointer (doesn't reallocate).
Return a pointer to 1 past the end of the allocated data in a message.
Return a pointer to 1 past the end of the allotted data in a message. The allotted data may be less than allocated data if <size()> is passed an argument less than <capacity()>.
Get the total amount of allotted space in the message. The amount of allotted space may be less than allocated space.
Set the total amount of space in the message. Returns 0 if successful, else -1.
Get the total amount of allocated space.
Return an exact "deep copy" of the message, i.e., create fresh new copies of all the Data_Blocks and continuations. Notice that Data_Blocks can act as "Prototypes", i.e. derived classes can override this method and create instances of themselves.
As clone above, but it does not copy the contents of the buffer, i.e., create a new Data_Block of the same dynamic type, with the same allocator, locking_strategy, and with the same amount of storage available (if max_size is zero) but the buffer is unitialized. If max_size is specified other than zero, it will be used when creating the new data block. Reimplemented in ACE_Locked_Data_Block< ACE_LOCK >.
Return a "shallow" copy that increments our reference count by 1.
Decrease the shared reference count by 1. If the reference count is > 0 then return this; else if reference count == 0 then delete
Bitwise-or the <more_flags> into the existing message flags and return the new value.
Clear the message flag bits specified in <less_flags> and return the new value.
Get the current message flags.
Obtain the allocator strategy.
Get the locking strategy.
Set a new locking strategy and return the hold one.
Dump the state of an object.
Get the current reference count.
Get the allocator used to create this object.
Internal release implementation.
Internal get the current reference count.
Friends And Related Function Documentation
Decrease the reference count, but don't delete the object. Returns 0 if the object should be removed. If <lock> is equal to the locking strategy then we assume that the lock is beign held by the current thread; this is used to release all the data blocks in a chain while holding a single lock.
Member Data DocumentationType of message.
Current size of message block.
Total size of buffer.
Misc flags (e.g., DONT_DELETE and USER_FLAGS).
Pointer To beginning of message payload.
Pointer to the allocator defined for this ACE_Data_Block. Note that this pointer is shared by all owners of this ACE_Data_Block.
Pointer to the locking strategy defined for this ACE_Data_Block. This is used to protect regions of code that access shared ACE_Data_Block state. Note that this lock is shared by all owners of the ACE_Data_Block's data.
Reference count for this ACE_Data_Block, which is used to avoid deep copies (i.e., <clone>). Note that this pointer value is shared by all owners of the <Data_Block>'s data, i.e., all the ACE_Message_Blocks.
The allocator use to destroy ourselves.
The documentation for this class was generated from the following files: Generated on Mon Sep 15 07:14:44 2008 for ACE by ![]() |