OpenDDS  Snapshot(2023/04/28-20:55)
Public Member Functions | List of all members
OpenDDS::DCPS::DataReaderImpl_T< MessageType >::MessageTypeWithAllocator Class Reference

#include <DataReaderImpl_T.h>

Inheritance diagram for OpenDDS::DCPS::DataReaderImpl_T< MessageType >::MessageTypeWithAllocator:
Inheritance graph
[legend]
Collaboration diagram for OpenDDS::DCPS::DataReaderImpl_T< MessageType >::MessageTypeWithAllocator:
Collaboration graph
[legend]

Public Member Functions

void * operator new (size_t size, ACE_New_Allocator &pool)
 
void operator delete (void *memory, ACE_New_Allocator &pool)
 
void operator delete (void *memory)
 
 MessageTypeWithAllocator ()
 
 MessageTypeWithAllocator (const MessageType &other)
 
const MessageType * message () const
 

Additional Inherited Members

- Protected Member Functions inherited from OpenDDS::DCPS::EnableContainerSupportedUniquePtr< MessageTypeWithAllocator >
 EnableContainerSupportedUniquePtr ()
 
void _add_ref ()
 
void _remove_ref ()
 
long ref_count () const
 

Detailed Description

template<typename MessageType>
class OpenDDS::DCPS::DataReaderImpl_T< MessageType >::MessageTypeWithAllocator

Definition at line 89 of file DataReaderImpl_T.h.

Constructor & Destructor Documentation

◆ MessageTypeWithAllocator() [1/2]

template<typename MessageType>
OpenDDS::DCPS::DataReaderImpl_T< MessageType >::MessageTypeWithAllocator::MessageTypeWithAllocator ( )
inline

Definition at line 98 of file DataReaderImpl_T.h.

98 {}

◆ MessageTypeWithAllocator() [2/2]

template<typename MessageType>
OpenDDS::DCPS::DataReaderImpl_T< MessageType >::MessageTypeWithAllocator::MessageTypeWithAllocator ( const MessageType &  other)
inline

Definition at line 99 of file DataReaderImpl_T.h.

100  : MessageType(other)
101  {
102  }

Member Function Documentation

◆ message()

template<typename MessageType>
const MessageType* OpenDDS::DCPS::DataReaderImpl_T< MessageType >::MessageTypeWithAllocator::message ( void  ) const
inline

Definition at line 104 of file DataReaderImpl_T.h.

104 { return this; }

◆ operator delete() [1/2]

template<typename MessageType >
void OpenDDS::DCPS::DataReaderImpl_T< MessageType >::MessageTypeWithAllocator::operator delete ( void *  memory,
ACE_New_Allocator pool 
)

Definition at line 2468 of file DataReaderImpl_T.h.

References OPENDDS_END_VERSIONED_NAMESPACE_DECL.

2469 {
2470  operator delete(memory);
2471 }

◆ operator delete() [2/2]

template<typename MessageType >
void OpenDDS::DCPS::DataReaderImpl_T< MessageType >::MessageTypeWithAllocator::operator delete ( void *  memory)

Definition at line 2459 of file DataReaderImpl_T.h.

References OpenDDS::DCPS::DataReaderImpl_T< MessageType >::MessageTypeMemoryBlock::allocator_, and ACE_New_Allocator::free().

2460 {
2461  if (memory) {
2462  MessageTypeMemoryBlock* block = static_cast<MessageTypeMemoryBlock*>(memory);
2463  block->allocator_->free(block);
2464  }
2465 }

◆ operator new()

template<typename MessageType >
void * OpenDDS::DCPS::DataReaderImpl_T< MessageType >::MessageTypeWithAllocator::operator new ( size_t  size,
ACE_New_Allocator pool 
)

Definition at line 2449 of file DataReaderImpl_T.h.

References OpenDDS::DCPS::DataReaderImpl_T< MessageType >::MessageTypeMemoryBlock::allocator_.

2450 {
2451  typedef typename DataReaderImpl_T<MessageType>::MessageTypeMemoryBlock MessageTypeMemoryBlock;
2452  MessageTypeMemoryBlock* block =
2453  static_cast<MessageTypeMemoryBlock*>(pool.malloc(sizeof(MessageTypeMemoryBlock)));
2454  block->allocator_ = &pool;
2455  return block;
2456 }
virtual void * malloc(size_t nbytes)

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