#include <file.h>
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 |
| BEGIN_FASTDB_NAMESPACE dbFile | ( | ) |
| ~dbFile | ( | ) |
| 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 | |||
| ) |
int fd [protected] |
char* sharedName [protected] |
char* mmapAddr [protected] |
size_t mmapSize [protected] |
bool readonly [protected] |