TrinityCore
MessageBuffer Class Reference

#include <MessageBuffer.h>

Public Member Functions

 MessageBuffer ()
 
 MessageBuffer (std::size_t initialSize)
 
 MessageBuffer (MessageBuffer const &right)
 
 MessageBuffer (MessageBuffer &&right) noexcept
 
void Reset ()
 
void Resize (size_type bytes)
 
uint8GetBasePointer ()
 
uint8GetReadPointer ()
 
uint8GetWritePointer ()
 
void ReadCompleted (size_type bytes)
 
void WriteCompleted (size_type bytes)
 
size_type GetActiveSize () const
 
size_type GetRemainingSpace () const
 
size_type GetBufferSize () const
 
void Normalize ()
 
void EnsureFreeSpace ()
 
void Write (void const *data, std::size_t size)
 
std::vector< uint8 > && Move ()
 
MessageBufferoperator= (MessageBuffer const &right)
 
MessageBufferoperator= (MessageBuffer &&right) noexcept
 

Private Types

typedef std::vector< uint8 >::size_type size_type
 

Private Attributes

size_type _wpos
 
size_type _rpos
 
std::vector< uint8_storage
 

Detailed Description

Definition at line 25 of file MessageBuffer.h.

Member Typedef Documentation

◆ size_type

typedef std::vector<uint8>::size_type MessageBuffer::size_type
private

Definition at line 27 of file MessageBuffer.h.

Constructor & Destructor Documentation

◆ MessageBuffer() [1/4]

MessageBuffer::MessageBuffer ( )
inline

Definition at line 30 of file MessageBuffer.h.

◆ MessageBuffer() [2/4]

MessageBuffer::MessageBuffer ( std::size_t  initialSize)
inlineexplicit

Definition at line 35 of file MessageBuffer.h.

◆ MessageBuffer() [3/4]

MessageBuffer::MessageBuffer ( MessageBuffer const &  right)
inline

Definition at line 40 of file MessageBuffer.h.

◆ MessageBuffer() [4/4]

MessageBuffer::MessageBuffer ( MessageBuffer &&  right)
inlinenoexcept

Definition at line 44 of file MessageBuffer.h.

Member Function Documentation

◆ EnsureFreeSpace()

void MessageBuffer::EnsureFreeSpace ( )
inline

Definition at line 86 of file MessageBuffer.h.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GetActiveSize()

size_type MessageBuffer::GetActiveSize ( ) const
inline

Definition at line 67 of file MessageBuffer.h.

+ Here is the caller graph for this function:

◆ GetBasePointer()

uint8 * MessageBuffer::GetBasePointer ( )
inline

Definition at line 57 of file MessageBuffer.h.

+ Here is the caller graph for this function:

◆ GetBufferSize()

size_type MessageBuffer::GetBufferSize ( ) const
inline

Definition at line 71 of file MessageBuffer.h.

+ Here is the caller graph for this function:

◆ GetReadPointer()

uint8 * MessageBuffer::GetReadPointer ( )
inline

Definition at line 59 of file MessageBuffer.h.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GetRemainingSpace()

size_type MessageBuffer::GetRemainingSpace ( ) const
inline

Definition at line 69 of file MessageBuffer.h.

+ Here is the caller graph for this function:

◆ GetWritePointer()

uint8 * MessageBuffer::GetWritePointer ( )
inline

Definition at line 61 of file MessageBuffer.h.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ Move()

std::vector< uint8 > && MessageBuffer::Move ( )
inline

Definition at line 102 of file MessageBuffer.h.

◆ Normalize()

void MessageBuffer::Normalize ( )
inline

Definition at line 74 of file MessageBuffer.h.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ operator=() [1/2]

MessageBuffer & MessageBuffer::operator= ( MessageBuffer &&  right)
inlinenoexcept

Definition at line 121 of file MessageBuffer.h.

◆ operator=() [2/2]

MessageBuffer & MessageBuffer::operator= ( MessageBuffer const &  right)
inline

Definition at line 109 of file MessageBuffer.h.

◆ ReadCompleted()

void MessageBuffer::ReadCompleted ( size_type  bytes)
inline

Definition at line 63 of file MessageBuffer.h.

+ Here is the caller graph for this function:

◆ Reset()

void MessageBuffer::Reset ( )
inline

Definition at line 46 of file MessageBuffer.h.

+ Here is the caller graph for this function:

◆ Resize()

void MessageBuffer::Resize ( size_type  bytes)
inline

Definition at line 52 of file MessageBuffer.h.

+ Here is the caller graph for this function:

◆ Write()

void MessageBuffer::Write ( void const *  data,
std::size_t  size 
)
inline

Definition at line 93 of file MessageBuffer.h.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ WriteCompleted()

void MessageBuffer::WriteCompleted ( size_type  bytes)
inline

Definition at line 65 of file MessageBuffer.h.

+ Here is the caller graph for this function:

Member Data Documentation

◆ _rpos

size_type MessageBuffer::_rpos
private

Definition at line 135 of file MessageBuffer.h.

◆ _storage

std::vector<uint8> MessageBuffer::_storage
private

Definition at line 136 of file MessageBuffer.h.

◆ _wpos

size_type MessageBuffer::_wpos
private

Definition at line 134 of file MessageBuffer.h.


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