dbFile Class Reference

#include <file.h>

List of all members.

Public Types

enum  { ok = 0 }

Public Member Functions

int create (char const *name, bool noBuffering=true)
int open (char const *fileName, char const *sharedName, bool readonly, size_t initSize, bool replicationSupport)
void * getAddr () const
size_t getSize () const
int setSize (size_t size, char const *sharedName, bool initialize=true)
int flush (bool physical=false)
int close ()
int erase ()
int write (void const *ptr, size_t &writtenBytes, size_t size)
int read (void *ptr, size_t &readBytes, size_t size)
bool write (void const *ptr, size_t size)
void markAsDirty (size_t, size_t)
bool write (size_t pos, void const *ptr, size_t size)
 dbFile ()
 ~dbFile ()

Static Public Member Functions

static char * errorText (int code, char *buf, size_t bufSize)

Protected Attributes

int fd
char * sharedName
char * mmapAddr
size_t mmapSize
bool readonly


Member Enumeration Documentation

anonymous enum

Enumerator:
ok 


Constructor & Destructor Documentation

BEGIN_FASTDB_NAMESPACE dbFile (  ) 

~dbFile (  ) 


Member Function Documentation

int create ( char const *  name,
bool  noBuffering = true 
)

int open ( char const *  fileName,
char const *  sharedName,
bool  readonly,
size_t  initSize,
bool  replicationSupport 
)

void* getAddr (  )  const [inline]

size_t getSize (  )  const [inline]

int setSize ( size_t  size,
char const *  sharedName,
bool  initialize = true 
)

int flush ( bool  physical = false  ) 

int close (  ) 

int erase (  ) 

int write ( void const *  ptr,
size_t &  writtenBytes,
size_t  size 
)

int read ( void *  ptr,
size_t &  readBytes,
size_t  size 
)

bool write ( void const *  ptr,
size_t  size 
)

char * errorText ( int  code,
char *  buf,
size_t  bufSize 
) [static]

void markAsDirty ( size_t  ,
size_t   
) [inline]

bool write ( size_t  pos,
void const *  ptr,
size_t  size 
)


Member Data Documentation

int fd [protected]

char* sharedName [protected]

char* mmapAddr [protected]

size_t mmapSize [protected]

bool readonly [protected]


Online Library Docs

sipXecs home page

Version 4.2.1-018930 2010-07-31T01:13:23 build16 abuild