home *** CD-ROM | disk | FTP | other *** search
- #ifndef __XBMDECOD_H
- #define __XBMDECOD_H
- //
- // Copyright (c) 1997,1998 Colosseum Builders, Inc.
- // All rights reserved.
- //
- // Colosseum Builders, Inc. makes no warranty, expressed or implied
- // with regards to this software. It is provided as is.
- //
- // See the README.TXT file that came with this software for restrictions
- // on the use and redistribution of this file or send E-mail to
- // info@colosseumbuilders.com
- //
-
- //
- // Title: XBM Decoder Class Definition
- //
- // Author: John M. Miano miano@colosseumbuilers.com
- //
-
- #include "bitimage.h"
- #include "grexcept.h"
-
- class XbmDecoder : public BitmapImageDecoder
- {
- public:
- XbmDecoder () ;
- XbmDecoder (const XbmDecoder &) ;
- virtual ~XbmDecoder () ;
- XbmDecoder &operator=(const XbmDecoder &) ;
- void ReadImage (std::istream &, BitmapImage &) ;
- int GetHotSpotX () const ;
- int GetHotSpotY () const ;
- std::string GetImageName () const ;
-
- private:
- void Initialize () ;
- void DoCopy (const XbmDecoder &) ;
-
- int NextChar (std::istream &) ;
- int NextToken (std::istream &) ;
-
- // This variables contain information from the image that the caller
- // can retrieve after decoding.
- int hot_spot_x ;
- int hot_spot_y ;
- std::string image_name ;
-
- int last_char ; // One character push back buffer.
- unsigned int lexical_value ; // Value of an integer token
- } ;
-
-
- class EXbmInvalid : public EGraphicsException
- {
- public:
- EXbmInvalid () : EGraphicsException ("Invalid XBM Format") {}
- } ;
-
- #endif
-
-