Evo C++ Library v0.5.1
Public Member Functions | Public Attributes | List of all members
List< T, TSize >::Edit Struct Reference

#include <evo/list.h>

Detailed Description

template<class T, class TSize = SizeT>
struct evo::List< T, TSize >::Edit

Edit buffer for advEdit().

Public Member Functions

 Edit ()
 Constructor. More...
 
 ~Edit ()
 Destructor, frees buffer if needed. More...
 
void clear ()
 Clear data and free buffer. More...
 
Size write (const ListBaseType &src, Size start=0, Size count=ALL)
 Write (copy) data from source. More...
 
Size write (const Item *data, Size count)
 Write (copy) data from buffer. More...
 

Public Attributes

void * header
 Internal buffer data, do not modify. More...
 
T * ptr
 Data pointer, use to write to buffer. More...
 
Size size
 Data size, update after write. More...
 

Constructor & Destructor Documentation

◆ Edit()

Edit ( )
inline

Constructor.

◆ ~Edit()

~Edit ( )
inline

Destructor, frees buffer if needed.

Member Function Documentation

◆ clear()

void clear ( )
inline

Clear data and free buffer.

◆ write() [1/2]

Size write ( const ListBaseType src,
Size  start = 0,
Size  count = ALL 
)
inline

Write (copy) data from source.

  • This appends to end of edit data (ptr+size) and updates size member
  • Caution: This assumes destination items are uninitialized (only matters for non-POD types)
  • Caution: Results are undefined if copying from buffer being edited in-place (advEdit() returned false)
  • Caution: Results are undefined if writing after end of buffer
Parameters
srcSource to copy from
startStart position to copy from
countItem count to copy, ALL for all
Returns
Actual item count written, 0 for none

◆ write() [2/2]

Size write ( const Item data,
Size  count 
)
inline

Write (copy) data from buffer.

  • This appends to end of edit data (ptr+size) and updates size member
  • Caution: This assumes destination items are uninitialized (only matters for non-POD types)
  • Caution: Results are undefined if copying from buffer being edited in-place (advEdit() returned false)
  • Caution: Results are undefined if writing after end of buffer
Parameters
dataData pointer to copy from
countItem count to copy
Returns
Actual item count written (same as count)

Member Data Documentation

◆ header

void* header

Internal buffer data, do not modify.

◆ ptr

T* ptr

Data pointer, use to write to buffer.

◆ size

Size size

Data size, update after write.


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