GEOSX
Public Member Functions | List of all members
LvArray::sortedArrayManipulation::CallBacks< T > Class Template Reference

This class provides a no-op callbacks interface for the ArrayManipulation sorted routines. More...

#include <sortedArrayManipulation.hpp>

Public Member Functions

T * incrementSize (T *const curPtr, std::ptrdiff_t const nToAdd)
 Callback signaling that the size of the array has increased. More...
 
void insert (std::ptrdiff_t const pos)
 Callback signaling that a value was inserted at the given position. More...
 
void set (std::ptrdiff_t const pos, std::ptrdiff_t const valuePos)
 Callback signaling that the entry of the array at the first position was set to the value at the second position. More...
 
void insert (std::ptrdiff_t const nLeftToInsert, std::ptrdiff_t const valuePos, std::ptrdiff_t const pos, std::ptrdiff_t const prevPos)
 Callback signaling that the that the given value was inserted at the given position. Further information is provided in order to make the insertion efficient. More...
 
void remove (std::ptrdiff_t const pos)
 Callback signaling that an entry was removed from the array at given position. More...
 
void remove (std::ptrdiff_t const nRemoved, std::ptrdiff_t const curPos, std::ptrdiff_t const nextPos)
 Callback signaling that the given entry was removed from the given position. Further information is provided in order to make the removal efficient. More...
 

Detailed Description

template<typename T>
class LvArray::sortedArrayManipulation::CallBacks< T >

This class provides a no-op callbacks interface for the ArrayManipulation sorted routines.

Template Parameters
TThe type of the values contained in the array.

Definition at line 72 of file sortedArrayManipulation.hpp.

Member Function Documentation

◆ incrementSize()

template<typename T>
T* LvArray::sortedArrayManipulation::CallBacks< T >::incrementSize ( T *const  curPtr,
std::ptrdiff_t const  nToAdd 
)
inline

Callback signaling that the size of the array has increased.

Parameters
curPtrthe current pointer to the array.
nToAddthe increase in the size of the array.
Returns
a pointer to the array.

Definition at line 83 of file sortedArrayManipulation.hpp.

◆ insert() [1/2]

template<typename T>
void LvArray::sortedArrayManipulation::CallBacks< T >::insert ( std::ptrdiff_t const  pos)
inline

Callback signaling that a value was inserted at the given position.

Parameters
posthe position the value was inserted at.

Definition at line 95 of file sortedArrayManipulation.hpp.

◆ insert() [2/2]

template<typename T>
void LvArray::sortedArrayManipulation::CallBacks< T >::insert ( std::ptrdiff_t const  nLeftToInsert,
std::ptrdiff_t const  valuePos,
std::ptrdiff_t const  pos,
std::ptrdiff_t const  prevPos 
)
inline

Callback signaling that the that the given value was inserted at the given position. Further information is provided in order to make the insertion efficient.

Parameters
nLeftToInsertthe number of insertions that occur after this one.
valuePosthe position of the value that was inserted.
posthe position in the array the value was inserted at.
prevPosthe position the previous value was inserted at or the size of the array if it is the first insertion.

Definition at line 122 of file sortedArrayManipulation.hpp.

◆ remove() [1/2]

template<typename T>
void LvArray::sortedArrayManipulation::CallBacks< T >::remove ( std::ptrdiff_t const  pos)
inline

Callback signaling that an entry was removed from the array at given position.

Parameters
posThe position of the entry that was removed.

Definition at line 138 of file sortedArrayManipulation.hpp.

◆ remove() [2/2]

template<typename T>
void LvArray::sortedArrayManipulation::CallBacks< T >::remove ( std::ptrdiff_t const  nRemoved,
std::ptrdiff_t const  curPos,
std::ptrdiff_t const  nextPos 
)
inline

Callback signaling that the given entry was removed from the given position. Further information is provided in order to make the removal efficient.

Parameters
nRemovedthe number of entries removed, starts at 1.
curPosthe position in the array the entry was removed at.
nextPosthe position the next entry will be removed at or the original size of the array if this was the last entry removed.

Definition at line 150 of file sortedArrayManipulation.hpp.

◆ set()

template<typename T>
void LvArray::sortedArrayManipulation::CallBacks< T >::set ( std::ptrdiff_t const  pos,
std::ptrdiff_t const  valuePos 
)
inline

Callback signaling that the entry of the array at the first position was set to the value at the second position.

Parameters
posthe position in the array that was set.
valuePosthe position of the value that the entry in the array was set to.

Definition at line 105 of file sortedArrayManipulation.hpp.


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