50 lines
1.3 KiB
C++
50 lines
1.3 KiB
C++
//-----------------------------------------------------------------------------+
|
|
// Copyright (C), 1998-2007, Beijing Tangent Software Co. Ltd.
|
|
// = FileName : TGGiStreamFile 类
|
|
// = Version : ver2.0
|
|
// = Author : wlw
|
|
// = CreateDate : 2002-09-09
|
|
// = Description: TGGiStreamFile 声明
|
|
// = Maintainers:
|
|
//
|
|
//-----------------------------------------------------------------------------+
|
|
#ifndef _TGGISTREAMFILE_H_
|
|
#define _TGGISTREAMFILE_H_
|
|
|
|
#include <stdio.h>
|
|
#include <io.h>
|
|
|
|
#if (ADS > 15)
|
|
#include <istream>
|
|
#else
|
|
#include <iostream.h>
|
|
#endif
|
|
|
|
class GEOAPI TGGiStreamFile
|
|
{
|
|
public:
|
|
TGGiStreamFile();
|
|
virtual ~TGGiStreamFile();
|
|
|
|
int Pack(const TCHAR *dwgFile, const TCHAR *lzwFile);
|
|
int UnPack(const TCHAR *lzwFile, const TCHAR *dwgFile);
|
|
|
|
#if (ADS > 15)
|
|
void StreamCopy(std::istream & _libfile, std::ostream &sld_out, long sld_fsize);
|
|
#else
|
|
void StreamCopy(istream & _libfile, ostream &sld_out, long sld_fsize);
|
|
#endif
|
|
|
|
private:
|
|
void InitValue(void);
|
|
|
|
int Read(int h,void *buf,int num,bool bProtect = false);
|
|
int Write(int h,void *buf,int num,bool bProtect = false);
|
|
|
|
void WriteBit(short,short,short, unsigned char *,int);
|
|
int ReadBit(short,short, unsigned char *,int);
|
|
int PackFile(short size,int h1,int h2);
|
|
int UnPackFile(short size,int h1,int h2);
|
|
|
|
};
|
|
#endif |