A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://www.ncbi.nlm.nih.gov/IEB/ToolBox/CPP_DOC/doxyhtml/bdb__ext__blob_8cpp_source.html below:

NCBI C++ ToolKit: src/db/bdb/bdb_ext_blob.cpp Source File

72

this->

id_to

= max_id;

97  if

(

buf

.size() == 0) {

100  unsigned

from = this->

id_from

;

101  unsigned

to = this->

id_to

;

103  if

(from == 0 && to == 0)

106  if

(blob_id > to || blob_id < from)

140  if

(

m_Loc

.size() == 0) {

143  if

(

m_Loc

.size() != 1) {

144  string msg

=

"Not a single chunk BLOB"

;

159  if

(

m_Loc

.size() == 1) {

170  Uint8

buf_offset)

const 175  buf

->resize(ser_size + (

size_t

)buf_offset);

177  unsigned char

* ptr = &((*buf)[0]);

182  if

(

m_Loc

.size() == 1) {

185

::memcpy(ptr, &magic,

sizeof

(magic));

186

ptr +=

sizeof

(magic);

188  unsigned

sz = (unsigned)(

m_Loc

.size());

191

::memcpy(ptr, &sz,

sizeof

(sz));

195  for

(

size_t i

= 0;

i

<

m_Loc

.size(); ++

i

) {

198

ptr +=

sizeof

(loc.

offset

);

199

::memcpy(ptr, &loc.

size

,

sizeof

(loc.

size

));

200

ptr +=

sizeof

(loc.

size

);

203  size_t

buffer_offset = ptr - &((*buf)[0]);

212  const unsigned char

* ptr = &

buf

[0];

216

::memcpy(&magic, ptr,

sizeof

(magic));

217

ptr +=

sizeof

(magic);

224

::memcpy(&sz, ptr,

sizeof

(sz));

229  for

(

size_t i

= 0;

i

<

m_Loc

.size(); ++

i

) {

232

ptr +=

sizeof

(loc.

offset

);

233

::memcpy(&loc.

size

, ptr,

sizeof

(loc.

size

));

234

ptr +=

sizeof

(loc.

size

);

238  size_t

buffer_offset = ptr - &((

buf

)[0]);

286  string msg

=

"Not a single chunk BLOB :"

+

305  Uint4

min_id_tmp = 0;

306  Uint4

max_id_tmp = 0;

322

*min_id = min_id_tmp;

324

*max_id = max_id_tmp;

330  bool

is_single_chunk;

336  bool

* is_single_chunk)

const 341

*is_single_chunk =

true

;

346  size_t

ssize32 = ssize;

347  size_t

ssize16 = ssize;

351

ssize +=

sizeof

(bl.

blob_id

);

354

ssize32 +=

sizeof

(bl.

blob_id

) + 4;

355

ssize16 +=

sizeof

(bl.

blob_id

) + 4;

358

*is_single_chunk =

false

;

363

ssize16 +=

sizeof

(

unsigned

short) +

sizeof

(

unsigned short

);

364

ssize32 +=

sizeof

(unsigned) +

sizeof

(

unsigned

);

382  if

(*is_single_chunk) {

401  Uint8

buf_offset)

const 406  bool

is_single_chunk;

410  buf

->resize(ser_size + (

size_t

)buf_offset);

412  unsigned char

* ptr = &((*buf)[0]);

413  unsigned char

* ptr0 = ptr;

418  if

(bits_used == 16) {

421  if

(bits_used == 32) {

425  if

(is_single_chunk) {

429

::memcpy(ptr, &magic,

sizeof

(magic));

430

ptr +=

sizeof

(magic);

432  unsigned

sz = (unsigned)(

m_BlobMap

.size());

433

::memcpy(ptr, &sz,

sizeof

(sz));

442  if

(!is_single_chunk) {

444

::memcpy(ptr, &sz,

sizeof

(sz));

449  if

(bits_used == 16) {

452

::memcpy(ptr, &s,

sizeof

(s));

455

::memcpy(ptr, &s,

sizeof

(s));

458  if

(bits_used == 32) {

461

::memcpy(ptr, &s,

sizeof

(s));

464

::memcpy(ptr, &s,

sizeof

(s));

469

ptr +=

sizeof

(

Uint8

);

472

ptr +=

sizeof

(

Uint8

);

478  buf

->resize(ptr - ptr0);

484  const unsigned char

* ptr = &

buf

[0];

488

::memcpy(&magic, ptr,

sizeof

(magic));

489

ptr +=

sizeof

(magic);

491  unsigned

bits_used = 64;

501

::memcpy(&sz, ptr,

sizeof

(sz));

511  if

(is_single_chunk) {

514

::memcpy(&sz, ptr,

sizeof

(sz));

520  if

(bits_used == 16) {

522

::memcpy(&s, ptr,

sizeof

(s));

525

::memcpy(&s, ptr,

sizeof

(s));

529  if

(bits_used == 32) {

531

::memcpy(&s, ptr,

sizeof

(s));

534

::memcpy(&s, ptr,

sizeof

(s));

539

ptr,

sizeof

(

Uint8

));

540

ptr +=

sizeof

(

Uint8

);

542

ptr,

sizeof

(

Uint8

));

543

ptr +=

sizeof

(

Uint8

);

Exception specifications for BDB library.

static const unsigned s_ExtBlob_Mask_16bit

static const unsigned s_ExtBlob_Mask_SingleChunk

static const unsigned s_ExtBlob_Mask_32bit

BDB library external archival BLOB store.

Berkeley DB BLOB File class.

BLOB map, encapsulates collection of BLOB ids and BLOB locations.

Berkeley DB file cursor class.

Reallocable memory buffer (no memory copy overhead) Mimics vector<>, without the overhead of explicit...

size_t x_ComputeSerializationSize(unsigned *bits_used, bool *is_single_chunk) const

Compute serialization size and effective number of bits used for offset/size storage (16,...

CBDB_ExtBlobMap::TBlobChunkVec m_Loc

Super BLOB location vector.

CBDB_FieldUint4 id_from

Id range from.

EBDB_ErrCode UpdateInsert(const void *data, size_t size)

Insert or update BLOB.

CBDB_ExtBlobMap m_BlobMap

Blob attributes (super BLOB content)

void Serialize(CBDB_RawFile::TBuffer *buf, Uint8 buf_offset=0) const

void SetLoc(Uint8 offset, Uint8 size)

Set container location (one chunk)

void Add(Uint4 blob_id, Uint8 offset, Uint8 size)

Add BLOB. BLOB consists of one single chunk.

void Deserialize(const CBDB_RawFile::TBuffer &buf, Uint8 buf_offset=0)

Uint8 offset

chunk offset

void GetBlobIdRange(Uint4 *min_id, Uint4 *max_id) const

Get BLOB id min and max range (closed interval)

bool HasBlob(Uint4 blob_id) const

Returns TRUE if blob exists in the map.

bool GetBlobLoc(Uint4 blob_id, Uint8 *offset, Uint8 *size) const

Get BLOB location.

TBlobChunkVec blob_location_table

void GetLoc(Uint8 *offset, Uint8 *size)

Get container location (throws an exception if more than one chunk)

const CBDB_ExtBlobMap & GetBlobMap() const

CBDB_FieldUint4 id_to

Id range to.

EBDB_ErrCode UpdateInsert(const CBDB_BlobMetaContainer &meta_container)

Insert new super BLOB metainfo.

EBDB_ErrCode FetchMeta(Uint4 blob_id, CBDB_BlobMetaContainer *meta_container, Uint4 *id_from=0, Uint4 *id_to=0)

Find the meta container storing our target blob_id Function is doing the cursor range scan sequential...

void Serialize(CBDB_RawFile::TBuffer *buf, Uint8 buf_offset=0) const

Serialize map for storage.

void Deserialize(const CBDB_RawFile::TBuffer &buf, Uint8 buf_offset=0)

DeSerialize map.

size_t ComputeSerializationSize() const

Compute maximum serialization size.

size_t ComputeSerializationSize() const

Compute maximum serialization size.

void SetCondition(ECondition cond_from, ECondition cond_to=eNotSet)

Set search condition(type of interval)

void BindKey(const char *field_name, CBDB_Field *key_field, size_t buf_size=0)

EBDB_ErrCode

BDB Return codes.

EBDB_ErrCode Fetch(EFetchDirection fdir=eDefault)

Fetch record.

CBDB_ConditionHandle From

#define BDB_THROW(errcode, message)

uint32_t Uint4

4-byte (32-bit) unsigned integer

uint64_t Uint8

8-byte (64-bit) unsigned integer

#define END_NCBI_SCOPE

End previously defined NCBI scope.

#define BEGIN_NCBI_SCOPE

Define ncbi namespace.

static string UIntToString(unsigned int value, TNumToStringFlags flags=0, int base=10)

Convert UInt to string.

double value_type

The numeric datatype used by the parser.

const struct ncbi::grid::netcache::search::fields::SIZE size

static SLJIT_INLINE sljit_ins msg(sljit_gpr r, sljit_s32 d, sljit_gpr x, sljit_gpr b)

BLOB chunk location: offset in file + chunk size.

Blob id + blob location table (list of chunks and sizes)


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4