Rogue Wave banner
Previous fileTop of DocumentContentsIndex pageNext file
Essential Tools Module Reference Guide

RWFileManager

Module:  Essential Tools Module   Group:  File System


RWFileManagerRWFile

Local Index

Members

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 Destructor

~RWFileManager();

Public Member Functions

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


Previous fileTop of DocumentContentsIndex pageNext file

©2004 Copyright Quovadx, Inc. All Rights Reserved.
Rogue Wave and SourcePro are registered trademarks of Quovadx, Inc. in the United States and other countries. All other trademarks are the property of their respective owners.
Contact Rogue Wave about documentation or support issues.