Rogue Wave banner
Previous fileTop of DocumentContentsIndex pageNext file
Essential Tools Module Reference Guide
Rogue Wave web site:  Home Page  |  Main Documentation Page

RWAuditStreamBuffer

Module:  Essential Tools Module   Group:  Virtual Stream Classes


RWAuditStreamBufferstd::streambuf

Local Index

Members

Non-Members

Synopsis

#include <rw/auditbuf.h>
#include <iostream>
RWAuditStreamBuffer buf(arguments)
std::ostream os(&buf); // may be used for ostreams
std::istream is(&buf); // or istreams of any kind

Description

Class RWAuditStreamBuffer is used to construct a stream, after which the RWAuditStreamBuffer instance will count all the bytes that pass through the stream. If constructed with a function pointer, RWAuditStreamBuffer will call that function with each byte that passes through the stream. The counting capacity provides for streams the equivalent of the RWCollectable method recursiveStoreSize() which is only available for RWFile.

Persistence

None

Short Example

Program output:

Related Classes

RWAuditStreamBuffer may be used as the streambuf for any stream, including those derived from RWvostream or RWvistream, std::strstream, std::ifstream, std::ofstream, etc.

Global Typedef

typedef void (*RWauditFunction)(unsigned char, void*);

Public Constructors

RWAuditStreamBuffer(RWauditFunction=0, void*=0);
RWAuditStreamBuffer(std::istream&, RWauditFunction=0, void*=0);
RWAuditStreamBuffer(std::iostream&, RWauditFunction=0, void*=0);
RWAuditStreamBuffer(std::ostream&, RWauditFunction=0, void*=0);
RWAuditStreamBuffer(std::streambuf*, RWauditFunction=0,
                    void*=0);

Public Destructor

virtual ~RWAuditStreamBuffer();

Public Member Operator

operator unsigned long();

Public Member Function

unsigned long
reset(unsigned long value = 0);

Extended Example

Program output:



Previous fileTop of DocumentContentsIndex pageNext file

© Copyright Rogue Wave Software, Inc. All Rights Reserved.
Rogue Wave and SourcePro are registered trademarks of Rogue Wave Software, 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.