Public Member Functions

BMM_IOList Class Reference

Search for all occurrences

Detailed Description

This class is used for storing a linked list of Bitmap Manager BMM_IOHandler objects.

It provides methods for working with IO module devices derived from BitmapIO. All methods of this class are implemented by the system.

See also:
Class BMM_IOHandlerList, Class BitmapIO.

#include <bitmap.h>

Inheritance diagram for BMM_IOList:
Inheritance graph
[legend]

List of all members.

Public Member Functions

  BMM_IOList ()
BOOL  Listed (BOOL f)
BOOL  Listed ()
BMMExport int  FindDevice (const MCHAR *name)
BMMExport int  FindDeviceFromFilename (const MCHAR *name)
BMMExport int  ResolveDevice (BitmapInfo *bi)
BMMExport DWORD  GetDeviceCapabilities (const MCHAR *name)
BMMExport BitmapIO CreateDevInstance (const MCHAR *d)
BMMExport BitmapIO CreateDevInstance (int idx)

Constructor & Destructor Documentation

BMM_IOList ( ) [inline]
Remarks:
Constructor. The flag that indicates that the list has been built is set to FALSE.
{ listed = FALSE; }

Member Function Documentation

BOOL Listed ( BOOL  f ) [inline]
Remarks:
Sets the state to indicate the list of IO modules has been built.
Parameters:
BOOL f

TRUE to indicate the list exists; otherwise FALSE.
{ listed = f; return (listed);};
BOOL Listed ( ) [inline]
Remarks:
Indicates if the list of IO modules has been built. Returns TRUE if it has; otherwise FALSE.
{ return (listed);};
BMMExport int FindDevice ( const MCHAR *  name )
Remarks:
Scans the list searching for a match for the description string passed.
Parameters:
const MCHAR *name

The long description string of the device to find.
Returns:
The index in the IO list of the device. If not found, -1 is returned.
BMMExport int FindDeviceFromFilename ( const MCHAR *  name )
Remarks:
This method scans the IO module list searching for a match for the extension in the filename passed.
Parameters:
const MCHAR *name

The filename to check.
Returns:
The index in the list of IO modules or -1 if not found.
BMMExport int ResolveDevice ( BitmapInfo bi )
Remarks:
Given a BitmapInfo record, this method finds the device responsible for this image. If bi.Name() is empty, a device is listed in bi.Device(). In that case we simply use the FindDevice() function which returns an index to the device based on a given device name.

If bi.Name() isn't empty, it means this is a file and we must search for a device based on a filename. For that we use FindDeviceFromFilename(). If we find a device, we take the opportunity to fill in the device name in the BitmapInfo record (using SetDevice()).
Parameters:
BitmapInfo *bi

The BitmapInfo for the image whose device you wish to find.
Returns:
The index in the list of IO modules or -1 if not found.
BMMExport DWORD GetDeviceCapabilities ( const MCHAR *  name )
Remarks:
Returns the capability flags of the device whose long description string is passed.
Parameters:
const MCHAR *name

The long description flag.
Returns:
See BitmapIO Capability Flags.
BMMExport BitmapIO* CreateDevInstance ( const MCHAR *  d )
Remarks:
This creates an instance of the device plug-in class by calling Create() on the class descriptor. Make sure to delete the instance after use.
Parameters:
const MCHAR *d

The long description string.
Returns:
A pointer to an instance of the IO module.
BMMExport BitmapIO* CreateDevInstance ( int  idx )
Remarks:
This creates an instance of the device plug-in class by calling Create() on the class descriptor. Make sure to delete the instance after use.
Parameters:
int idx

The index in the IO module list of the device.
Returns:
A pointer to an instance of the IO module.

BMM_IOList BMM_IOList BMM_IOList BMM_IOList BMM_IOList BMM_IOList BMM_IOList BMM_IOList BMM_IOList BMM_IOList
BMM_IOList BMM_IOList BMM_IOList BMM_IOList BMM_IOList BMM_IOList BMM_IOList BMM_IOList BMM_IOList BMM_IOList