// Bit.h: interface for the CBit class. // ////////////////////////////////////////////////////////////////////// #if !defined(AFX_BIT_H__A5B0B575_6D0F_4611_9309_8BFC29677EA4__INCLUDED_) #define AFX_BIT_H__A5B0B575_6D0F_4611_9309_8BFC29677EA4__INCLUDED_ #if _MSC_VER > 1000 #pragma once #endif // _MSC_VER > 1000 /////////////////// #include "Chip.h" /////////////////// class CBit // this class defines a bit object (Cbit class) that includes chip object (Cchip class) { public: CBit* SubChipRotate(int shift);// to rotate this bit object subchip by subchip with the size of "shift" . void WriteChip(int index,int shift);// to update the chips of this bit object by overwritting some chips on the chips with distancse of "shift" from. void ChipRotate(int);// to rotate the chips of this bit object with the determined size. int weight; //int GetValue(); // Hint: May a CBit object be upper than 1 but BOOL value ; // value of bit (0=FALSE or 1=TRUE) //BYTE* chip ; // chip set of bit CChip* chip ; // array of chips that exists in this bit object. BYTE size ; // chip size of the bit //int* code ; // code that is assigned to the bit CBit(int ChipSize=0,int SubChipSize=0);// the constructor of this bit object by using chip size for length of chip array and subchip size for length of subchip array to alocate enough memory for them. virtual ~CBit();// the deconstructor of this object to release all alocated memory to arraies . }; #endif // !defined(AFX_BIT_H__A5B0B575_6D0F_4611_9309_8BFC29677EA4__INCLUDED_)