![]() |
VR-Forces 4.0.4 Class Documentation
|
00001 /******************************************************************************* 00002 ** Copyright (c) 2002 MAK Technologies, Inc. 00003 ** All rights reserved. 00004 *******************************************************************************/ 00005 /******************************************************************************* 00006 ** $RCSfile: dfad_util.h,v $ $Revision: 1.5 $ $State: Exp $ 00007 *******************************************************************************/ 00008 00009 #ifndef __DFADUITL 00010 #define __DFADUTIL 00011 00012 // Class to read 36 bits words coming from dfad format. 00013 #include "dted/dtedDefines.h" 00014 #include <vlutil/vlMachineTypes.h> 00015 00016 class DT_DLL_dted DtBitData 00017 { 00018 00019 public: 00020 00021 DtBitData(); 00022 00023 void set(unsigned char value); 00024 bool sign(int bit); 00025 int val(int from, int to, int acum); 00026 00027 protected: 00028 00029 struct stByte 00030 { 00031 unsigned char b1 : 1; 00032 unsigned char b2 : 1; 00033 unsigned char b3 : 1; 00034 unsigned char b4 : 1; 00035 unsigned char b5 : 1; 00036 unsigned char b6 : 1; 00037 unsigned char b7 : 1; 00038 unsigned char b8 : 1; 00039 }; 00040 00041 stByte myByte; 00042 }; 00043 00044 #endif