DiskVecGenerator

template<typename val_t>
struct DiskVecGenerator

Generator class for a std::vector like.

Template Parameters:

val_t – content type for the vector

Public Types

using file_t = std::pair<std::string, bool>

type of the file information

using vec_t = DiskVec<val_t>

type of the actual vector

template<typename it_t, typename cmp_t>
using sorter_t = RamVectorSorter<it_t, cmp_t>

defines a sorter object for the generated vector

Public Functions

inline vec_t vec(file_t &rFile)

generate a vector for a given file.

Parameters:

rFile – the file.

Returns:

vec_t the generated vector.

inline void reserve(size_t uiSize, vec_t &rVec)

reserve memory for the vector

Parameters:
  • uiSize – keep memory for at least uiSize many elements.

  • rVec – the vector.

inline void try_shrink_to_fit(vec_t&)

shrink the capacity of the given vector to fit it’s content disabled at the moment.

inline file_t file(std::string sPath, bool bOpenInWriteMode)

generate a file for a given path.

Parameters:
  • sPath – path of the file.

  • bOpenInWriteMode – whether the file shall be opened in write mode.

Returns:

file_t the generated file.

Public Static Attributes

static const bool THREADSAVE = false

this vector is threadsave (as long as it’s size is not changed)