rwlogo

Rogue Wave Views
Foundation Package API Reference Guide

Product Documentation:

Rogue Wave Views
Documentation Home

List of all members | Public Member Functions | Static Public Member Functions
IlvBitmapStreamer Class Referenceabstract

Bitmap streamer base class. More...

#include <ilviews/bitmaps/streamer.h>

Inheritance diagram for IlvBitmapStreamer:
IlvBMPStreamer IlvJPGStreamer IlvPNGStreamer IlvPPMStreamer IlvRGBStreamer IlvTIFFStreamer IlvWBMPStreamer

Public Member Functions

virtual void callReadProgressCallback (IlUInt current, IlUInt max)
 Calls the callback for read progression. More...
 
virtual void callWriteProgressCallback (IlUInt current, IlUInt max)
 Calls the callback for write progression. More...
 
virtual IlBoolean canRead () const
 Indicates whether the instance can read from a stream. Default is IlFalse. More...
 
virtual IlBoolean canWrite () const
 Indicates whether the instance can write to a stream. Default is IlFalse. More...
 
virtual IlBoolean checkSignature (const IlUChar *data, IlUInt size)=0
 Indicates whether the instance can handle the stream. More...
 
virtual const char * getName () const
 Returns the internal name of the streamer. More...
 
IlvQuantizergetQuantizer () const
 Returns the quantizer used by this streamer. More...
 
virtual IlvBitmapDataread (IL_STDPREF istream &stream)
 Reads from a stream. More...
 
virtual IlvBitmapInformationreadInfo (IL_STDPREF istream &stream)
 Reads information from a stream. More...
 
void setQuantizer (IlvQuantizer *quantizer)
 Sets the quantizer used (if needed) by this streamer. More...
 
virtual void setReadProgressCallback (IlvProgressCallback rCallback, IlAny arg=0)
 Sets the callback for read progression. More...
 
virtual void setWriteProgressCallback (IlvProgressCallback wCallback, IlAny arg=0)
 Sets the callback for write progression. More...
 
virtual IlBoolean write (IlvBitmapData *bitmapData, IL_STDPREF ostream &stream)
 Writes an IlvBitmapData to a stream. More...
 

Static Public Member Functions

static void Register (IlvBitmapStreamer *streamer)
 Registers the given streamer. More...
 
static IlBoolean UnRegister (IlvBitmapStreamer *streamer)
 Unregisters the given streamer. More...
 

The name of the streamer.

Returns a streamer from its name.

Parameters
IlvProgressCallback _readProgressCallback
 Reads a bitmap using the registered streamers. More...
 
IlAny _argr
 Reads a bitmap using the registered streamers. More...
 
IlvProgressCallback _writeProgressCallback
 Reads a bitmap using the registered streamers. More...
 
IlAny _argw
 Reads a bitmap using the registered streamers. More...
 
IlvQuantizer_quantizer
 Reads a bitmap using the registered streamers. More...
 
virtual ~IlvBitmapStreamer ()
 Reads a bitmap using the registered streamers. More...
 
static IlvBitmapStreamerGet (const char *name)
 Reads a bitmap using the registered streamers. More...
 
static IlvBitmapRead (IlvDisplay *display, IL_STDPREF istream &stream, const IlUChar *signature, IlUInt signatureLen)
 Reads a bitmap using the registered streamers. More...
 
static IlvBitmapDataReadBitmapData (IL_STDPREF istream &stream, const IlUChar *signature, IlUInt signatureLen)
 Reads bitmap data using the registered streamers. More...
 
static IlvBitmapInformationReadInfo (IL_STDPREF istream &stream, const IlUChar *signature, IlUInt signatureLen)
 Reads bitmap information using the registered streamers. More...
 
static IlvBitmapStreamer ** GetRegisteredStreamers (IlUInt &count)
 Returns the registered streamers. More...
 
static IlBoolean CheckInModules (const IlUChar *sigbuffer, const IlUChar *filename=0)
 Reads a bitmap using the registered streamers. More...
 
static IlListOf (IlvBitmapStreamers)*_Streamers
 Reads a bitmap using the registered streamers. More...
 
 IlvBitmapStreamer ()
 Reads a bitmap using the registered streamers. More...
 

Detailed Description

Bitmap streamer base class.

Library: display

This class provides methods to read/write IlvBitmapData from/to a stream. This is a virtual class that must be subclassed. The stream can be checked for a specific format signature. A bitmap streamer can declare if it knows how to read or write. When reading or writing, callbacks can be called to indicate progression.

Constructor & Destructor Documentation

virtual IlvBitmapStreamer::~IlvBitmapStreamer ( )
virtual

Reads a bitmap using the registered streamers.

Parameters
displayThe display to use.
streamThe stream to read from.
signatureThe first bytes of the stream.
signatureLenThe size of the signature.
IlvBitmapStreamer::IlvBitmapStreamer ( )
protected

Reads a bitmap using the registered streamers.

Parameters
displayThe display to use.
streamThe stream to read from.
signatureThe first bytes of the stream.
signatureLenThe size of the signature.

Member Function Documentation

virtual void IlvBitmapStreamer::callReadProgressCallback ( IlUInt  current,
IlUInt  max 
)
virtual

Calls the callback for read progression.

Parameters
currentThe current read progress value.
maxThe maximum read progress value.
virtual void IlvBitmapStreamer::callWriteProgressCallback ( IlUInt  current,
IlUInt  max 
)
virtual

Calls the callback for write progression.

Parameters
currentThe current write progress value.
maxThe maximum write progress value.
virtual IlBoolean IlvBitmapStreamer::canRead ( ) const
virtual

Indicates whether the instance can read from a stream. Default is IlFalse.

Returns
IlTrue if the instance can read from a stream.

Reimplemented in IlvTIFFStreamer, IlvPNGStreamer, IlvBMPStreamer, IlvJPGStreamer, IlvPPMStreamer, IlvRGBStreamer, and IlvWBMPStreamer.

virtual IlBoolean IlvBitmapStreamer::canWrite ( ) const
virtual

Indicates whether the instance can write to a stream. Default is IlFalse.

Returns
IlTrue if the instance can write to a stream.

Reimplemented in IlvTIFFStreamer, IlvPNGStreamer, IlvBMPStreamer, IlvJPGStreamer, IlvPPMStreamer, IlvRGBStreamer, and IlvWBMPStreamer.

static IlBoolean IlvBitmapStreamer::CheckInModules ( const IlUChar sigbuffer,
const IlUChar filename = 0 
)
static

Reads a bitmap using the registered streamers.

Parameters
displayThe display to use.
streamThe stream to read from.
signatureThe first bytes of the stream.
signatureLenThe size of the signature.
virtual IlBoolean IlvBitmapStreamer::checkSignature ( const IlUChar data,
IlUInt  size 
)
pure virtual

Indicates whether the instance can handle the stream.

Parameters
dataThe stream signature.
sizeThe size of the stream signature.
Returns
IlTrue if the instance recognizes the signature.

Implemented in IlvJPGStreamer, IlvWBMPStreamer, IlvPNGStreamer, IlvTIFFStreamer, IlvBMPStreamer, IlvPPMStreamer, and IlvRGBStreamer.

static IlvBitmapStreamer* IlvBitmapStreamer::Get ( const char *  name)
static

Reads a bitmap using the registered streamers.

Parameters
displayThe display to use.
streamThe stream to read from.
signatureThe first bytes of the stream.
signatureLenThe size of the signature.
virtual const char* IlvBitmapStreamer::getName ( ) const
virtual

Returns the internal name of the streamer.

Returns
The name of the streamer.
IlvQuantizer* IlvBitmapStreamer::getQuantizer ( ) const

Returns the quantizer used by this streamer.

Returns
The quantizer.
static IlvBitmapStreamer** IlvBitmapStreamer::GetRegisteredStreamers ( IlUInt count)
static

Returns the registered streamers.

Parameters
countThe number of registered streamers.
Returns
An array of count streamers.
static IlvBitmapStreamer::IlListOf ( IlvBitmapStreamers  )
static

Reads a bitmap using the registered streamers.

Parameters
displayThe display to use.
streamThe stream to read from.
signatureThe first bytes of the stream.
signatureLenThe size of the signature.
virtual IlvBitmapData* IlvBitmapStreamer::read ( IL_STDPREF istream &  stream)
virtual

Reads from a stream.

Parameters
streamThe stream to read from.
Returns
An instance of IlvBitmapData.

Reimplemented in IlvPNGStreamer, and IlvRGBStreamer.

static IlvBitmap* IlvBitmapStreamer::Read ( IlvDisplay display,
IL_STDPREF istream &  stream,
const IlUChar signature,
IlUInt  signatureLen 
)
static

Reads a bitmap using the registered streamers.

Parameters
displayThe display to use.
streamThe stream to read from.
signatureThe first bytes of the stream.
signatureLenThe size of the signature.
static IlvBitmapData* IlvBitmapStreamer::ReadBitmapData ( IL_STDPREF istream &  stream,
const IlUChar signature,
IlUInt  signatureLen 
)
static

Reads bitmap data using the registered streamers.

Parameters
streamThe stream to read from.
signatureThe first bytes of the stream.
signatureLenThe size of the signature.
virtual IlvBitmapInformation* IlvBitmapStreamer::readInfo ( IL_STDPREF istream &  stream)
virtual

Reads information from a stream.

Parameters
streamThe stream to read from.
Returns
An instance of IlvBitmapInformation.
static IlvBitmapInformation* IlvBitmapStreamer::ReadInfo ( IL_STDPREF istream &  stream,
const IlUChar signature,
IlUInt  signatureLen 
)
static

Reads bitmap information using the registered streamers.

Parameters
streamThe stream to read from.
signatureThe first bytes of the stream.
signatureLenThe size of the signature.
static void IlvBitmapStreamer::Register ( IlvBitmapStreamer streamer)
static

Registers the given streamer.

Parameters
streamerThe streamer to register.
void IlvBitmapStreamer::setQuantizer ( IlvQuantizer quantizer)

Sets the quantizer used (if needed) by this streamer.

Parameters
quantizerThe new quantizer.
virtual void IlvBitmapStreamer::setReadProgressCallback ( IlvProgressCallback  rCallback,
IlAny  arg = 0 
)
virtual

Sets the callback for read progression.

The callback indicating read progression will be called. The arguments of the callback will be the current bitmap streamer, the current read progress value, the maximum read progress value, and a user-defined argument.

Parameters
rCallbackThe read progression callback.
argA user-defined argument.
virtual void IlvBitmapStreamer::setWriteProgressCallback ( IlvProgressCallback  wCallback,
IlAny  arg = 0 
)
virtual

Sets the callback for write progression.

The callback will be called indicating write progression. The arguments to the callback will be the current bitmap streamer, the current write progress value, the maximum write progress value, and a user-defined argument.

Parameters
wCallbackThe write progression callback.
argA user-defined argument.
static IlBoolean IlvBitmapStreamer::UnRegister ( IlvBitmapStreamer streamer)
static

Unregisters the given streamer.

Parameters
streamerThe streamer to unregister.
virtual IlBoolean IlvBitmapStreamer::write ( IlvBitmapData bitmapData,
IL_STDPREF ostream &  stream 
)
virtual

Writes an IlvBitmapData to a stream.

Parameters
bitmapDataThe bitmap data to write.
streamThe stream to write to.
Returns
IlTrue if the bitmap data has been written.

Reimplemented in IlvPNGStreamer, IlvWBMPStreamer, and IlvRGBStreamer.

Member Data Documentation

IlAny IlvBitmapStreamer::_argr
protected

Reads a bitmap using the registered streamers.

Parameters
displayThe display to use.
streamThe stream to read from.
signatureThe first bytes of the stream.
signatureLenThe size of the signature.
IlAny IlvBitmapStreamer::_argw
protected

Reads a bitmap using the registered streamers.

Parameters
displayThe display to use.
streamThe stream to read from.
signatureThe first bytes of the stream.
signatureLenThe size of the signature.
IlvQuantizer* IlvBitmapStreamer::_quantizer
protected

Reads a bitmap using the registered streamers.

Parameters
displayThe display to use.
streamThe stream to read from.
signatureThe first bytes of the stream.
signatureLenThe size of the signature.
IlvProgressCallback IlvBitmapStreamer::_readProgressCallback
protected

Reads a bitmap using the registered streamers.

Parameters
displayThe display to use.
streamThe stream to read from.
signatureThe first bytes of the stream.
signatureLenThe size of the signature.
IlvProgressCallback IlvBitmapStreamer::_writeProgressCallback
protected

Reads a bitmap using the registered streamers.

Parameters
displayThe display to use.
streamThe stream to read from.
signatureThe first bytes of the stream.
signatureLenThe size of the signature.

© Copyright 2014, Rogue Wave Software, Inc. All Rights Reserved.
Rogue Wave is a registered trademark of Rogue Wave Software, Inc. in the United States and other countries. All other trademarks are the property of their respective owners.