|
|
//////////////////////////////////////////////////////////////////////////////
|
|
|
//文件: SegY格式文件操作
|
|
|
//主要功能:
|
|
|
//
|
|
|
//程序编写:
|
|
|
//日期:2005-12-07
|
|
|
//
|
|
|
//
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
#pragma once
|
|
|
#include "..\DrawLocal\FileSegy.h"
|
|
|
|
|
|
//CFileSegy中定义的数据类型
|
|
|
//enum enDataType
|
|
|
//{
|
|
|
// typeIbmFloat = 1, // 4-byte IBM floating-point
|
|
|
// typeIbmLong = 2, // 4-byte, two's complement integer
|
|
|
// typeIbmShort = 3, // 2-byte, two's complement integer
|
|
|
// typeIbmGainLong = 4, // 4-byte fixed-point with gain (obsolete)
|
|
|
// typeIeeFloat = 5, // IEEE floating-point
|
|
|
// // 6
|
|
|
// // 7 为了地震剖面格式中的扩展
|
|
|
// typeChar = 8, // signed char (1 byte)
|
|
|
// typeIeeShort = 9, //
|
|
|
// typeIeeLong = 10, //
|
|
|
// typeIeeDouble = 11, // IEEE双精度实数(8字节)
|
|
|
//};
|
|
|
|
|
|
class AFX_EXT_CLASS CBinaryPosition
|
|
|
{
|
|
|
public:
|
|
|
CBinaryPosition(void);
|
|
|
virtual ~CBinaryPosition(void);
|
|
|
|
|
|
void SetAt(long _p, CFileSegy::EDataType _c, BOOL _ir);
|
|
|
int Read(CString name, CString section, CString key);
|
|
|
void Write(CString name, CString section, CString key);
|
|
|
|
|
|
int Read(CFile& fr, const short& ver);
|
|
|
void Write(CFile& fw, const short& ver);
|
|
|
void Serialize(CArchive& ar, const short &ver);
|
|
|
|
|
|
long position; //文件中指针定位(字节)
|
|
|
CFileSegy::EDataType code; //格式代码
|
|
|
BOOL IsReverse; //是否反转
|
|
|
//long offset;
|
|
|
void operator=(CBinaryPosition& bp);
|
|
|
};
|