TrinityCore
Loading...
Searching...
No Matches
WorldPackets::Array< T, N > Class Template Reference

#include <PacketUtilities.h>

Public Types

using allocator_traits = ArrayAllocatorTraits< T, N,(sizeof(T) *N > 0x1000)>
 
using allocator_type = typename allocator_traits::allocator_type
 
using allocator_resource_type = typename allocator_traits::resource_type
 
using storage_type = std::vector< T, allocator_type >
 
using max_capacity = std::integral_constant< std::size_t, N >
 
using value_type = typename storage_type::value_type
 
using size_type = typename storage_type::size_type
 
using pointer = typename storage_type::pointer
 
using const_pointer = typename storage_type::const_pointer
 
using reference = typename storage_type::reference
 
using const_reference = typename storage_type::const_reference
 
using iterator = typename storage_type::iterator
 
using const_iterator = typename storage_type::const_iterator
 

Public Member Functions

 Array ()
 
 Array (Array const &other)
 
 Array (Array &&other) noexcept=delete
 
Arrayoperator= (Array const &other)
 
Arrayoperator= (Array &&other) noexcept=delete
 
 ~Array ()=default
 
iterator begin ()
 
const_iterator begin () const
 
iterator end ()
 
const_iterator end () const
 
pointer data ()
 
const_pointer data () const
 
size_type size () const
 
bool empty () const
 
reference operator[] (size_type i)
 
const_reference operator[] (size_type i) const
 
void resize (size_type newSize)
 
void push_back (value_type const &value)
 
void push_back (value_type &&value)
 
template<typename... Args>
T & emplace_back (Args &&... args)
 
iterator erase (const_iterator first, const_iterator last)
 
void clear ()
 

Private Attributes

allocator_resource_type _allocatorResource
 
storage_type _storage
 

Detailed Description

template<typename T, std::size_t N>
class WorldPackets::Array< T, N >

Utility class for automated prevention of loop counter spoofing in client packets

Definition at line 169 of file PacketUtilities.h.

Member Typedef Documentation

◆ allocator_resource_type

template<typename T , std::size_t N>
using WorldPackets::Array< T, N >::allocator_resource_type = typename allocator_traits::resource_type

Definition at line 174 of file PacketUtilities.h.

◆ allocator_traits

template<typename T , std::size_t N>
using WorldPackets::Array< T, N >::allocator_traits = ArrayAllocatorTraits<T, N, (sizeof(T) * N > 0x1000)>

Definition at line 172 of file PacketUtilities.h.

◆ allocator_type

template<typename T , std::size_t N>
using WorldPackets::Array< T, N >::allocator_type = typename allocator_traits::allocator_type

Definition at line 173 of file PacketUtilities.h.

◆ const_iterator

template<typename T , std::size_t N>
using WorldPackets::Array< T, N >::const_iterator = typename storage_type::const_iterator

Definition at line 187 of file PacketUtilities.h.

◆ const_pointer

template<typename T , std::size_t N>
using WorldPackets::Array< T, N >::const_pointer = typename storage_type::const_pointer

Definition at line 183 of file PacketUtilities.h.

◆ const_reference

template<typename T , std::size_t N>
using WorldPackets::Array< T, N >::const_reference = typename storage_type::const_reference

Definition at line 185 of file PacketUtilities.h.

◆ iterator

template<typename T , std::size_t N>
using WorldPackets::Array< T, N >::iterator = typename storage_type::iterator

Definition at line 186 of file PacketUtilities.h.

◆ max_capacity

template<typename T , std::size_t N>
using WorldPackets::Array< T, N >::max_capacity = std::integral_constant<std::size_t, N>

Definition at line 178 of file PacketUtilities.h.

◆ pointer

template<typename T , std::size_t N>
using WorldPackets::Array< T, N >::pointer = typename storage_type::pointer

Definition at line 182 of file PacketUtilities.h.

◆ reference

template<typename T , std::size_t N>
using WorldPackets::Array< T, N >::reference = typename storage_type::reference

Definition at line 184 of file PacketUtilities.h.

◆ size_type

template<typename T , std::size_t N>
using WorldPackets::Array< T, N >::size_type = typename storage_type::size_type

Definition at line 181 of file PacketUtilities.h.

◆ storage_type

template<typename T , std::size_t N>
using WorldPackets::Array< T, N >::storage_type = std::vector<T, allocator_type>

Definition at line 176 of file PacketUtilities.h.

◆ value_type

template<typename T , std::size_t N>
using WorldPackets::Array< T, N >::value_type = typename storage_type::value_type

Definition at line 180 of file PacketUtilities.h.

Constructor & Destructor Documentation

◆ Array() [1/3]

template<typename T , std::size_t N>
WorldPackets::Array< T, N >::Array ( )
inline

Definition at line 189 of file PacketUtilities.h.

◆ Array() [2/3]

template<typename T , std::size_t N>
WorldPackets::Array< T, N >::Array ( Array< T, N > const &  other)
inline

Definition at line 191 of file PacketUtilities.h.

+ Here is the call graph for this function:

◆ Array() [3/3]

template<typename T , std::size_t N>
WorldPackets::Array< T, N >::Array ( Array< T, N > &&  other)
deletenoexcept

◆ ~Array()

template<typename T , std::size_t N>
WorldPackets::Array< T, N >::~Array ( )
default

Member Function Documentation

◆ begin() [1/2]

template<typename T , std::size_t N>
iterator WorldPackets::Array< T, N >::begin ( )
inline

Definition at line 215 of file PacketUtilities.h.

+ Here is the caller graph for this function:

◆ begin() [2/2]

template<typename T , std::size_t N>
const_iterator WorldPackets::Array< T, N >::begin ( ) const
inline

Definition at line 216 of file PacketUtilities.h.

◆ clear()

template<typename T , std::size_t N>
void WorldPackets::Array< T, N >::clear ( )
inline

Definition at line 266 of file PacketUtilities.h.

+ Here is the caller graph for this function:

◆ data() [1/2]

template<typename T , std::size_t N>
pointer WorldPackets::Array< T, N >::data ( )
inline

Definition at line 221 of file PacketUtilities.h.

+ Here is the caller graph for this function:

◆ data() [2/2]

template<typename T , std::size_t N>
const_pointer WorldPackets::Array< T, N >::data ( ) const
inline

Definition at line 222 of file PacketUtilities.h.

◆ emplace_back()

template<typename T , std::size_t N>
template<typename... Args>
T & WorldPackets::Array< T, N >::emplace_back ( Args &&...  args)
inline

Definition at line 255 of file PacketUtilities.h.

◆ empty()

template<typename T , std::size_t N>
bool WorldPackets::Array< T, N >::empty ( ) const
inline

Definition at line 225 of file PacketUtilities.h.

+ Here is the caller graph for this function:

◆ end() [1/2]

template<typename T , std::size_t N>
iterator WorldPackets::Array< T, N >::end ( )
inline

Definition at line 218 of file PacketUtilities.h.

+ Here is the caller graph for this function:

◆ end() [2/2]

template<typename T , std::size_t N>
const_iterator WorldPackets::Array< T, N >::end ( ) const
inline

Definition at line 219 of file PacketUtilities.h.

◆ erase()

template<typename T , std::size_t N>
iterator WorldPackets::Array< T, N >::erase ( const_iterator  first,
const_iterator  last 
)
inline

Definition at line 261 of file PacketUtilities.h.

◆ operator=() [1/2]

template<typename T , std::size_t N>
Array & WorldPackets::Array< T, N >::operator= ( Array< T, N > &&  other)
deletenoexcept

◆ operator=() [2/2]

template<typename T , std::size_t N>
Array & WorldPackets::Array< T, N >::operator= ( Array< T, N > const &  other)
inline

Definition at line 199 of file PacketUtilities.h.

+ Here is the call graph for this function:

◆ operator[]() [1/2]

template<typename T , std::size_t N>
reference WorldPackets::Array< T, N >::operator[] ( size_type  i)
inline

Definition at line 227 of file PacketUtilities.h.

◆ operator[]() [2/2]

template<typename T , std::size_t N>
const_reference WorldPackets::Array< T, N >::operator[] ( size_type  i) const
inline

Definition at line 228 of file PacketUtilities.h.

◆ push_back() [1/2]

template<typename T , std::size_t N>
void WorldPackets::Array< T, N >::push_back ( value_type &&  value)
inline

Definition at line 246 of file PacketUtilities.h.

+ Here is the call graph for this function:

◆ push_back() [2/2]

template<typename T , std::size_t N>
void WorldPackets::Array< T, N >::push_back ( value_type const &  value)
inline

Definition at line 238 of file PacketUtilities.h.

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

◆ resize()

template<typename T , std::size_t N>
void WorldPackets::Array< T, N >::resize ( size_type  newSize)
inline

Definition at line 230 of file PacketUtilities.h.

+ Here is the call graph for this function:

◆ size()

template<typename T , std::size_t N>
size_type WorldPackets::Array< T, N >::size ( ) const
inline

Definition at line 224 of file PacketUtilities.h.

+ Here is the caller graph for this function:

Member Data Documentation

◆ _allocatorResource

template<typename T , std::size_t N>
allocator_resource_type WorldPackets::Array< T, N >::_allocatorResource
private

Definition at line 272 of file PacketUtilities.h.

◆ _storage

template<typename T , std::size_t N>
storage_type WorldPackets::Array< T, N >::_storage
private

Definition at line 273 of file PacketUtilities.h.


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