NCBI C++ ToolKit
Classes | Macros | Typedefs | Functions
ncbi_buffer.c File Reference
#include "ncbi_assert.h"
#include <connect/ncbi_buffer.h>
#include <stdlib.h>
#include <string.h>
+ Include dependency graph for ncbi_buffer.c:

Go to the source code of this file.

Go to the SVN repository for this file.


struct  SBufChunkTag
struct  SNcbiBuf


#define _BUF_ALIGN(a, b)   (((a) + ((b) - 1)) & ~((b) - 1))
#define BUF_ALIGN(s)   _BUF_ALIGN((s), sizeof(double))


typedef struct SBufChunkTag SBufChunk


size_t BUF_SetChunkSize (BUF *buf, size_t chunk_size)
size_t BUF_Size (BUF buf)
static SBufChunks_BUF_AllocChunk (size_t data_size, size_t unit_size)
int BUF_AppendEx (BUF *buf, void *base, size_t alloc_size, void *data, size_t size)
int BUF_Append (BUF *buf, const void *data, size_t size)
int BUF_PrependEx (BUF *buf, void *base, size_t alloc_size, void *data, size_t size)
int BUF_Prepend (BUF *buf, const void *data, size_t size)
int BUF_Write (BUF *buf, const void *src, size_t size)
int BUF_Pushback (BUF *buf, const void *src, size_t size)
size_t BUF_PeekAtCB (BUF buf, size_t pos, size_t(*callback)(void *, const void *, size_t), void *cbdata, size_t size)
static size_t x_BUF_MemcpyCB (void *cbdata, const void *data, size_t size)
size_t BUF_PeekAt (BUF buf, size_t pos, void *dst, size_t size)
size_t BUF_Peek (BUF buf, void *dst, size_t size)
size_t BUF_Read (BUF buf, void *dst, size_t size)
void BUF_Erase (BUF buf)
int BUF_Splice (BUF *dst, BUF src)
void BUF_Destroy (BUF buf)

Macro Definition Documentation


#define _BUF_ALIGN (   a,
)    (((a) + ((b) - 1)) & ~((b) - 1))

Definition at line 39 of file ncbi_buffer.c.


#define BUF_ALIGN (   s)    _BUF_ALIGN((s), sizeof(double))

Definition at line 40 of file ncbi_buffer.c.

Typedef Documentation

◆ SBufChunk

typedef struct SBufChunkTag SBufChunk

Function Documentation

◆ BUF_PeekAtCB()

size_t BUF_PeekAtCB ( BUF  buf,
size_t  pos,
size_t(*)(void *, const void *, size_t)  callback,
void *  cbdata,
size_t  size 

◆ s_BUF_AllocChunk()

static SBufChunk* s_BUF_AllocChunk ( size_t  data_size,
size_t  unit_size 

◆ x_BUF_MemcpyCB()

static size_t x_BUF_MemcpyCB ( void *  cbdata,
const void *  data,
size_t  size 

Definition at line 393 of file ncbi_buffer.c.

References data, and ncbi::grid::netcache::search::fields::size.

Referenced by BUF_PeekAt().

Modified on Sun May 19 04:48:05 2024 by rev. 669887