|
Zero
0.1.0
|
A constant vec_t (meaning things pointed to cannot be changed). More...
#include <vec_t.h>
Public Types | |
| enum | dummy_enumid { max_small = MAX_SMALL_VEC_SIZE } |
Public Member Functions | |
| cvec_t () | |
| cvec_t (const cvec_t &v1, const cvec_t &v2) | |
| cvec_t (const void *p, size_t l) | |
| cvec_t (const cvec_t &v, size_t offset, size_t limit) | |
| ~cvec_t () | |
| void | split (size_t l1, cvec_t &v1, cvec_t &v2) const |
| cvec_t & | put (const cvec_t &v, size_t offset, size_t nbytes) |
| cvec_t & | put (const void *p, size_t l) |
| append { p, l } pair to this vector. More... | |
| cvec_t & | put (const cvec_t &v) |
| append { p, l } pairs from v to this vector. More... | |
| cvec_t & | put (const w_keystr_t &keystr) |
| cvec_t & | put (const w_keystr_t &keystr, size_t offset, size_t nbytes) |
| cvec_t & | reset () |
| Clear this vector. More... | |
| cvec_t & | set (const cvec_t &v1, const cvec_t &v2) |
| reset, then copy over all {p,l} pairs from v1 and v2 More... | |
| cvec_t & | set (const cvec_t &v) |
| reset, then copy over all {p,l} pairs from v More... | |
| cvec_t & | set (const void *p, size_t l) |
| reset, then install {p,l} pair More... | |
| cvec_t & | set (const cvec_t &v, size_t offset, size_t limit) |
| size_t | size () const |
| returns # bytes this vector references More... | |
| size_t | copy_to (void *p, size_t limit=0x7fffffff) const |
| size_t | copy_to (std::basic_string< unsigned char > &buffer, size_t limit=0x7fffffff) const |
| int | cmp (const cvec_t &v, size_t *common_size=0) const |
| int | cmp (const void *s, size_t len) const |
| int | count () const |
| return number of {p,l} pairs More... | |
| int | checksum () const |
| void | calc_kvl (uint32_t &h) const |
| void | init () |
| void | vecdelparts () |
| void | delparts () |
| bool | is_pos_inf () const |
| bool | is_neg_inf () const |
| bool | is_null () const |
| bool | is_zvec () const |
Static Public Member Functions | |
| static int | cmp (const cvec_t &v1, const cvec_t &v2, size_t *common_size=0) |
Static Public Attributes | |
| static cvec_t | pos_inf |
| static cvec_t | neg_inf |
Static Protected Attributes | |
| static CADDR_T | zero_location |
Private Member Functions | |
| cvec_t (const cvec_t &v) | |
| bool | _is_large () const |
| int | _max_cnt () const |
| void | _grow (int total_cnt) |
| cvec_t & | operator= (cvec_t) |
| size_t | recalc_size () const |
| bool | check_size () const |
Friends | |
| class | vec_t |
| bool | operator< (const cvec_t &v1, const cvec_t &v2) |
| bool | operator<= (const cvec_t &v1, const cvec_t &v2) |
| bool | operator>= (const cvec_t &v1, const cvec_t &v2) |
| bool | operator> (const cvec_t &v1, const cvec_t &v2) |
| bool | operator== (const cvec_t &v1, const cvec_t &v2) |
| bool | operator!= (const cvec_t &v1, const cvec_t &v2) |
| ostream & | operator<< (ostream &, const cvec_t &v) |
| istream & | operator>> (istream &, cvec_t &v) |
Additional Inherited Members | |
Protected Attributes inherited from VEC_t | |
| int | _cnt |
| size_t | _size |
| vec_pair_t * | _base |
| vec_pair_t | _pair [MAX_SMALL_VEC_SIZE] |
A constant vec_t (meaning things pointed to cannot be changed).
| enum cvec_t::dummy_enumid |
|
inline |
|
inline |
|
inline |
| cvec_t::~cvec_t | ( | ) |
|
private |
|
private |
|
inlineprivate |
|
inlineprivate |
| void cvec_t::calc_kvl | ( | uint32_t & | h | ) | const |
|
private |
| int cvec_t::checksum | ( | ) | const |
| int cvec_t::cmp | ( | const cvec_t & | v, |
| size_t * | common_size = 0 |
||
| ) | const |
Return value : 0 if equal; common_size not set : <0 if this < v or v is longer than this, but equal in length of this. : >0 if this > v or this is longer than v, but equal in length of v.
| int cvec_t::cmp | ( | const void * | s, |
| size_t | len | ||
| ) | const |
|
inlinestatic |
| size_t cvec_t::copy_to | ( | void * | p, |
| size_t | limit = 0x7fffffff |
||
| ) | const |
Write from vector to p, no more than limit bytes.
| size_t cvec_t::copy_to | ( | std::basic_string< unsigned char > & | buffer, |
| size_t | limit = 0x7fffffff |
||
| ) | const |
Write from vector to std::string, no more than limit bytes.
|
inline |
return number of {p,l} pairs
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
append {p,l} pairs from vector v, (first ptr is v + offset), as needed to append at most nbytes
| cvec_t& cvec_t::put | ( | const void * | p, |
| size_t | l | ||
| ) |
append { p, l } pair to this vector.
| cvec_t& cvec_t::put | ( | const w_keystr_t & | keystr | ) |
Add the key string WITH sign byte.
| cvec_t& cvec_t::put | ( | const w_keystr_t & | keystr, |
| size_t | offset, | ||
| size_t | nbytes | ||
| ) |
Add the key string WITH sign byte.
|
private |
|
inline |
Clear this vector.
reset, then copy over all {p,l} pairs from v1 and v2
|
inline |
reset, then install {p,l} pair
reset, then install {p,l} pairs as needed to capture limit bytes starting at v + offset
|
inline |
returns # bytes this vector references
|
inline |
|
friend |
|
friend |
|
friend |
|
static |
|
static |
|
staticprotected |
1.8.12