// Borland C++ Builder
// Copyright (c) 1995, 2005 by Borland Software Corporation
// All rights reserved

// (DO NOT EDIT: machine generated header) 'Dwg12.pas' rev: 10.00

#ifndef Dwg12HPP
#define Dwg12HPP

#pragma delphiheader begin
#pragma option push
#pragma option -w-      // All warnings off
#pragma option -Vx      // Zero-length empty class member functions
#pragma pack(push,8)
#include <System.hpp>	// Pascal unit
#include <Sysinit.hpp>	// Pascal unit
#include <Windows.hpp>	// Pascal unit
#include <Sysutils.hpp>	// Pascal unit
#include <Classes.hpp>	// Pascal unit
#include <Graphics.hpp>	// Pascal unit
#include <Dxfconv.hpp>	// Pascal unit
#include <Dxfimage.hpp>	// Pascal unit
#include <Extrusion.hpp>	// Pascal unit
#include <Sgconsts.hpp>	// Pascal unit
#include <Sglines.hpp>	// Pascal unit
#include <Dwg.hpp>	// Pascal unit

//-- user supplied -----------------------------------------------------------

namespace Dwg12
{
//-- type declarations -------------------------------------------------------
typedef void __fastcall (__closure *Tdwg12Proc)(Dxfconv::TsgDXFEntity* &E);

#pragma pack(push,1)
struct Tdwg12Table
{
	
public:
	Word Size;
	int Nr;
	int Start;
} ;
#pragma pack(pop)

#pragma pack(push,1)
struct Tdwg12Header
{
	
public:
	Byte Version[20];
	int Entities;
	int EntEnd;
	int Blocks;
	int Unused1;
	int BlockEnd;
	int Unused2;
	#pragma pack(push,1)
	Tdwg12Table BlockRecs;
	#pragma pack(pop)
	#pragma pack(push,1)
	Tdwg12Table Layers;
	#pragma pack(pop)
	#pragma pack(push,1)
	Tdwg12Table Styles;
	#pragma pack(pop)
	#pragma pack(push,1)
	Tdwg12Table LTypes;
	#pragma pack(pop)
} ;
#pragma pack(pop)

class DELPHICLASS Tdwg12Reader;
class PASCALIMPLEMENTATION Tdwg12Reader : public Dwg::TdwgReader 
{
	typedef Dwg::TdwgReader inherited;
	
private:
	Classes::TStringList* FBlkRecs;
	Dxfconv::TsgDXFEntity* FLastBlk;
	Dxfconv::TsgDXFEntity* FLastEnt;
	int FLastPos;
	int FDone;
	int FCount;
	#pragma pack(push,1)
	Tdwg12Header FHeader;
	#pragma pack(pop)
	bool __fastcall OldVer(void);
	Byte __fastcall ReadByte(void);
	Word __fastcall ReadWord(void);
	double __fastcall ReadDouble(void);
	double __fastcall ReadAngle(void);
	HIDESBASE System::TObject* __fastcall NewObject(Byte Kind);
	AnsiString __fastcall NextBlkName();
	HIDESBASE void __fastcall DoProgress(Graphics::TProgressStage Stage);
	void __fastcall FindBlock(Dxfconv::TsgDXFInsert* I);
	void __fastcall ReadBlks(void);
	void __fastcall ReadVPorts(void);
	void __fastcall ReadTable(const Tdwg12Table &ATable, Dxfconv::TsgDXFGroup* AOwner, Tdwg12Proc Proc);
	void __fastcall ReadLayer(Dxfconv::TsgDXFEntity* &E);
	void __fastcall ReadLType(Dxfconv::TsgDXFEntity* &E);
	void __fastcall ReadEntities(int AStart, int AEnd);
	
protected:
	virtual void __fastcall ReadHeader(void);
	virtual void __fastcall ReadObjects(void);
	virtual void __fastcall ReadImage(void);
	
public:
	__fastcall Tdwg12Reader(Dxfconv::TsgDXFConverter* Conv, Classes::TStream* S);
	__fastcall virtual ~Tdwg12Reader(void);
};


//-- var, const, procedure ---------------------------------------------------

}	/* namespace Dwg12 */
using namespace Dwg12;
#pragma pack(pop)
#pragma option pop

#pragma delphiheader end.
//-- end unit ----------------------------------------------------------------
#endif	// Dwg12
