// Copyright (C) 1995 Taligent, Inc. All rights reserved. #if 0 --------------------------------------------------------------------------- > Class: | TXBMDecoder > Taxonomy Category: | Documented Samples | WebRunner Sample > Interface Category: | Sample. > Inherits From: | None. > Inherited By: | None. > Purpose: | This class provides the internal representation of the machine to convert an X-Bitmap file to a CommonPoint MGraphic. > Instantiation: | Allocate on the heap or the stack. > Deriving Classes: | Because this is a special-purpose representation class, there is very little advantage in deriving from it. > Concurrency: | _Not_ multithread safe. > Resource Use: | No special requirements. > Other Considerations: | None. --------------------------------------------------------------------------- #endif #if 0 --------------------------------------------------------------------------- > Member Function: TXBMDecoder::TXBMDecoder ; | TXBMDecoder (TStream & inputStream) > Interface Category: | Sample. > Purpose: | Constructs a decoder out of a data stream containing an X-Bitmap file. > Calling Context: | Called directly, but most users should go through the TXBMConverter interface class. > Parameters: = TStream & inputStream -The data stream containing the file to decode. > Return Value: | None. > Exceptions: | Throws no exceptions, passes all exceptions through. > Concurrency: | _Not_ multithread safe. > Other Considerations: | None. --------------------------------------------------------------------------- #endif #if 0 --------------------------------------------------------------------------- > Member Function: TXBMDecoder::~ TXBMDecoder ; | ~ TXBMDecoder () > Interface Category: | Sample. > Purpose: | Destructor. > Calling Context: | Called to destroy an object. > Parameters: = Takes no parameters. > Return Value: | None. > Exceptions: | Throws no exceptions, passes all exceptions through. > Concurrency: | _Not_ multithread safe. > Other Considerations: | None. --------------------------------------------------------------------------- #endif #if 0 --------------------------------------------------------------------------- > Member Function: TXBMDecoder::OrphanImage ; | TModifiableImage * OrphanImage () > Interface Category: | Sample. > Purpose: | Gains ownership to the converted image. > Calling Context: | Call this function directly. > Parameters: = Takes no parameters. > Return Value: | Returns the image if the conversion was successful, or NIL otherwise. > Exceptions: | Throws no exceptions, passes all exceptions through. > Concurrency: | _Not_ multithread safe. > Other Considerations: | None. --------------------------------------------------------------------------- #endif #if 0 --------------------------------------------------------------------------- > Typedef: TXBMDecoder :: XBMCode | typedef unsigned char XBMCode > Taxonomy Category: | Documented Samples | WebRunner Sample > Interface Category: | Sample. > Purpose: | An XBMCode is the smallest chunk of data manipulated during conversion. > Other Considerations: | None. --------------------------------------------------------------------------- #endif #if 0 --------------------------------------------------------------------------- > Member Function: TXBMDecoder::ParseHeader ; | void ParseHeader () > Interface Category: | Sample. > Purpose: | Used internally to parse the image header for its dimensions. > Calling Context: | Called internally. > Parameters: = Takes no parameters. > Return Value: | None. > Exceptions: | Throws no exceptions, passes all exceptions through. > Concurrency: | _Not_ multithread safe. > Other Considerations: | None. --------------------------------------------------------------------------- #endif #if 0 --------------------------------------------------------------------------- > Member Function: TXBMDecoder::ParseBody ; | void ParseBody () > Interface Category: | Sample. > Purpose: | Used internally to read through the body of the image to extract the pixel values. > Calling Context: | Called internally. > Parameters: = Takes no parameters. > Return Value: | None. > Exceptions: | Throws no exceptions, passes all exceptions through. > Concurrency: | _Not_ multithread safe. > Other Considerations: | None. --------------------------------------------------------------------------- #endif #if 0 --------------------------------------------------------------------------- > Member Function: TXBMDecoder::GetNextByte ; | unsigned char GetNextByte () > Interface Category: | Sample. > Purpose: | Used internally to retrieve one byte of data from the data stream. > Calling Context: | Called internally. > Parameters: = Takes no parameters. > Return Value: | Returns the value read from the stream. > Exceptions: | Throws no exceptions, passes all exceptions through. > Concurrency: | _Not_ multithread safe. > Other Considerations: | None. --------------------------------------------------------------------------- #endif #if 0 --------------------------------------------------------------------------- > Member Function: TXBMDecoder::ReadOneCode ; | XBMCode ReadOneCode () > Interface Category: | Sample. > Purpose: | Reads one hexadecimal code from the X-Bitmap's data stream and returns the XBMCode equivalent of that value. > Calling Context: | Called internally > Parameters: = Takes no parameters. > Return Value: | Returns the XBMCode corresponding to the numerical equivalent of the hexadecimal data code. > Exceptions: | Throws TXBMConverter::TXBMConverterException if the data stream doesn't contain a valid hexadecimal value. > Concurrency: | _Not_ multithread safe. > Other Considerations: | None. --------------------------------------------------------------------------- #endif #if 0 --------------------------------------------------------------------------- > Member Function: TXBMDecoder::GetImageSize ; | unsigned short GetImageSize () > Interface Category: | Sample. > Purpose: | Used internally to read through a line of the image file header to find the number at the end that indicates the size of one side of the image, in pixels. > Calling Context: | Called internally. > Parameters: = Takes no parameters. > Return Value: | Returns the size of the image for the side on the current input line. > Exceptions: | Throws TXBMConverter::TXBMConverterException if the current line is not a properly formed X-Bitmap header line with a size at the end. > Concurrency: | _Not_ multithread safe. > Other Considerations: | None. --------------------------------------------------------------------------- #endif #if 0 --------------------------------------------------------------------------- > Member Function: TXBMDecoder::ThrowBadData ; | static void ThrowBadData (const char * reason) > Interface Category: | Sample. > Purpose: | Used internally to throw a TXBMConverterException. > Calling Context: | Called internally. > Parameters: = const char * reason -The string reason for the exception. > Return Value: | None. > Exceptions: | Throws TXBMConverter::TXBMConverterException. > Concurrency: | _Not_ multithread safe. > Other Considerations: | None. --------------------------------------------------------------------------- #endif