QCAD
Open Source 2D CAD
dl_creationadapter.h
Go to the documentation of this file.
1 /****************************************************************************
2 ** Copyright (C) 2001-2013 RibbonSoft, GmbH. All rights reserved.
3 **
4 ** This file is part of the dxflib project.
5 **
6 ** This file is free software; you can redistribute it and/or modify
7 ** it under the terms of the GNU General Public License as published by
8 ** the Free Software Foundation; either version 2 of the License, or
9 ** (at your option) any later version.
10 **
11 ** Licensees holding valid dxflib Professional Edition licenses may use
12 ** this file in accordance with the dxflib Commercial License
13 ** Agreement provided with the Software.
14 **
15 ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
16 ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
17 **
18 ** See http://www.ribbonsoft.com for further details.
19 **
20 ** Contact info@ribbonsoft.com if any conditions of this licensing are
21 ** not clear to you.
22 **
23 **********************************************************************/
24 
25 #ifndef DL_CREATIONADAPTER_H
26 #define DL_CREATIONADAPTER_H
27 
28 #include "dl_global.h"
29 
30 #include "dl_creationinterface.h"
31 
40 public:
42  virtual ~DL_CreationAdapter() {}
43  virtual void processCodeValuePair(unsigned int, const std::string&) {}
44  virtual void endSection() {}
45  virtual void addLayer(const DL_LayerData&) {}
46  virtual void addLinetype(const DL_LinetypeData&) {}
47  virtual void addLinetypeDash(double) {}
48  virtual void addBlock(const DL_BlockData&) {}
49  virtual void endBlock() {}
50  virtual void addTextStyle(const DL_StyleData&) {}
51  virtual void addPoint(const DL_PointData&) {}
52  virtual void addLine(const DL_LineData&) {}
53  virtual void addXLine(const DL_XLineData&) {}
54  virtual void addRay(const DL_RayData&) {}
55 
56  virtual void addArc(const DL_ArcData&) {}
57  virtual void addCircle(const DL_CircleData&) {}
58  virtual void addEllipse(const DL_EllipseData&) {}
59 
60  virtual void addPolyline(const DL_PolylineData&) {}
61  virtual void addVertex(const DL_VertexData&) {}
62 
63  virtual void addSpline(const DL_SplineData&) {}
64  virtual void addControlPoint(const DL_ControlPointData&) {}
65  virtual void addFitPoint(const DL_FitPointData&) {}
66  virtual void addKnot(const DL_KnotData&) {}
67 
68  virtual void addInsert(const DL_InsertData&) {}
69 
70  virtual void addMText(const DL_MTextData&) {}
71  virtual void addMTextChunk(const std::string&) {}
72  virtual void addText(const DL_TextData&) {}
73  virtual void addArcAlignedText(const DL_ArcAlignedTextData&) {}
74  virtual void addAttribute(const DL_AttributeData&) {}
75 
76  virtual void addDimAlign(const DL_DimensionData&,
77  const DL_DimAlignedData&) {}
78  virtual void addDimLinear(const DL_DimensionData&,
79  const DL_DimLinearData&) {}
80  virtual void addDimRadial(const DL_DimensionData&,
81  const DL_DimRadialData&) {}
82  virtual void addDimDiametric(const DL_DimensionData&,
83  const DL_DimDiametricData&) {}
84  virtual void addDimAngular(const DL_DimensionData&,
85  const DL_DimAngularData&) {}
86  virtual void addDimAngular3P(const DL_DimensionData&,
87  const DL_DimAngular3PData&) {}
88  virtual void addDimOrdinate(const DL_DimensionData&,
89  const DL_DimOrdinateData&) {}
90  virtual void addLeader(const DL_LeaderData&) {}
91  virtual void addLeaderVertex(const DL_LeaderVertexData&) {}
92 
93  virtual void addHatch(const DL_HatchData&) {}
94 
95  virtual void addTrace(const DL_TraceData&) {}
96  virtual void add3dFace(const DL_3dFaceData&) {}
97  virtual void addSolid(const DL_SolidData&) {}
98 
99  virtual void addImage(const DL_ImageData&) {}
100  virtual void linkImage(const DL_ImageDefData&) {}
101  virtual void addHatchLoop(const DL_HatchLoopData&) {}
102  virtual void addHatchEdge(const DL_HatchEdgeData&) {}
103 
104  virtual void addXRecord(const std::string&) {}
105  virtual void addXRecordString(int, const std::string&) {}
106  virtual void addXRecordReal(int, double) {}
107  virtual void addXRecordInt(int, int) {}
108  virtual void addXRecordBool(int, bool) {}
109 
110  virtual void addXDataApp(const std::string&) {}
111  virtual void addXDataString(int, const std::string&) {}
112  virtual void addXDataReal(int, double) {}
113  virtual void addXDataInt(int, int) {}
114 
115  virtual void addDictionary(const DL_DictionaryData&) {}
117 
118  virtual void endEntity() {}
119 
120  virtual void addComment(const std::string&) {}
121 
122  virtual void setVariableVector(const std::string&, double, double, double, int) {}
123  virtual void setVariableString(const std::string&, const std::string&, int) {}
124  virtual void setVariableInt(const std::string&, int, int) {}
125  virtual void setVariableDouble(const std::string&, double, int) {}
126 #ifdef DL_COMPAT
127  virtual void setVariableVector(const char*, double, double, double, int) {}
128  virtual void setVariableString(const char*, const char*, int) {}
129  virtual void setVariableInt(const char*, int, int) {}
130  virtual void setVariableDouble(const char*, double, int) {}
131  virtual void processCodeValuePair(unsigned int, char*) {}
132  virtual void addComment(const char*) {}
133  virtual void addMTextChunk(const char*) {}
134 #endif
135  virtual void endSequence() {}
136 };
137 
138 #endif
DL_CreationAdapter()
Definition: dl_creationadapter.h:41
virtual void addTrace(const DL_TraceData &)
Called for every trace start.
Definition: dl_creationadapter.h:95
virtual void addAttribute(const DL_AttributeData &)
Called for every block Attribute entity.
Definition: dl_creationadapter.h:74
Dictionary entry data.
Definition: dl_entities.h:1803
virtual void addComment(const std::string &)
Called for every comment in the DXF file (code 999).
Definition: dl_creationadapter.h:120
virtual void addDimAngular(const DL_DimensionData &, const DL_DimAngularData &)
Called for every angular dimension (2 lines version) entity.
Definition: dl_creationadapter.h:84
Radial Dimension Data.
Definition: dl_entities.h:1183
Hatch data.
Definition: dl_entities.h:1464
virtual void addXRecord(const std::string &)
Called for every XRecord with the given handle.
Definition: dl_creationadapter.h:104
Generic Dimension Data.
Definition: dl_entities.h:990
virtual void addImage(const DL_ImageData &)
Called for every image entity.
Definition: dl_creationadapter.h:99
virtual void addVertex(const DL_VertexData &)
Called for every polyline vertex.
Definition: dl_creationadapter.h:61
Ordinate Dimension Data.
Definition: dl_entities.h:1350
virtual void addTextStyle(const DL_StyleData &)
Called for every text style.
Definition: dl_creationadapter.h:50
Abstract class (interface) for the creation of new entities.
Definition: dl_creationinterface.h:47
virtual void addDimLinear(const DL_DimensionData &, const DL_DimLinearData &)
Called for every linear or rotated dimension entity.
Definition: dl_creationadapter.h:78
virtual void addDictionaryEntry(const DL_DictionaryEntryData &)
Called for dictionary entries.
Definition: dl_creationadapter.h:116
An abstract adapter class for receiving DXF events when a DXF file is being read. ...
Definition: dl_creationadapter.h:39
virtual void addXDataReal(int, double)
Called for XData tuples.
Definition: dl_creationadapter.h:112
virtual void addXRecordInt(int, int)
Called for XRecords of type int.
Definition: dl_creationadapter.h:107
virtual void addSolid(const DL_SolidData &)
Called for every solid start.
Definition: dl_creationadapter.h:97
Aligned Dimension Data.
Definition: dl_entities.h:1100
virtual void setVariableVector(const std::string &, double, double, double, int)
Called for every vector variable in the DXF file (e.g.
Definition: dl_creationadapter.h:122
virtual void addDimDiametric(const DL_DimensionData &, const DL_DimDiametricData &)
Called for every diametric dimension entity.
Definition: dl_creationadapter.h:82
virtual void addMTextChunk(const std::string &)
Called for additional text chunks for MTEXT entities.
Definition: dl_creationadapter.h:71
virtual void addDimAlign(const DL_DimensionData &, const DL_DimAlignedData &)
Called for every aligned dimension entity.
Definition: dl_creationadapter.h:76
Circle Data.
Definition: dl_entities.h:352
virtual void endEntity()
Called after an entity has been completed.
Definition: dl_creationadapter.h:118
virtual void addSpline(const DL_SplineData &)
Called for every spline.
Definition: dl_creationadapter.h:63
Text Data.
Definition: dl_entities.h:800
virtual void addXRecordString(int, const std::string &)
Called for XRecords of type string.
Definition: dl_creationadapter.h:105
Line Data.
Definition: dl_entities.h:221
virtual void addXDataString(int, const std::string &)
Called for XData tuples.
Definition: dl_creationadapter.h:111
virtual void addHatchLoop(const DL_HatchLoopData &)
Called for every hatch loop.
Definition: dl_creationadapter.h:101
Text style data.
Definition: dl_entities.h:130
Linear (rotated) Dimension Data.
Definition: dl_entities.h:1137
virtual void addLeader(const DL_LeaderData &)
Called for every leader start.
Definition: dl_creationadapter.h:90
virtual void addKnot(const DL_KnotData &)
Called for every spline knot value.
Definition: dl_creationadapter.h:66
virtual void addDimAngular3P(const DL_DimensionData &, const DL_DimAngular3PData &)
Called for every angular dimension (3 points version) entity.
Definition: dl_creationadapter.h:86
virtual void addComment(const std::string &comment)=0
Called for every comment in the DXF file (code 999).
Spline knot data.
Definition: dl_entities.h:556
virtual void endSection()
Called when a section (entity, table entry, etc.) is finished.
Definition: dl_creationadapter.h:44
#define DXFLIB_EXPORT
Definition: dl_global.h:12
virtual void addArc(const DL_ArcData &)
Called for every arc.
Definition: dl_creationadapter.h:56
virtual void addMText(const DL_MTextData &)
Called for every multi Text entity.
Definition: dl_creationadapter.h:70
virtual void addXDataInt(int, int)
Called for XData tuples.
Definition: dl_creationadapter.h:113
virtual void setVariableDouble(const std::string &, double, int)
Called for every double variable in the DXF file (e.g.
Definition: dl_creationadapter.h:125
virtual void addDimOrdinate(const DL_DimensionData &, const DL_DimOrdinateData &)
Called for every ordinate dimension entity.
Definition: dl_creationadapter.h:88
virtual void addArcAlignedText(const DL_ArcAlignedTextData &)
Called for every arc aligned text entity.
Definition: dl_creationadapter.h:73
virtual void addLine(const DL_LineData &)
Called for every line.
Definition: dl_creationadapter.h:52
virtual void addMTextChunk(const std::string &text)=0
Called for additional text chunks for MTEXT entities.
virtual void setVariableString(const std::string &, const std::string &, int)
Called for every string variable in the DXF file (e.g.
Definition: dl_creationadapter.h:123
virtual void addXLine(const DL_XLineData &)
Called for every xline.
Definition: dl_creationadapter.h:53
virtual void setVariableVector(const std::string &key, double v1, double v2, double v3, int code)=0
Called for every vector variable in the DXF file (e.g.
virtual void addInsert(const DL_InsertData &)
Called for every insert.
Definition: dl_creationadapter.h:68
virtual void addXRecordBool(int, bool)
Called for XRecords of type bool.
Definition: dl_creationadapter.h:108
virtual void addCircle(const DL_CircleData &)
Called for every circle.
Definition: dl_creationadapter.h:57
virtual void linkImage(const DL_ImageDefData &)
Called for every image definition.
Definition: dl_creationadapter.h:100
virtual void setVariableInt(const std::string &, int, int)
Called for every int variable in the DXF file (e.g.
Definition: dl_creationadapter.h:124
Hatch edge data.
Definition: dl_entities.h:1533
Spline fit point data.
Definition: dl_entities.h:602
Polyline Data.
Definition: dl_entities.h:382
Point Data.
Definition: dl_entities.h:197
virtual void addDimRadial(const DL_DimensionData &, const DL_DimRadialData &)
Called for every radial dimension entity.
Definition: dl_creationadapter.h:80
virtual void processCodeValuePair(unsigned int, const std::string &)
Called for every code / value tuple of the DXF file.
Definition: dl_creationadapter.h:43
virtual void addFitPoint(const DL_FitPointData &)
Called for every spline fit point.
Definition: dl_creationadapter.h:65
virtual void processCodeValuePair(unsigned int groupCode, const std::string &groupValue)=0
Called for every code / value tuple of the DXF file.
Line Type Data.
Definition: dl_entities.h:90
virtual void endSequence()
Called when a SEQEND occurs (when a POLYLINE or ATTRIB is done)
Definition: dl_creationadapter.h:135
virtual ~DL_CreationAdapter()
Definition: dl_creationadapter.h:42
Block Data.
Definition: dl_entities.h:59
MText Data.
Definition: dl_entities.h:719
virtual void addBlock(const DL_BlockData &)
Called for every block.
Definition: dl_creationadapter.h:48
virtual void addDictionary(const DL_DictionaryData &)
Called for dictionary objects.
Definition: dl_creationadapter.h:115
virtual void setVariableInt(const std::string &key, int value, int code)=0
Called for every int variable in the DXF file (e.g.
virtual void addHatchEdge(const DL_HatchEdgeData &)
Called for every hatch edge entity.
Definition: dl_creationadapter.h:102
virtual void addLinetypeDash(double)
Called for every dash in linetype pattern.
Definition: dl_creationadapter.h:47
virtual void add3dFace(const DL_3dFaceData &)
Called for every 3dface start.
Definition: dl_creationadapter.h:96
Arc Data.
Definition: dl_entities.h:315
virtual void addRay(const DL_RayData &)
Called for every ray.
Definition: dl_creationadapter.h:54
virtual void addLeaderVertex(const DL_LeaderVertexData &)
Called for every leader vertex.
Definition: dl_creationadapter.h:91
virtual void addPolyline(const DL_PolylineData &)
Called for every polyline start.
Definition: dl_creationadapter.h:60
XLine Data.
Definition: dl_entities.h:255
Trace Data / solid data / 3d face data.
Definition: dl_entities.h:444
Image Data.
Definition: dl_entities.h:1703
virtual void addLayer(const DL_LayerData &)
Called for every layer.
Definition: dl_creationadapter.h:45
Angular Dimension Data (3 points version).
Definition: dl_entities.h:1301
virtual void addText(const DL_TextData &)
Called for every text entity.
Definition: dl_creationadapter.h:72
Ray Data.
Definition: dl_entities.h:284
virtual void addControlPoint(const DL_ControlPointData &)
Called for every spline control point.
Definition: dl_creationadapter.h:64
Insert Data.
Definition: dl_entities.h:669
Spline control point data.
Definition: dl_entities.h:575
virtual void setVariableString(const std::string &key, const std::string &value, int code)=0
Called for every string variable in the DXF file (e.g.
virtual void addPoint(const DL_PointData &)
Called for every point.
Definition: dl_creationadapter.h:51
Leader (arrow).
Definition: dl_entities.h:1393
Layer Data.
Definition: dl_entities.h:36
Angular Dimension Data.
Definition: dl_entities.h:1241
Diametric Dimension Data.
Definition: dl_entities.h:1212
Vertex Data.
Definition: dl_entities.h:416
virtual void setVariableDouble(const std::string &key, double value, int code)=0
Called for every double variable in the DXF file (e.g.
Ellipse Data.
Definition: dl_entities.h:622
virtual void addXDataApp(const std::string &)
Called for every beginning of an XData section of the given application.
Definition: dl_creationadapter.h:110
Block attribute data.
Definition: dl_entities.h:950
Dictionary data.
Definition: dl_entities.h:1793
Image Definition Data.
Definition: dl_entities.h:1769
Hatch boundary path (loop) data.
Definition: dl_entities.h:1511
virtual void addXRecordReal(int, double)
Called for XRecords of type double.
Definition: dl_creationadapter.h:106
Spline Data.
Definition: dl_entities.h:511
virtual void endBlock()
Called to end the current block.
Definition: dl_creationadapter.h:49
virtual void addLinetype(const DL_LinetypeData &)
Called for every linetype.
Definition: dl_creationadapter.h:46
virtual void addEllipse(const DL_EllipseData &)
Called for every ellipse.
Definition: dl_creationadapter.h:58
virtual void addHatch(const DL_HatchData &)
Called for every hatch entity.
Definition: dl_creationadapter.h:93
Arc Aligned Text Data.
Definition: dl_entities.h:870
Leader Vertex Data.
Definition: dl_entities.h:1440