CDBReader Class Reference

#import <CDBFile.h>

Inherits CDBFile.

List of all members.


Detailed Description

Read-only access to CDB files.

This is a thin Objective-C wrapper around Michael Tokarev's tinycdb library, which is itself a rewrite of Dan Bernstein's cdb.

Public Member Functions

(id) - initWithFile:
 Creates a CDBReader on an existing CDB file.
(CDBData- valuePointerForKey:
 Returns a pointer to the value associated with the key.
(CDBEnumerator *) - keyEnumerator
 Returns an enumerator that will return all of the keys, in unspecified order.


Member Function Documentation

- (id) initWithFile: (NSString*)  path  

Creates a CDBReader on an existing CDB file.

The file must exist, but it is not opened or read from until the -open method is called.

- (CDBData) valuePointerForKey: (CDBData key  

Returns a pointer to the value associated with the key.

(If there is none, the return value will have bytes=NULL and length=0.) You can use the CDBTo... utility functions to convert the value to NSData or NSString. This points directly into the memory-mapped file, without any copying, so it's very efficient. But the memory pointed to only remains valid until the CDBReader is closed!

- (CDBEnumerator *) keyEnumerator  

Returns an enumerator that will return all of the keys, in unspecified order.


The documentation for this class was generated from the following files:
Generated on Thu Mar 6 12:20:55 2008 for CDBStore by  doxygen 1.5.4