1 /************************************************************** 2 * 3 * Licensed to the Apache Software Foundation (ASF) under one 4 * or more contributor license agreements. See the NOTICE file 5 * distributed with this work for additional information 6 * regarding copyright ownership. The ASF licenses this file 7 * to you under the Apache License, Version 2.0 (the 8 * "License"); you may not use this file except in compliance 9 * with the License. You may obtain a copy of the License at 10 * 11 * http://www.apache.org/licenses/LICENSE-2.0 12 * 13 * Unless required by applicable law or agreed to in writing, 14 * software distributed under the License is distributed on an 15 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16 * KIND, either express or implied. See the License for the 17 * specific language governing permissions and limitations 18 * under the License. 19 * 20 *************************************************************/ 21 22 23 24 #ifndef _DXFBLKRD_HXX 25 #define _DXFBLKRD_HXX 26 27 #include <dxfentrd.hxx> 28 29 //---------------------------------------------------------------------------- 30 //---------------- Ein Block (= Menge von Entities) -------------------------- 31 //---------------------------------------------------------------------------- 32 33 class DXFBlock : public DXFEntities { 34 35 public: 36 37 DXFBlock * pSucc; 38 // Zeiger auf naechsten Block in der Liste DXFBlocks::pFirst 39 40 // Eigenschaften des Blocks, durch Gruppencodes kommentiert: 41 char sName[DXF_MAX_STRING_LEN+1]; // 2 42 char sAlsoName[DXF_MAX_STRING_LEN+1]; // 3 43 long nFlags; // 70 44 DXFVector aBasePoint; // 10,20,30 45 char sXRef[DXF_MAX_STRING_LEN+1]; // 1 46 47 DXFBlock(); 48 ~DXFBlock(); 49 50 void Read(DXFGroupReader & rDGR); 51 // Liest den Block (einschliesslich der Entities) per rGDR 52 // aus einer DXF-Datei bis zu einem ENDBLK, ENDSEC oder EOF. 53 }; 54 55 56 //---------------------------------------------------------------------------- 57 //---------------- Eine Menge von Bloecken ----------------------------------- 58 //---------------------------------------------------------------------------- 59 60 class DXFBlocks { 61 62 public: 63 64 DXFBlock * pFirst; 65 // Liste der Bloecke, READ ONLY! 66 67 DXFBlocks(); 68 ~DXFBlocks(); 69 70 void Read(DXFGroupReader & rDGR); 71 // Liesst alle Bloecke per rDGR bis zu einem ENDSEC oder EOF. 72 73 DXFBlock * Search(const char * sName) const; 74 // Sucht einen Block mit dem Namen, liefert NULL bei Misserfolg. 75 76 void Clear(); 77 // Loescht alle Bloecke; 78 79 }; 80 81 #endif 82 83 84