////////////////////////////////////////////////////////////////////////////// //文件: SegY文件操作类 //主要功能: // //程序编写: 2011-4-1 // // ///////////////////////////////////////////////////////////////////////////// #pragma once namespace NCube { /*!\brief Raw binary data access. */ class AFX_EXT_CLASS CDataBuffer { public: CDataBuffer(void); ~CDataBuffer(void); inline bool IsEmpty() const; inline int GetCount() const { return m_nSampleNum; } inline int GetBytesPerSample() { return m_nSampleBytes; } inline int GetBytesLength() { return m_nSampleNum * m_nSampleBytes; } inline BYTE* GetData() { return m_pData; } inline short* GetDataShort() { return (short*)GetData(); } inline long * GetDataLong() { return (long*)GetData(); } inline float* GetDataFloat() { return (float*)GetData(); } inline char * GetDataChar() { return (char*)GetData(); } inline double* GetDataDouble() { return (double*)GetData(); } inline BYTE* GetData(int nIndex) {return m_pData + (nIndex*m_nSampleBytes);}//返回第nIndex个数据索引指针 0