VR-Forces 4.0.4 Class Documentation
include/dted/dfad_record.h
Go to the documentation of this file.
00001 /*******************************************************************************
00002 ** Copyright (c) 2003 MAK Technologies, Inc.
00003 ** All rights reserved.
00004 *******************************************************************************/
00005 /*******************************************************************************
00006 ** $RCSfile: dfad_record.h,v $ $Revision: 1.7 $ $State: Exp $
00007 *******************************************************************************/
00008 
00009 // 
00010 //   Define a dfad data record (2709 bytes in blocks of 36 bit words.
00011 //   It permits access to a specific word, or read it sequentially from a
00012 //   point, assking for:
00013 //   a feature : 2 words
00014 //   a coord   : a word
00015 //   checksum  : a word
00016 //   a zero word.
00017 //
00018 //   It has two methods to access the record data:
00019 //   1. Directly using 
00020 //    getData(from, howMany, where) : from which word, how many words (must be leess than 602 - from)
00021 //
00022 //   2. Setting a sequential pointer and using sequential readers
00023 //    setPointerToWord(int i = 0); i <= 601 : sets the pointer to word i
00024 //    getFeature(pfeature): gets next feature data size (two words)
00025 //    getCoord(pCoord): gets next coord data size ( word)
00026 //    getWords(pWords, howMany): gets howMany words
00027 //  For more details, see dfad_main.doc
00028 //
00029 
00030 
00031 #ifndef __DFADRECORD
00032 #define __DFADRECORD
00033 
00034 #include "dted/dtedDefines.h"
00035 #include <stdio.h>
00036 #include <vlutil/vlMachineTypes.h>
00037 
00038 class DT_DLL_dted DtDfadRecord
00039 {
00040 public:
00041 
00042    DtDfadRecord();
00043 
00044   virtual bool setFile(FILE *f);
00045 
00046    // Operations based in the pointer location
00047    virtual bool getWords(DtU8 *pword, int howMany = 1);
00048 
00049 protected:
00050 
00051    // read from the file a record
00052    virtual bool read();
00053 
00054    // move from the record to the buffer
00055    virtual bool moveWords(DtU8 *pword, int howMany = 1, int offsetInWords = 0);
00056 
00057    DtU8 myData[2709]; //see dfad explanation for 2709
00058 
00059    int  myPointerLocation;
00060    int  myWordsAvailable;
00061    int  myCurrentWord;
00062 
00063    bool myLoaded;
00064 
00065    FILE *myFile;
00066 
00067    bool myAlignToByte;
00068 };
00069 
00070 #endif

Document ID: Generated on Fri Jun 29 16:33:32 EDT 2012 from SVN revision 116588
Copyright © 2005-2012 VT MÄK Inc. All Rights Reserved (www.mak.com)