Public Member Functions

stream::runs_creator< use_push< ValueType_ >, Cmp_, BlockSize_, AllocStr_ > Class Template Reference
[Stream package]

Forms sorted runs of elements passed in push() method. More...

#include <sort_stream.h>

Collaboration diagram for stream::runs_creator< use_push< ValueType_ >, Cmp_, BlockSize_, AllocStr_ >:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 runs_creator (Cmp_ c, unsigned_type memory_to_use)
 Creates the object.
void push (const value_type &val)
 Adds new element to the sorter.
const sorted_runs_type & result ()
 Returns the sorted runs object.

Detailed Description

template<class ValueType_, class Cmp_, unsigned BlockSize_, class AllocStr_>
class stream::runs_creator< use_push< ValueType_ >, Cmp_, BlockSize_, AllocStr_ >

Forms sorted runs of elements passed in push() method.

A specialization of runs_creator that allows to create sorted runs data structure usable for runs_merger from elements passed in sorted push() method.
Template parameters:


Constructor & Destructor Documentation

template<class ValueType_ , class Cmp_ , unsigned BlockSize_, class AllocStr_ >
stream::runs_creator< use_push< ValueType_ >, Cmp_, BlockSize_, AllocStr_ >::runs_creator ( Cmp_  c,
unsigned_type  memory_to_use 
) [inline]

Creates the object.

Parameters:
c comparator object
memory_to_use memory amount that is allowed to used by the sorter in bytes

Member Function Documentation

template<class ValueType_ , class Cmp_ , unsigned BlockSize_, class AllocStr_ >
void stream::runs_creator< use_push< ValueType_ >, Cmp_, BlockSize_, AllocStr_ >::push ( const value_type &  val  )  [inline]

Adds new element to the sorter.

Parameters:
val value to be added

References element_block< T, Size_ >::begin(), element_block< T, Size_ >::end(), and block_manager::new_blocks().

template<class ValueType_ , class Cmp_ , unsigned BlockSize_, class AllocStr_ >
const sorted_runs_type& stream::runs_creator< use_push< ValueType_ >, Cmp_, BlockSize_, AllocStr_ >::result (  )  [inline]

Returns the sorted runs object.

Returns:
Sorted runs object.
Remarks:
Returned object is intended to be used by runs_merger object as input

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