1*22e87013SAndrew Rist /************************************************************** 2cdf0e10cSrcweir * 3*22e87013SAndrew Rist * Licensed to the Apache Software Foundation (ASF) under one 4*22e87013SAndrew Rist * or more contributor license agreements. See the NOTICE file 5*22e87013SAndrew Rist * distributed with this work for additional information 6*22e87013SAndrew Rist * regarding copyright ownership. The ASF licenses this file 7*22e87013SAndrew Rist * to you under the Apache License, Version 2.0 (the 8*22e87013SAndrew Rist * "License"); you may not use this file except in compliance 9*22e87013SAndrew Rist * with the License. You may obtain a copy of the License at 10*22e87013SAndrew Rist * 11*22e87013SAndrew Rist * http://www.apache.org/licenses/LICENSE-2.0 12*22e87013SAndrew Rist * 13*22e87013SAndrew Rist * Unless required by applicable law or agreed to in writing, 14*22e87013SAndrew Rist * software distributed under the License is distributed on an 15*22e87013SAndrew Rist * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16*22e87013SAndrew Rist * KIND, either express or implied. See the License for the 17*22e87013SAndrew Rist * specific language governing permissions and limitations 18*22e87013SAndrew Rist * under the License. 19*22e87013SAndrew Rist * 20*22e87013SAndrew Rist *************************************************************/ 21*22e87013SAndrew Rist 22*22e87013SAndrew Rist 23cdf0e10cSrcweir 24cdf0e10cSrcweir #ifndef _DXFTBLRD_HXX 25cdf0e10cSrcweir #define _DXFTBLRD_HXX 26cdf0e10cSrcweir 27cdf0e10cSrcweir #include <dxfgrprd.hxx> 28cdf0e10cSrcweir #include <dxfvec.hxx> 29cdf0e10cSrcweir 30cdf0e10cSrcweir 31cdf0e10cSrcweir //---------------------------------------------------------------------------- 32cdf0e10cSrcweir //------------------ Linien-Typ ---------------------------------------------- 33cdf0e10cSrcweir //---------------------------------------------------------------------------- 34cdf0e10cSrcweir 35cdf0e10cSrcweir #define DXF_MAX_DASH_COUNT 32 36cdf0e10cSrcweir 37cdf0e10cSrcweir class DXFLType { 38cdf0e10cSrcweir 39cdf0e10cSrcweir public: 40cdf0e10cSrcweir 41cdf0e10cSrcweir DXFLType * pSucc; 42cdf0e10cSrcweir 43cdf0e10cSrcweir char sName[DXF_MAX_STRING_LEN+1]; // 2 44cdf0e10cSrcweir long nFlags; // 70 45cdf0e10cSrcweir char sDescription[DXF_MAX_STRING_LEN+1]; // 3 46cdf0e10cSrcweir long nDashCount; // 73 47cdf0e10cSrcweir double fPatternLength; // 40 48cdf0e10cSrcweir double fDash[DXF_MAX_DASH_COUNT]; // 49,49,... 49cdf0e10cSrcweir 50cdf0e10cSrcweir DXFLType(); 51cdf0e10cSrcweir void Read(DXFGroupReader & rDGR); 52cdf0e10cSrcweir }; 53cdf0e10cSrcweir 54cdf0e10cSrcweir 55cdf0e10cSrcweir //---------------------------------------------------------------------------- 56cdf0e10cSrcweir //------------------ Layer --------------------------------------------------- 57cdf0e10cSrcweir //---------------------------------------------------------------------------- 58cdf0e10cSrcweir 59cdf0e10cSrcweir class DXFLayer { 60cdf0e10cSrcweir 61cdf0e10cSrcweir public: 62cdf0e10cSrcweir 63cdf0e10cSrcweir DXFLayer * pSucc; 64cdf0e10cSrcweir 65cdf0e10cSrcweir char sName[DXF_MAX_STRING_LEN+1]; // 2 66cdf0e10cSrcweir long nFlags; // 70 67cdf0e10cSrcweir long nColor; // 62 68cdf0e10cSrcweir char sLineType[DXF_MAX_STRING_LEN+1]; // 6 69cdf0e10cSrcweir 70cdf0e10cSrcweir DXFLayer(); 71cdf0e10cSrcweir void Read(DXFGroupReader & rDGR); 72cdf0e10cSrcweir }; 73cdf0e10cSrcweir 74cdf0e10cSrcweir 75cdf0e10cSrcweir //---------------------------------------------------------------------------- 76cdf0e10cSrcweir //------------------ Style --------------------------------------------------- 77cdf0e10cSrcweir //---------------------------------------------------------------------------- 78cdf0e10cSrcweir 79cdf0e10cSrcweir class DXFStyle { 80cdf0e10cSrcweir 81cdf0e10cSrcweir public: 82cdf0e10cSrcweir 83cdf0e10cSrcweir DXFStyle * pSucc; 84cdf0e10cSrcweir 85cdf0e10cSrcweir char sName[DXF_MAX_STRING_LEN+1]; // 2 86cdf0e10cSrcweir long nFlags; // 70 87cdf0e10cSrcweir double fHeight; // 40 88cdf0e10cSrcweir double fWidthFak; // 41 89cdf0e10cSrcweir double fOblAngle; // 50 90cdf0e10cSrcweir long nTextGenFlags; // 71 91cdf0e10cSrcweir double fLastHeightUsed; // 42 92cdf0e10cSrcweir char sPrimFontFile[DXF_MAX_STRING_LEN+1]; // 3 93cdf0e10cSrcweir char sBigFontFile[DXF_MAX_STRING_LEN+1]; // 4 94cdf0e10cSrcweir 95cdf0e10cSrcweir DXFStyle(); 96cdf0e10cSrcweir void Read(DXFGroupReader & rDGR); 97cdf0e10cSrcweir }; 98cdf0e10cSrcweir 99cdf0e10cSrcweir 100cdf0e10cSrcweir //---------------------------------------------------------------------------- 101cdf0e10cSrcweir //------------------ VPort --------------------------------------------------- 102cdf0e10cSrcweir //---------------------------------------------------------------------------- 103cdf0e10cSrcweir 104cdf0e10cSrcweir class DXFVPort { 105cdf0e10cSrcweir 106cdf0e10cSrcweir public: 107cdf0e10cSrcweir 108cdf0e10cSrcweir DXFVPort * pSucc; 109cdf0e10cSrcweir 110cdf0e10cSrcweir char sName[DXF_MAX_STRING_LEN+1]; // 2 111cdf0e10cSrcweir long nFlags; // 70 112cdf0e10cSrcweir double fMinX; // 10 113cdf0e10cSrcweir double fMinY; // 20 114cdf0e10cSrcweir double fMaxX; // 11 115cdf0e10cSrcweir double fMaxY; // 21 116cdf0e10cSrcweir double fCenterX; // 12 117cdf0e10cSrcweir double fCenterY; // 22 118cdf0e10cSrcweir double fSnapBaseX; // 13 119cdf0e10cSrcweir double fSnapBaseY; // 23 120cdf0e10cSrcweir double fSnapSapcingX; // 14 121cdf0e10cSrcweir double fSnapSpacingY; // 24 122cdf0e10cSrcweir double fGridX; // 15 123cdf0e10cSrcweir double fGridY; // 25 124cdf0e10cSrcweir DXFVector aDirection; // 16,26,36 125cdf0e10cSrcweir DXFVector aTarget; // 17,27,37 126cdf0e10cSrcweir double fHeight; // 40 127cdf0e10cSrcweir double fAspectRatio; // 41 128cdf0e10cSrcweir double fLensLength; // 42 129cdf0e10cSrcweir double fFrontClipPlane; // 43 130cdf0e10cSrcweir double fBackClipPlane; // 44 131cdf0e10cSrcweir double fTwistAngle; // 51 132cdf0e10cSrcweir long nStatus; // 68 133cdf0e10cSrcweir long nID; // 69 134cdf0e10cSrcweir long nMode; // 71 135cdf0e10cSrcweir long nCircleZoomPercent; // 72 136cdf0e10cSrcweir long nFastZoom; // 73 137cdf0e10cSrcweir long nUCSICON; // 74 138cdf0e10cSrcweir long nSnap; // 75 139cdf0e10cSrcweir long nGrid; // 76 140cdf0e10cSrcweir long nSnapStyle; // 77 141cdf0e10cSrcweir long nSnapIsopair; // 78 142cdf0e10cSrcweir 143cdf0e10cSrcweir DXFVPort(); 144cdf0e10cSrcweir void Read(DXFGroupReader & rDGR); 145cdf0e10cSrcweir }; 146cdf0e10cSrcweir 147cdf0e10cSrcweir 148cdf0e10cSrcweir //---------------------------------------------------------------------------- 149cdf0e10cSrcweir //------------------ Tabellen ------------------------------------------------ 150cdf0e10cSrcweir //---------------------------------------------------------------------------- 151cdf0e10cSrcweir 152cdf0e10cSrcweir class DXFTables { 153cdf0e10cSrcweir 154cdf0e10cSrcweir public: 155cdf0e10cSrcweir 156cdf0e10cSrcweir DXFLType * pLTypes; // Liste der Linientypen 157cdf0e10cSrcweir DXFLayer * pLayers; // Liste der Layers 158cdf0e10cSrcweir DXFStyle * pStyles; // Liste der Styles 159cdf0e10cSrcweir DXFVPort * pVPorts; // Liste der Viewports 160cdf0e10cSrcweir 161cdf0e10cSrcweir DXFTables(); 162cdf0e10cSrcweir ~DXFTables(); 163cdf0e10cSrcweir 164cdf0e10cSrcweir void Read(DXFGroupReader & rDGR); 165cdf0e10cSrcweir // Liest die Tabellen ein bis zu einem ENDSEC oder EOF 166cdf0e10cSrcweir // (unbekannte Dinge/Tabellen werden uebersprungen) 167cdf0e10cSrcweir 168cdf0e10cSrcweir void Clear(); 169cdf0e10cSrcweir 170cdf0e10cSrcweir // Suche nach Tabelleneintraegen: 171cdf0e10cSrcweir DXFLType * SearchLType(const char * pName) const; 172cdf0e10cSrcweir DXFLayer * SearchLayer(const char * pName) const; 173cdf0e10cSrcweir DXFVPort * SearchVPort(const char * pName) const; 174cdf0e10cSrcweir 175cdf0e10cSrcweir }; 176cdf0e10cSrcweir 177cdf0e10cSrcweir #endif 178cdf0e10cSrcweir 179cdf0e10cSrcweir 180