Evo C++ Library v0.5.1
Public Types | Static Public Member Functions | List of all members
DataFill< T, U > Struct Template Reference

#include <evo/impl/container.h>

Inheritance diagram for DataFill< T, U >:
Inheritance graph
[legend]

Detailed Description

template<class T, class U = typename TypeId::GetFill<T>::Id>
struct evo::DataFill< T, U >

Optimized data fill helpers.

Template Parameters
TData type to use
UInferred from T

Public Types

typedef RemoveConst< T >::Type Item
 Item type (const removed) More...
 

Static Public Member Functions

static void fill (T *dest, ulong size, const T &value)
 Fill with copies of given item. More...
 
static void fillends (T *dest, ulong size, const T &value, ulong start, ulong end)
 Fill each end of destination with copies of given item. More...
 

Member Typedef Documentation

◆ Item

typedef RemoveConst<T>::Type Item
inherited

Item type (const removed)

Member Function Documentation

◆ fill()

static void fill ( T *  dest,
ulong  size,
const T &  value 
)
inlinestatic

Fill with copies of given item.

  • This is optimized to use item operator=(), memcpy(), or memset() as applicable
Parameters
destDestination data pointer to fill - must be valid
sizeCopies to fill with as item count - must be positive
valueValue to fill with

◆ fillends()

static void fillends ( T *  dest,
ulong  size,
const T &  value,
ulong  start,
ulong  end 
)
inlinestatic

Fill each end of destination with copies of given item.

  • This is useful for initializing items outside given range (start to end), if any
  • The fills items before start (if start>0) and remaining items after (and including) end (if end<size)
  • This is optimized to use item operator=(), memcpy(), or memset() as applicable
Parameters
destDestination data pointer to fill - must be valid
sizeDestination size as item count - must be positive
valueValue to fill with
startStart index of items not to fill – items before this are filled
endEnd index of items not to fill – items after (and including) this are filled

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