OpenDDS  Snapshot(2023/04/07-19:43)
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 2466 of file DataReaderImpl_T.h.

References OPENDDS_END_VERSIONED_NAMESPACE_DECL.

2467 {
2468  operator delete(memory);
2469 }

◆ operator delete() [2/2]

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

Definition at line 2457 of file DataReaderImpl_T.h.

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

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

◆ operator new()

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

Definition at line 2447 of file DataReaderImpl_T.h.

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

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

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