#include <builder.h>
Inheritance diagram for Builder:


Definition at line 28 of file builder.h.
Public Member Functions | |
| Builder (std::string theFname, int theShapefileType, double *theGrpXVals, double *theGrpYVals, std::string *theGrpNames, int theInsertCount, bool theConvertText) | |
| ~Builder () | |
| void | FinalizeAnyPolyline () |
| virtual void | addLayer (const DL_LayerData &data) |
| Called for every layer. | |
| virtual void | addPoint (const DL_PointData &data) |
| Called for every point. | |
| virtual void | addLine (const DL_LineData &data) |
| Called for every line. | |
| virtual void | addPolyline (const DL_PolylineData &data) |
| Called for every polyline start. | |
| virtual void | addArc (const DL_ArcData &data) |
| Called for every arc. | |
| virtual void | addCircle (const DL_CircleData &data) |
| Called for every circle. | |
| virtual void | addVertex (const DL_VertexData &data) |
| Called for every polyline vertex. | |
| virtual void | addBlock (const DL_BlockData &data) |
| Called for every block. | |
| virtual void | endBlock () |
| Called to end the current block. | |
| virtual void | endSequence () |
| Called when a SEQEND occurs (when a POLYLINE or ATTRIB is done). | |
| virtual void | addText (const DL_TextData &data) |
| Called for every Text entity. | |
| void | print_shpObjects () |
| int | textObjectsSize () |
| std::string | outputShp () |
| std::string | outputTShp () |
Private Attributes | |
| std::string | fname |
| int | shapefileType |
| double * | grpXVals |
| double * | grpYVals |
| std::string * | grpNames |
| int | insertCount |
| bool | convertText |
| std::string | outputdbf |
| std::string | outputshp |
| std::string | outputtdbf |
| std::string | outputtshp |
| std::vector< DL_VertexData > | polyVertex |
| std::vector< SHPObject * > | shpObjects |
| std::vector< DL_TextData > | textObjects |
| int | numlayers |
| int | numpoints |
| int | numlines |
| int | numplines |
| int | fetchedprims |
| int | fetchedtexts |
| bool | ignoringBlock |
| bool | current_polyline_willclose |
| bool | store_next_vertex_for_polyline_close |
| int | awaiting_polyline_vertices |
| long | current_polyline_pointcount |
| SHPObject * | currently_Adding_PolyLine |
| double | closePolyX |
| double | closePolyY |
| double | closePolyZ |
| double | currentBlockX |
| double | currentBlockY |
| Builder::Builder | ( | std::string | theFname, | |
| int | theShapefileType, | |||
| double * | theGrpXVals, | |||
| double * | theGrpYVals, | |||
| std::string * | theGrpNames, | |||
| int | theInsertCount, | |||
| bool | theConvertText | |||
| ) |
Definition at line 30 of file builder.cpp.
| Builder::~Builder | ( | ) |
| void Builder::FinalizeAnyPolyline | ( | ) |
Definition at line 464 of file builder.cpp.
References closePolyX, closePolyY, closePolyZ, current_polyline_pointcount, current_polyline_willclose, fetchedprims, polyVertex, QgsDebugMsg, shapefileType, SHPCreateObject(), shpObjects, DL_VertexData::x, DL_VertexData::y, and DL_VertexData::z.
Referenced by endBlock().
| void Builder::addLayer | ( | const DL_LayerData & | data | ) | [virtual] |
Called for every layer.
Reimplemented from DL_CreationAdapter.
Definition at line 109 of file builder.cpp.
References DL_LayerData::name, and QgsDebugMsg.
| void Builder::addPoint | ( | const DL_PointData & | data | ) | [virtual] |
Called for every point.
Reimplemented from DL_CreationAdapter.
Definition at line 114 of file builder.cpp.
References currentBlockX, currentBlockY, fetchedprims, ignoringBlock, QgsDebugMsg, shapefileType, SHPCreateObject(), shpObjects, SHPT_POINT, DL_PointData::x, DL_PointData::y, and DL_PointData::z.
| void Builder::addLine | ( | const DL_LineData & | data | ) | [virtual] |
Called for every line.
Reimplemented from DL_CreationAdapter.
Definition at line 143 of file builder.cpp.
References currentBlockX, currentBlockY, fetchedprims, ignoringBlock, QgsDebugMsg, shapefileType, SHPCreateObject(), shpObjects, SHPT_ARC, DL_LineData::x1, DL_LineData::x2, DL_LineData::y1, DL_LineData::y2, DL_LineData::z1, and DL_LineData::z2.
| void Builder::addPolyline | ( | const DL_PolylineData & | data | ) | [virtual] |
Called for every polyline start.
Reimplemented from DL_CreationAdapter.
Definition at line 184 of file builder.cpp.
References closePolyX, closePolyY, closePolyZ, current_polyline_pointcount, current_polyline_willclose, fetchedprims, DL_PolylineData::flags, ignoringBlock, polyVertex, QgsDebugMsg, shapefileType, SHPCreateObject(), shpObjects, SHPT_ARC, SHPT_POLYGON, store_next_vertex_for_polyline_close, DL_VertexData::x, DL_VertexData::y, and DL_VertexData::z.
| void Builder::addArc | ( | const DL_ArcData & | data | ) | [virtual] |
Called for every arc.
Reimplemented from DL_CreationAdapter.
Definition at line 305 of file builder.cpp.
References DL_ArcData::angle1, DL_ArcData::angle2, currentBlockX, currentBlockY, DL_ArcData::cx, DL_ArcData::cy, DL_ArcData::cz, fetchedprims, ignoringBlock, M_PI, QgsDebugMsg, DL_ArcData::radius, shapefileType, SHPCreateObject(), shpObjects, SHPT_ARC, DL_PointData::x, DL_PointData::y, and DL_PointData::z.
| void Builder::addCircle | ( | const DL_CircleData & | data | ) | [virtual] |
Called for every circle.
Reimplemented from DL_CreationAdapter.
Definition at line 388 of file builder.cpp.
References currentBlockX, currentBlockY, DL_CircleData::cx, DL_CircleData::cy, DL_CircleData::cz, fetchedprims, ignoringBlock, M_PI, QgsDebugMsg, DL_CircleData::radius, shapefileType, SHPCreateObject(), shpObjects, SHPT_ARC, SHPT_POLYGON, DL_PointData::x, DL_PointData::y, and DL_PointData::z.
| void Builder::addVertex | ( | const DL_VertexData & | data | ) | [virtual] |
Called for every polyline vertex.
Reimplemented from DL_CreationAdapter.
Definition at line 265 of file builder.cpp.
References closePolyX, closePolyY, closePolyZ, current_polyline_pointcount, currentBlockX, currentBlockY, ignoringBlock, polyVertex, QgsDebugMsg, shapefileType, SHPT_ARC, SHPT_POLYGON, store_next_vertex_for_polyline_close, DL_VertexData::x, DL_VertexData::y, and DL_VertexData::z.
| void Builder::addBlock | ( | const DL_BlockData & | data | ) | [virtual] |
Called for every block.
Note: all entities added after this command go into this block until endBlock() is called.
Reimplemented from DL_CreationAdapter.
Definition at line 75 of file builder.cpp.
References currentBlockX, currentBlockY, grpNames, grpXVals, grpYVals, ignoringBlock, insertCount, DL_BlockData::name, and QgsDebugMsg.
| void Builder::endBlock | ( | ) | [virtual] |
Called to end the current block.
Reimplemented from DL_CreationAdapter.
Definition at line 98 of file builder.cpp.
References currentBlockX, currentBlockY, FinalizeAnyPolyline(), ignoringBlock, and QgsDebugMsg.
| void Builder::endSequence | ( | ) | [virtual] |
Called when a SEQEND occurs (when a POLYLINE or ATTRIB is done).
Reimplemented from DL_CreationAdapter.
Definition at line 300 of file builder.cpp.
References QgsDebugMsg.
| void Builder::addText | ( | const DL_TextData & | data | ) | [virtual] |
Called for every Text entity.
Reimplemented from DL_CreationAdapter.
Definition at line 445 of file builder.cpp.
References DL_TextData::angle, DL_TextData::apx, DL_TextData::apy, DL_TextData::apz, convertText, currentBlockX, currentBlockY, fetchedtexts, DL_TextData::height, DL_TextData::hJustification, DL_TextData::ipx, DL_TextData::ipy, DL_TextData::ipz, QgsDebugMsg, DL_TextData::style, DL_TextData::text, DL_TextData::textGenerationFlags, textObjects, DL_TextData::vJustification, and DL_TextData::xScaleFactor.
| void Builder::print_shpObjects | ( | ) |
Definition at line 509 of file builder.cpp.
References MathUtils::angle(), convertText, DBFAddField(), DBFClose(), DBFCreate(), DBFWriteDoubleAttribute(), DBFWriteIntegerAttribute(), DBFWriteStringAttribute(), fname, FTDouble, FTInteger, FTString, outputdbf, outputshp, outputtdbf, outputtshp, QgsDebugMsg, shapefileType, SHPClose(), SHPCreate(), SHPCreateObject(), SHPDestroyObject(), shpObjects, SHPT_POINT, and textObjects.
Referenced by dxf2shpConverterGui::on_buttonBox_accepted().
| int Builder::textObjectsSize | ( | ) |
Definition at line 60 of file builder.cpp.
References textObjects.
Referenced by dxf2shpConverterGui::on_buttonBox_accepted().
| std::string Builder::outputShp | ( | ) |
Definition at line 65 of file builder.cpp.
References outputshp.
Referenced by dxf2shpConverterGui::on_buttonBox_accepted().
| std::string Builder::outputTShp | ( | ) |
Definition at line 70 of file builder.cpp.
References outputtshp.
Referenced by dxf2shpConverterGui::on_buttonBox_accepted().
std::string Builder::fname [private] |
int Builder::shapefileType [private] |
Definition at line 61 of file builder.h.
Referenced by addArc(), addCircle(), addLine(), addPoint(), addPolyline(), addVertex(), FinalizeAnyPolyline(), and print_shpObjects().
double* Builder::grpXVals [private] |
double* Builder::grpYVals [private] |
std::string* Builder::grpNames [private] |
int Builder::insertCount [private] |
bool Builder::convertText [private] |
std::string Builder::outputdbf [private] |
std::string Builder::outputshp [private] |
std::string Builder::outputtdbf [private] |
std::string Builder::outputtshp [private] |
std::vector<DL_VertexData> Builder::polyVertex [private] |
Definition at line 73 of file builder.h.
Referenced by addPolyline(), addVertex(), FinalizeAnyPolyline(), and ~Builder().
std::vector<SHPObject *> Builder::shpObjects [private] |
Definition at line 74 of file builder.h.
Referenced by addArc(), addCircle(), addLine(), addPoint(), addPolyline(), FinalizeAnyPolyline(), print_shpObjects(), and ~Builder().
std::vector<DL_TextData> Builder::textObjects [private] |
Definition at line 75 of file builder.h.
Referenced by addText(), print_shpObjects(), textObjectsSize(), and ~Builder().
int Builder::numlayers [private] |
int Builder::numpoints [private] |
int Builder::numlines [private] |
int Builder::numplines [private] |
int Builder::fetchedprims [private] |
Definition at line 82 of file builder.h.
Referenced by addArc(), addCircle(), addLine(), addPoint(), addPolyline(), and FinalizeAnyPolyline().
int Builder::fetchedtexts [private] |
bool Builder::ignoringBlock [private] |
Definition at line 85 of file builder.h.
Referenced by addArc(), addBlock(), addCircle(), addLine(), addPoint(), addPolyline(), addVertex(), and endBlock().
bool Builder::current_polyline_willclose [private] |
bool Builder::store_next_vertex_for_polyline_close [private] |
int Builder::awaiting_polyline_vertices [private] |
long Builder::current_polyline_pointcount [private] |
Definition at line 90 of file builder.h.
Referenced by addPolyline(), addVertex(), and FinalizeAnyPolyline().
SHPObject* Builder::currently_Adding_PolyLine [private] |
double Builder::closePolyX [private] |
Definition at line 95 of file builder.h.
Referenced by addPolyline(), addVertex(), and FinalizeAnyPolyline().
double Builder::closePolyY [private] |
Definition at line 95 of file builder.h.
Referenced by addPolyline(), addVertex(), and FinalizeAnyPolyline().
double Builder::closePolyZ [private] |
Definition at line 95 of file builder.h.
Referenced by addPolyline(), addVertex(), and FinalizeAnyPolyline().
double Builder::currentBlockX [private] |
Definition at line 96 of file builder.h.
Referenced by addArc(), addBlock(), addCircle(), addLine(), addPoint(), addText(), addVertex(), and endBlock().
double Builder::currentBlockY [private] |
Definition at line 96 of file builder.h.
Referenced by addArc(), addBlock(), addCircle(), addLine(), addPoint(), addText(), addVertex(), and endBlock().
1.5.1