Rogue Wave banner
Previous fileTop of documentContentsIndexNext file

RWFileManager


RWFileManager-->RWFile

Data Type and Member Function Indexes
(exclusive of constructors and destructors)

Synopsis

typedef long     RWoffset ;
typedef unsigned long   RWspace;  // (typically)
#include <rw/filemgr.h>
RWFileManager f("file.dat");

Description

Class RWFileManager allocates and deallocates storage in a disk file, much like a "freestore" manager. It does this by maintaining a linked list of free space within the file. Note: Class RWFileManager inherits class RWFile as a public base class; hence all the public member functions of RWFile are visible to RWFileManager. They are not listed here.

If a file is managed by an RWFileManager then reading or writing to unallocated space in the file will have undefined results. In particular, overwriting the end of allocated space is a common problem which usually results in corrupted data. One way to encounter this problem is to use binaryStoreSize() to discover the amount of space needed to store an RWCollection. For most purposes, the storage size of an RWCollection is found using the RWCollectable method recursiveStoreSize().

Persistence

None

Public Constructor

RWFileManager(const char* filename, const char* mode = 0);

Public Member Functions

RWoffset
allocate(RWspace s);
void
deallocate(RWoffset t);
RWoffset
endData();
RWoffset
start();


Previous fileTop of documentContentsIndexNext file
©Copyright 1999, Rogue Wave Software, Inc.
Send mail to report errors or comment on the documentation.