IRoot Struct Reference
[Interfaces for coding modules]

Interface for root modules (with only one implementation MRoot), all modules are always owned (either directly or indirectly) by one of this type. More...

#include <interfaces.h>

Inheritance diagram for IRoot:

Inheritance graph
[legend]
Collaboration diagram for IRoot:

Collaboration graph
[legend]

List of all members.

Public Types

enum  Mode {
  Clear,
  Encode,
  Decode
}
 The root can be in any of these modes. More...

Public Member Functions

virtual Mode getMode ()=0
 A status-query method.
virtual QImage toImage ()=0
 Saves current decoding state into a QImage.
virtual bool encode (const QImage &toEncode, const UpdateInfo &updateInfo=UpdateInfo::none)=0
 Encodes an image - returns false on exception, getMode() have to be to be Clear.
virtual void decodeAct (DecodeAct action, int count=1)=0
 Performs a decoding action (e.g. clearing, multiple iteration).
virtual bool toStream (std::ostream &file)=0
 Saves an encoded image into a stream, returns true on success.
virtual bool fromStream (std::istream &file, int zoom=0)=0
 Loads image from a file - returns true on success (to be run on in Clear state), can load in bigger size: dimension == orig_dim*2^zoom.
int toFile (const char *fileName)
 Shorthand: saves an encoded image to a file - returns the number of bytes written or false on failure.
bool fromFile (const char *fileName, int zoom=0)
 Shorthand: loads image from a file - returns true on success, see fromStream.
bool allSettingsToFile (const char *fileName)
 Saves all settings to a file (incl. child modules), returns true on success.
bool allSettingsFromFile (const char *fileName)
 Loads all settings from a file (to be run on a shallow module), returns true on success.

Static Public Attributes

static const Uint16 SettingsMagic = Magic^12345
 magic number - integer identifying settings files


Detailed Description

Interface for root modules (with only one implementation MRoot), all modules are always owned (either directly or indirectly) by one of this type.

Definition at line 43 of file interfaces.h.


Member Enumeration Documentation

The root can be in any of these modes.

Enumerator:
Clear  no action has been done
Encode  contains an encoded image
Decode  contains an image decoded from a file

Definition at line 45 of file interfaces.h.


The documentation for this struct was generated from the following files:

Generated on Thu Aug 6 22:33:14 2009 for Fractal Image Compressor by  doxygen 1.5.8