Builder Class Reference

#include <builder.h>

Inheritance diagram for Builder:

Inheritance graph
[legend]
Collaboration diagram for Builder:

Collaboration graph
[legend]
List of all members.

Detailed Description

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_VertexDatapolyVertex
std::vector< SHPObject * > shpObjects
std::vector< DL_TextDatatextObjects
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
SHPObjectcurrently_Adding_PolyLine
double closePolyX
double closePolyY
double closePolyZ
double currentBlockX
double currentBlockY


Constructor & Destructor Documentation

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 (  ) 

Definition at line 53 of file builder.cpp.

References polyVertex, shpObjects, and textObjects.


Member Function Documentation

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.

See also:
endBlock()

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().


Member Data Documentation

std::string Builder::fname [private]

Definition at line 60 of file builder.h.

Referenced by print_shpObjects().

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]

Definition at line 62 of file builder.h.

Referenced by addBlock().

double* Builder::grpYVals [private]

Definition at line 63 of file builder.h.

Referenced by addBlock().

std::string* Builder::grpNames [private]

Definition at line 64 of file builder.h.

Referenced by addBlock().

int Builder::insertCount [private]

Definition at line 65 of file builder.h.

Referenced by addBlock().

bool Builder::convertText [private]

Definition at line 66 of file builder.h.

Referenced by addText(), and print_shpObjects().

std::string Builder::outputdbf [private]

Definition at line 68 of file builder.h.

Referenced by print_shpObjects().

std::string Builder::outputshp [private]

Definition at line 69 of file builder.h.

Referenced by outputShp(), and print_shpObjects().

std::string Builder::outputtdbf [private]

Definition at line 70 of file builder.h.

Referenced by print_shpObjects().

std::string Builder::outputtshp [private]

Definition at line 71 of file builder.h.

Referenced by outputTShp(), and print_shpObjects().

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]

Definition at line 77 of file builder.h.

int Builder::numpoints [private]

Definition at line 78 of file builder.h.

int Builder::numlines [private]

Definition at line 79 of file builder.h.

int Builder::numplines [private]

Definition at line 80 of file builder.h.

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]

Definition at line 83 of file builder.h.

Referenced by addText().

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]

Definition at line 86 of file builder.h.

Referenced by addPolyline(), and FinalizeAnyPolyline().

bool Builder::store_next_vertex_for_polyline_close [private]

Definition at line 87 of file builder.h.

Referenced by addPolyline(), and addVertex().

int Builder::awaiting_polyline_vertices [private]

Definition at line 89 of file builder.h.

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]

Definition at line 92 of file builder.h.

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().


The documentation for this class was generated from the following files:
Generated on Tue Oct 28 16:51:52 2008 for Quantum GIS API Documentation by  doxygen 1.5.1