Rogue Wave Views Foundation Package API Reference Guide |
Rogue Wave Views Documentation Home |
Bitmap streamer base class. More...
#include <ilviews/bitmaps/streamer.h>
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... | |
IlvQuantizer * | getQuantizer () const |
Returns the quantizer used by this streamer. More... | |
virtual IlvBitmapData * | read (std::istream &stream) |
Reads from a stream. More... | |
virtual IlvBitmapInformation * | readInfo (std::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 rpCallback, IlAny arg=0) |
Sets the callback for read progression. More... | |
virtual void | setWriteProgressCallback (IlvProgressCallback wpCallback, IlAny arg=0) |
Sets the callback for write progression. More... | |
virtual IlBoolean | write (IlvBitmapData *bitmapData, std::ostream &stream) |
Writes an IlvBitmapData to a stream. More... | |
Public Member Functions inherited from IlvValueInterface | |
virtual IlBoolean | applyValue (const IlvValue &value) |
Apply an accessor. More... | |
virtual IlBoolean | changeValue (const IlvValue &val) |
Changes the value of an accessor. More... | |
virtual IlBoolean | changeValues (const IlvValue *values, IlUShort count=0) |
Changes several accessor values simultaneously. More... | |
virtual void | getAccessors (const IlSymbol *const **names, const IlvValueTypeClass *const **types, IlUInt &count) const |
Retrieves the list of available accessors of an object. More... | |
virtual IlvValue & | queryValue (IlvValue &val) const |
Retrieves an accessor value. More... | |
virtual void | queryValues (IlvValue *values, IlUShort count) const |
Retrieves multiple accessor values simultaneously. More... | |
Static Public Member Functions | |
static IlvBitmapStreamer * | Get (const char *name) |
Returns a streamer from its name. More... | |
static IlvBitmapStreamer ** | GetRegisteredStreamers (IlUInt &count) |
Returns the registered streamers. More... | |
static IlvBitmap * | Read (IlvDisplay *display, std::istream &stream, const IlUChar *signature, IlUInt signatureLen) |
Reads a bitmap using the registered streamers. More... | |
static IlvBitmapData * | ReadBitmapData (std::istream &stream, const IlUChar *signature, IlUInt signatureLen) |
Reads bitmap data using the registered streamers. More... | |
static IlvBitmapInformation * | ReadInfo (std::istream &stream, const IlUChar *signature, IlUInt signatureLen) |
Reads bitmap information using the registered streamers. More... | |
static void | Register (IlvBitmapStreamer *streamer) |
Registers the given streamer. More... | |
static IlBoolean | UnRegister (IlvBitmapStreamer *streamer) |
Unregisters the given streamer. More... | |
Bitmap streamer base class.
Library: xviews or winviews or mviews (mutually exclusive)
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.
Calls the callback for read progression.
current | The current read progress value. |
max | The maximum read progress value. |
Calls the callback for write progression.
current | The current write progress value. |
max | The maximum write progress value. |
|
virtual |
Indicates whether the instance can read from a stream. Default is IlFalse
.
IlTrue
if the instance can read from a stream. Reimplemented in IlvTIFFStreamer, IlvPNGStreamer, IlvGIFStreamer, IlvBMPStreamer, IlvJPGStreamer, IlvPPMStreamer, IlvRGBStreamer, and IlvWBMPStreamer.
|
virtual |
Indicates whether the instance can write to a stream. Default is IlFalse
.
IlTrue
if the instance can write to a stream. Reimplemented in IlvTIFFStreamer, IlvPNGStreamer, IlvGIFStreamer, IlvBMPStreamer, IlvJPGStreamer, IlvPPMStreamer, IlvRGBStreamer, and IlvWBMPStreamer.
|
pure virtual |
Indicates whether the instance can handle the stream.
data | The stream signature. |
size | The size of the stream signature. |
IlTrue
if the instance recognizes the signature. Implemented in IlvJPGStreamer, IlvWBMPStreamer, IlvPNGStreamer, IlvGIFStreamer, IlvTIFFStreamer, IlvBMPStreamer, IlvPPMStreamer, and IlvRGBStreamer.
|
static |
Returns a streamer from its name.
name | The name of the streamer. |
|
virtual |
Returns the internal name of the streamer.
Reimplemented from IlvValueInterface.
IlvQuantizer* IlvBitmapStreamer::getQuantizer | ( | ) | const |
Returns the quantizer used by this streamer.
|
static |
Returns the registered streamers.
count | The number of registered streamers. |
|
virtual |
Reads from a stream.
stream | The stream to read from. |
IlvBitmapData
. Reimplemented in IlvGIFStreamer.
|
static |
Reads a bitmap using the registered streamers.
display | The display to use. |
stream | The stream to read from. |
signature | The first bytes of the stream. |
signatureLen | The size of the signature. |
|
static |
Reads bitmap data using the registered streamers.
stream | The stream to read from. |
signature | The first bytes of the stream. |
signatureLen | The size of the signature. |
|
virtual |
Reads information from a stream.
stream | The stream to read from. |
IlvBitmapInformation
.
|
static |
Reads bitmap information using the registered streamers.
stream | The stream to read from. |
signature | The first bytes of the stream. |
signatureLen | The size of the signature. |
|
static |
Registers the given streamer.
streamer | The streamer to register. |
void IlvBitmapStreamer::setQuantizer | ( | IlvQuantizer * | quantizer | ) |
Sets the quantizer used (if needed) by this streamer.
quantizer | The new quantizer. |
|
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.
rpCallback | The read progression callback. |
arg | A user-defined argument. |
|
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.
wpCallback | The write progression callback. |
arg | A user-defined argument. |
|
static |
Unregisters the given streamer.
streamer | The streamer to unregister. |
|
virtual |
Writes an IlvBitmapData
to a stream.
bitmapData | The bitmap data to write. |
stream | The stream to write to. |
IlTrue
if the bitmap data has been written. © Copyright 2017, 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.