vec_t Class Reference

Inherits cvec_t.

Inherited by zvec_t.

Inheritance diagram for vec_t:

Inheritance graph
[legend]
Collaboration diagram for vec_t:

Collaboration graph
[legend]
List of all members.

Detailed Description

Vector: a set of {pointer,length} pairs for memory manipulation.

This class is used throughout the storage manager and in its API for copy-in and copy-out.

Examples:

create_rec.cpp, lockid_test.cpp, log_exceed.cpp, sort_stream.cpp, and vtable_example.cpp.

Definition at line 261 of file vec_t.h.

Public Member Functions

 vec_t ()
 Construct empty vector.
 vec_t (const cvec_t &v1, const cvec_t &v2)
 Construct a vector that combines two others.
 vec_t (const void *p, size_t l)
 Construct a vector from a memory location and a length.
 vec_t (const vec_t &v, size_t offset, size_t limit)
 Construct a vector from a memory location + offset and a length.
const vec_tcopy_from (const void *p, size_t limit, size_t offset=0) const
 Overwrites the data area to which the vector points.
vec_tcopy_from (const cvec_t &v)
 Overwrites the data area to which the vector points.
vec_tcopy_from (const cvec_t &v, size_t offset, size_t limit, size_t myoffset=0)
 Overwrites the data area to which the vector points.
CADDR_T ptr (int index) const
 Return the pointer from the {pointer, length} pair at the given index.
size_t len (int index) const
 Return the length from the {pointer, length} pair at the given index.

Static Public Attributes

static vec_tpos_inf
 A constant vector representing infinity. Used for key-value pairs, scans.
static vec_tneg_inf
 A constant vector representing negative infinity. Used for key-value pairs, scans.


Member Function Documentation

const vec_t& vec_t::copy_from ( const void *  p,
size_t  limit,
size_t  offset = 0 
) const

Overwrites the data area to which the vector points.

Scatter limit bytes of data from the location at p into the locations identified by this vector.

vec_t& vec_t::copy_from ( const cvec_t v  ) 

Overwrites the data area to which the vector points.

Write data from the vector v into the locations identified by this vector.

vec_t& vec_t::copy_from ( const cvec_t v,
size_t  offset,
size_t  limit,
size_t  myoffset = 0 
)

Overwrites the data area to which the vector points.

Write data from the vector v, starting at the given offset from the start of vector v, into the locations identified by this vector.


The documentation for this class was generated from the following file:
Generated on Wed Jul 7 17:22:43 2010 for Shore Storage Manager by  doxygen 1.4.7