This file is indexed.

/usr/include/dxflib/dl_creationinterface.h is in libdxflib-dev 3.17.0-2.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
/****************************************************************************
** Copyright (C) 2001-2013 RibbonSoft, GmbH. All rights reserved.
**
** This file is part of the dxflib project.
**
** This file is free software; you can redistribute it and/or modify
** it under the terms of the GNU General Public License as published by
** the Free Software Foundation; either version 2 of the License, or
** (at your option) any later version.
**
** Licensees holding valid dxflib Professional Edition licenses may use 
** this file in accordance with the dxflib Commercial License
** Agreement provided with the Software.
**
** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
**
** See http://www.ribbonsoft.com for further details.
**
** Contact info@ribbonsoft.com if any conditions of this licensing are
** not clear to you.
**
**********************************************************************/

#ifndef DL_CREATIONINTERFACE_H
#define DL_CREATIONINTERFACE_H

#include "dl_global.h"

#include <string.h>

#include "dl_attributes.h"
#include "dl_codes.h"
#include "dl_entities.h"
#include "dl_extrusion.h"

/**
 * Abstract class (interface) for the creation of new entities.
 * Inherit your class which takes care of the entities in the 
 * processed DXF file from this interface. 
 *
 * Double arrays passed to your implementation contain 3 double 
 * values for x, y, z coordinates unless stated differently.
 *
 * @author Andrew Mustun
 */
class DXFLIB_EXPORT DL_CreationInterface {
public:
    DL_CreationInterface() {
        extrusion = new DL_Extrusion;
    }
    virtual ~DL_CreationInterface() {
        delete extrusion;
    }

    /**
     * Called for every code / value tuple of the DXF file. The complete DXF file
     * contents can be handled by the implemetation of this function.
     */
    virtual void processCodeValuePair(unsigned int groupCode, const std::string& groupValue) = 0;

    /**
     * Called when a section (entity, table entry, etc.) is finished.
     */
    virtual void endSection() = 0;

    /**
     * Called for every layer.
     */
    virtual void addLayer(const DL_LayerData& data) = 0;

    /**
     * Called for every linetype.
     */
    virtual void addLinetype(const DL_LinetypeData& data) = 0;

    /**
      * Called for every dash in linetype pattern
      */
    virtual void addLinetypeDash(double length) = 0;

    /**
     * Called for every block. Note: all entities added after this
     * command go into this block until endBlock() is called.
    *
     * @see endBlock()
     */
    virtual void addBlock(const DL_BlockData& data) = 0;

    /** Called to end the current block */
    virtual void endBlock() = 0;

    /** Called for every text style */
    virtual void addTextStyle(const DL_StyleData& data) = 0;

    /** Called for every point */
    virtual void addPoint(const DL_PointData& data) = 0;

    /** Called for every line */
    virtual void addLine(const DL_LineData& data) = 0;

    /** Called for every xline */
    virtual void addXLine(const DL_XLineData& data) = 0;

    /** Called for every ray */
    virtual void addRay(const DL_RayData& data) = 0;

    /** Called for every arc */
    virtual void addArc(const DL_ArcData& data) = 0;

    /** Called for every circle */
    virtual void addCircle(const DL_CircleData& data) = 0;

    /** Called for every ellipse */
    virtual void addEllipse(const DL_EllipseData& data) = 0;

    /** Called for every polyline start */
    virtual void addPolyline(const DL_PolylineData& data) = 0;

    /** Called for every polyline vertex */
    virtual void addVertex(const DL_VertexData& data) = 0;
    
    /** Called for every spline */
    virtual void addSpline(const DL_SplineData& data) = 0;
    
    /** Called for every spline control point */
    virtual void addControlPoint(const DL_ControlPointData& data) = 0;

    /** Called for every spline fit point */
    virtual void addFitPoint(const DL_FitPointData& data) = 0;
    
    /** Called for every spline knot value */
    virtual void addKnot(const DL_KnotData& data) = 0;

    /** Called for every insert. */
    virtual void addInsert(const DL_InsertData& data) = 0;
    
    /** Called for every trace start */
    virtual void addTrace(const DL_TraceData& data) = 0;
    
    /** Called for every 3dface start */
    virtual void add3dFace(const DL_3dFaceData& data) = 0;

    /** Called for every solid start */
    virtual void addSolid(const DL_SolidData& data) = 0;


    /** Called for every multi Text entity. */
    virtual void addMText(const DL_MTextData& data) = 0;

    /**
     * Called for additional text chunks for MTEXT entities.
     * The chunks come at 250 character in size each. Note that 
     * those chunks come <b>before</b> the actual MTEXT entity.
     */
    virtual void addMTextChunk(const std::string& text) = 0;

    /** Called for every text entity. */
    virtual void addText(const DL_TextData& data) = 0;

    /** Called for every arc aligned text entity. */
    virtual void addArcAlignedText(const DL_ArcAlignedTextData& data) = 0;

    /** Called for every block Attribute entity. */
    virtual void addAttribute(const DL_AttributeData& data) = 0;

    /**
     * Called for every aligned dimension entity. 
     */
    virtual void addDimAlign(const DL_DimensionData& data,
                             const DL_DimAlignedData& edata) = 0;
    /**
     * Called for every linear or rotated dimension entity. 
     */
    virtual void addDimLinear(const DL_DimensionData& data,
                              const DL_DimLinearData& edata) = 0;

    /**
     * Called for every radial dimension entity. 
     */
    virtual void addDimRadial(const DL_DimensionData& data,
                              const DL_DimRadialData& edata) = 0;

    /**
     * Called for every diametric dimension entity. 
     */
    virtual void addDimDiametric(const DL_DimensionData& data,
                              const DL_DimDiametricData& edata) = 0;

    /**
     * Called for every angular dimension (2 lines version) entity. 
     */
    virtual void addDimAngular(const DL_DimensionData& data,
                              const DL_DimAngularData& edata) = 0;

    /**
     * Called for every angular dimension (3 points version) entity. 
     */
    virtual void addDimAngular3P(const DL_DimensionData& data,
                              const DL_DimAngular3PData& edata) = 0;
    
    /**
     * Called for every ordinate dimension entity. 
     */
    virtual void addDimOrdinate(const DL_DimensionData& data,
                             const DL_DimOrdinateData& edata) = 0;
    
    /** 
     * Called for every leader start. 
     */
    virtual void addLeader(const DL_LeaderData& data) = 0;
    
    /** 
     * Called for every leader vertex 
     */
    virtual void addLeaderVertex(const DL_LeaderVertexData& data) = 0;
    
    /** 
     * Called for every hatch entity. 
     */
    virtual void addHatch(const DL_HatchData& data) = 0;
    
    /** 
     * Called for every image entity. 
     */
    virtual void addImage(const DL_ImageData& data) = 0;

    /**
     * Called for every image definition.
     */
    virtual void linkImage(const DL_ImageDefData& data) = 0;

    /** 
     * Called for every hatch loop. 
     */
    virtual void addHatchLoop(const DL_HatchLoopData& data) = 0;

    /** 
     * Called for every hatch edge entity. 
     */
    virtual void addHatchEdge(const DL_HatchEdgeData& data) = 0;

    /**
     * Called for every XRecord with the given handle.
     */
    virtual void addXRecord(const std::string& handle) = 0;

    /**
     * Called for XRecords of type string.
     */
    virtual void addXRecordString(int code, const std::string& value) = 0;

    /**
     * Called for XRecords of type double.
     */
    virtual void addXRecordReal(int code, double value) = 0;

    /**
     * Called for XRecords of type int.
     */
    virtual void addXRecordInt(int code, int value) = 0;

    /**
     * Called for XRecords of type bool.
     */
    virtual void addXRecordBool(int code, bool value) = 0;

    /**
     * Called for every beginning of an XData section of the given application.
     */
    virtual void addXDataApp(const std::string& appId) = 0;

    /**
     * Called for XData tuples.
     */
    virtual void addXDataString(int code, const std::string& value) = 0;

    /**
     * Called for XData tuples.
     */
    virtual void addXDataReal(int code, double value) = 0;

    /**
     * Called for XData tuples.
     */
    virtual void addXDataInt(int code, int value) = 0;

    /**
     * Called for dictionary objects.
     */
    virtual void addDictionary(const DL_DictionaryData& data) = 0;

    /**
     * Called for dictionary entries.
     */
    virtual void addDictionaryEntry(const DL_DictionaryEntryData& data) = 0;

    /** 
     * Called after an entity has been completed.  
     */
    virtual void endEntity() = 0;
    
    /**
     * Called for every comment in the DXF file (code 999).
     */
    virtual void addComment(const std::string& comment) = 0;

    /**
     * Called for every vector variable in the DXF file (e.g. "$EXTMIN").
     */
    virtual void setVariableVector(const std::string& key,  double v1, double v2, double v3, int code) = 0;
    
    /**
     * Called for every string variable in the DXF file (e.g. "$ACADVER").
     */
    virtual void setVariableString(const std::string& key, const std::string& value, int code) = 0;
    
    /**
     * Called for every int variable in the DXF file (e.g. "$ACADMAINTVER").
     */
    virtual void setVariableInt(const std::string& key, int value, int code) = 0;
    
    /**
     * Called for every double variable in the DXF file (e.g. "$DIMEXO").
     */
    virtual void setVariableDouble(const std::string& key, double value, int code) = 0;

#ifdef DL_COMPAT
    virtual void setVariableVector(const char* key,  double v1, double v2, double v3, int code) = 0;
    virtual void setVariableString(const char* key, const char* value, int code) = 0;
    virtual void setVariableInt(const char* key, int value, int code) = 0;
    virtual void setVariableDouble(const char* key, double value, int code) = 0;
    virtual void processCodeValuePair(unsigned int groupCode, char* groupValue) = 0;
    virtual void addComment(const char* comment) = 0;
    virtual void addMTextChunk(const char* text) = 0;
#endif
    
     /**
      * Called when a SEQEND occurs (when a POLYLINE or ATTRIB is done)
      */
    virtual void endSequence() = 0;

    /** Sets the current attributes for entities. */
    void setAttributes(const DL_Attributes& attrib) {
        attributes = attrib;
    }

    /** @return the current attributes used for new entities. */
    DL_Attributes getAttributes() {
        return attributes;
    }

    /** Sets the current attributes for entities. */
    void setExtrusion(double dx, double dy, double dz, double elevation) {
        extrusion->setDirection(dx, dy, dz);
        extrusion->setElevation(elevation);
    }

    /** @return the current attributes used for new entities. */
    DL_Extrusion* getExtrusion() {
        return extrusion;
    }

protected:
    DL_Attributes attributes;
    DL_Extrusion *extrusion;
};

#endif