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

RWCacheManager

Module:  Essential Tools Module   Group:  File System


Does not inherit

Local Index

Members

Synopsis

#include <rw/cacheman.h>
RWFile f("file.dat");       // Construct a file
RWCacheManager(&f, 100);    // Cache 100 byte blocks 
                            // to file.dat

Description

Class RWCacheManager caches fixed length blocks to and from an associated RWFile. The block size can be of any length and is set at construction time. The number of cached blocks can also be set at construction time.

Writes to the file may be deferred. Use member function flush() to have any pending writes performed.

Persistence

None

Example

Public Constructor

RWCacheManager(RWFile* file, unsigned blocksz, 
               unsigned mxblks = 10);

Public Destructor

~RWCacheManager();

Public Member Functions

RWBoolean
flush();
void
invalidate();
RWBoolean
read(RWoffset locn, void* dat);
RWBoolean
write(RWoffset locn, void* dat);


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.