Main Page | Class Hierarchy | Compound List | File List | Compound Members

BxBit1.h

00001 // ##################################################################
00002 // Binx
00003 // $Id: BxBit1_8h-source.html,v 1.1.1.1 2006/04/19 14:19:02 edikt2 Exp $
00004 //
00005 // Class for bit-1 data type.
00006 // ##################################################################
00007 /*
00008 
00009 //  edikt::BinX
00010 //  www.edikt.org
00011 //  support@edikt.org
00012 
00013 // Copyright (c) 2003 The University of Edinburgh.
00014 
00015 */
00016 
00017 #ifndef __BxBit1__
00018 #define __BxBit1__
00019 
00020 #include "BxDataObject.h"
00021 
00022 /*
00023  * Class implementing the BinX data type bit-1.
00024  * A byte is the smallest unit of physical storage provided for
00025  * any BinX primitive data type (through the Base class attribute dataValue_).
00026  * Although a byte is used to store a bit, process is performed on the bit level.
00027  * This class provides methods
00028  * to pack and unpack the bits into and out of a byte.
00029  * NOTE: BxBit1 is not a widely used primitive data type.
00030  * <BR><B>Use example:</B><BR>
00031  * Monochrome bitmaps use one bit to represent one pixel. The whole image
00032  * can be seen as an array of bits.
00033  * <BR><B>Since:</B>  BinX version 1.0.
00034  */
00035 class DECLSPEC BxBit1 : public BxDataObject
00036 {
00037 public:
00038     BxBit1();
00039     BxBit1(const BxBit1& copy);
00040     virtual ~BxBit1();
00041 
00042     virtual char * className() const { return "BxBit1"; } //<Returns the null-terminated string "BxBit1".
00043     virtual BxBit1 * clone() const;
00044 
00045     virtual bool readFromFile() { return false; } //<Always returns the value false.
00046 
00047     bx_byte8 pack(bx_byte8 b, int shift);
00048     void unpack(bx_byte8 b, int shift);
00049 };
00050 
00051 #endif

Generated on Fri May 6 13:36:17 2005 for edikt::BinX by doxygen 1.3.3