Open Source 2D CAD
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
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 **********************************************************************/
28 #include "dl_global.h"
30 #include "dl_creationinterface.h"
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&) {}
56  virtual void addArc(const DL_ArcData&) {}
57  virtual void addCircle(const DL_CircleData&) {}
58  virtual void addEllipse(const DL_EllipseData&) {}
60  virtual void addPolyline(const DL_PolylineData&) {}
61  virtual void addVertex(const DL_VertexData&) {}
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&) {}
68  virtual void addInsert(const DL_InsertData&) {}
70  virtual void addMText(const DL_MTextData&) {}
71  virtual void addMTextChunk(const std::string&) {}
72  virtual void addText(const DL_TextData&) {}
73  virtual void addAttribute(const DL_AttributeData&) {}
75  virtual void addDimAlign(const DL_DimensionData&,
76  const DL_DimAlignedData&) {}
77  virtual void addDimLinear(const DL_DimensionData&,
78  const DL_DimLinearData&) {}
79  virtual void addDimRadial(const DL_DimensionData&,
80  const DL_DimRadialData&) {}
81  virtual void addDimDiametric(const DL_DimensionData&,
82  const DL_DimDiametricData&) {}
83  virtual void addDimAngular(const DL_DimensionData&,
84  const DL_DimAngularData&) {}
85  virtual void addDimAngular3P(const DL_DimensionData&,
86  const DL_DimAngular3PData&) {}
87  virtual void addDimOrdinate(const DL_DimensionData&,
88  const DL_DimOrdinateData&) {}
89  virtual void addLeader(const DL_LeaderData&) {}
90  virtual void addLeaderVertex(const DL_LeaderVertexData&) {}
92  virtual void addHatch(const DL_HatchData&) {}
94  virtual void addTrace(const DL_TraceData&) {}
95  virtual void add3dFace(const DL_3dFaceData&) {}
96  virtual void addSolid(const DL_SolidData&) {}
98  virtual void addImage(const DL_ImageData&) {}
99  virtual void linkImage(const DL_ImageDefData&) {}
100  virtual void addHatchLoop(const DL_HatchLoopData&) {}
101  virtual void addHatchEdge(const DL_HatchEdgeData&) {}
103  virtual void addXRecord(const std::string&) {}
104  virtual void addXRecordString(int, const std::string&) {}
105  virtual void addXRecordReal(int, double) {}
106  virtual void addXRecordInt(int, int) {}
107  virtual void addXRecordBool(int, bool) {}
109  virtual void addXDataApp(const std::string&) {}
110  virtual void addXDataString(int, const std::string&) {}
111  virtual void addXDataReal(int, double) {}
112  virtual void addXDataInt(int, int) {}
114  virtual void addDictionary(const DL_DictionaryData&) {}
117  virtual void endEntity() {}
119  virtual void addComment(const std::string&) {}
121  virtual void setVariableVector(const std::string&, double, double, double, int) {}
122  virtual void setVariableString(const std::string&, const std::string&, int) {}
123  virtual void setVariableInt(const std::string&, int, int) {}
124  virtual void setVariableDouble(const std::string&, double, int) {}
125 #ifdef DL_COMPAT
126  virtual void setVariableVector(const char*, double, double, double, int) {}
127  virtual void setVariableString(const char*, const char*, int) {}
128  virtual void setVariableInt(const char*, int, int) {}
129  virtual void setVariableDouble(const char*, double, int) {}
130  virtual void processCodeValuePair(unsigned int, char*) {}
131  virtual void addComment(const char*) {}
132  virtual void addMTextChunk(const char*) {}
133 #endif
134  virtual void endSequence() {}
135 };
137 #endif
Definition: dl_creationadapter.h:41
virtual void addTrace(const DL_TraceData &)
Called for every trace start.
Definition: dl_creationadapter.h:94
virtual void addAttribute(const DL_AttributeData &)
Called for every Block Attribute entity.
Definition: dl_creationadapter.h:73
Dictionary entry data.
Definition: dl_entities.h:1723
virtual void addComment(const std::string &)
Called for every comment in the DXF file (code 999).
Definition: dl_creationadapter.h:119
virtual void addDimAngular(const DL_DimensionData &, const DL_DimAngularData &)
Called for every angular dimension (2 lines version) entity.
Definition: dl_creationadapter.h:83
Radial Dimension Data.
Definition: dl_entities.h:1103
Hatch data.
Definition: dl_entities.h:1384
virtual void addXRecord(const std::string &)
Called for every XRecord with the given handle.
Definition: dl_creationadapter.h:103
Generic Dimension Data.
Definition: dl_entities.h:910
virtual void addImage(const DL_ImageData &)
Called for every image entity.
Definition: dl_creationadapter.h:98
virtual void addVertex(const DL_VertexData &)
Called for every polyline vertex.
Definition: dl_creationadapter.h:61
Ordinate Dimension Data.
Definition: dl_entities.h:1270
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:77
virtual void addDictionaryEntry(const DL_DictionaryEntryData &)
Called for dictionary entries.
Definition: dl_creationadapter.h:115
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:111
virtual void addXRecordInt(int, int)
Called for XRecords of type int.
Definition: dl_creationadapter.h:106
virtual void addSolid(const DL_SolidData &)
Called for every solid start.
Definition: dl_creationadapter.h:96
Aligned Dimension Data.
Definition: dl_entities.h:1020
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:121
virtual void addDimDiametric(const DL_DimensionData &, const DL_DimDiametricData &)
Called for every diametric dimension entity.
Definition: dl_creationadapter.h:81
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:75
Circle Data.
Definition: dl_entities.h:351
virtual void endEntity()
Called after an entity has been completed.
Definition: dl_creationadapter.h:117
virtual void addSpline(const DL_SplineData &)
Called for every spline.
Definition: dl_creationadapter.h:63
Text Data.
Definition: dl_entities.h:799
virtual void addXRecordString(int, const std::string &)
Called for XRecords of type string.
Definition: dl_creationadapter.h:104
Line Data.
Definition: dl_entities.h:220
virtual void addXDataString(int, const std::string &)
Called for XData tuples.
Definition: dl_creationadapter.h:110
virtual void addHatchLoop(const DL_HatchLoopData &)
Called for every hatch loop.
Definition: dl_creationadapter.h:100
Text style data.
Definition: dl_entities.h:129
Linear (rotated) Dimension Data.
Definition: dl_entities.h:1057
virtual void addLeader(const DL_LeaderData &)
Called for every leader start.
Definition: dl_creationadapter.h:89
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:85
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:555
virtual void endSection()
Called when a section (entity, table entry, etc.) is finished.
Definition: dl_creationadapter.h:44
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:112
virtual void setVariableDouble(const std::string &, double, int)
Called for every double variable in the DXF file (e.g.
Definition: dl_creationadapter.h:124
virtual void addDimOrdinate(const DL_DimensionData &, const DL_DimOrdinateData &)
Called for every ordinate dimension entity.
Definition: dl_creationadapter.h:87
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:122
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:107
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:99
virtual void setVariableInt(const std::string &, int, int)
Called for every int variable in the DXF file (e.g.
Definition: dl_creationadapter.h:123
Hatch edge data.
Definition: dl_entities.h:1453
Spline fit point data.
Definition: dl_entities.h:601
Polyline Data.
Definition: dl_entities.h:381
Point Data.
Definition: dl_entities.h:196
virtual void addDimRadial(const DL_DimensionData &, const DL_DimRadialData &)
Called for every radial dimension entity.
Definition: dl_creationadapter.h:79
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:89
virtual void endSequence()
Called when a SEQEND occurs (when a POLYLINE or ATTRIB is done)
Definition: dl_creationadapter.h:134
virtual ~DL_CreationAdapter()
Definition: dl_creationadapter.h:42
Block Data.
Definition: dl_entities.h:58
MText Data.
Definition: dl_entities.h:718
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:114
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:101
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:95
Arc Data.
Definition: dl_entities.h:314
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:90
virtual void addPolyline(const DL_PolylineData &)
Called for every polyline start.
Definition: dl_creationadapter.h:60
XLine Data.
Definition: dl_entities.h:254
Trace Data / solid data / 3d face data.
Definition: dl_entities.h:443
Image Data.
Definition: dl_entities.h:1623
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:1221
virtual void addText(const DL_TextData &)
Called for every Text entity.
Definition: dl_creationadapter.h:72
Ray Data.
Definition: dl_entities.h:283
virtual void addControlPoint(const DL_ControlPointData &)
Called for every spline control point.
Definition: dl_creationadapter.h:64
Insert Data.
Definition: dl_entities.h:668
Spline control point data.
Definition: dl_entities.h:574
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:1313
Layer Data.
Definition: dl_entities.h:36
Angular Dimension Data.
Definition: dl_entities.h:1161
Diametric Dimension Data.
Definition: dl_entities.h:1132
Vertex Data.
Definition: dl_entities.h:415
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:621
virtual void addXDataApp(const std::string &)
Called for every beginning of an XData section of the given application.
Definition: dl_creationadapter.h:109
Block attribute data.
Definition: dl_entities.h:870
Dictionary data.
Definition: dl_entities.h:1713
Image Definition Data.
Definition: dl_entities.h:1689
Hatch boundary path (loop) data.
Definition: dl_entities.h:1431
virtual void addXRecordReal(int, double)
Called for XRecords of type double.
Definition: dl_creationadapter.h:105
Spline Data.
Definition: dl_entities.h:510
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:92
Leader Vertex Data.
Definition: dl_entities.h:1360