External vector container. More...
#include <vector.h>
Public Member Functions | |
vector (file *from) | |
Construct vector from a file. |
External vector container.
For semantics of the methods see documentation of the STL std::vector Template parameters:
Tp_
type of contained objectsPgSz_
number of blocks in a pagePgTp_
pager type, random_pager<x>
or lru_pager<x>
, where x is number of pages, default is lru_pager<8>
BlkSize_
external block size in bytes, default is 2 MbytesAllocStr_
one of allocation strategies: striping
, RC
, SR
, or FR
default is RC vector< Tp_, PgSz_, PgTp_, BlkSize_, AllocStr_, SzTp_ >::vector | ( | file * | from | ) | [inline] |
Construct vector from a file.
from | file to be constructed from |
vector
can be assigned to a file (does not matter whether the files are different file
objects). The block size of the vector must me a multiple of the element size sizeof(Tp_)
and the page size (4096). References file::get_id(), typed_block< RawSize_, T_, NRef_, InfoType_ >::raw_size, and file::set_size().