You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

50 lines
1.4 KiB
C++

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

//////////////////////////////////////////////////////////////////////////////
//文件: 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);
};