CSailDxfWriter Class Reference

#include <sailwriter-dxf.h>

Inheritance diagram for CSailDxfWriter:

CFileWriter< CPanelGroup > CSailDxfWriter2d CSailDxfWriter3d

List of all members.

Public Member Functions

 CSailDxfWriter ()
void writeBegin (ofstream &out, const QString &filename) const
void writeEnd (ofstream &out) const
void writeAtom (ofstream &out, int code, const QString &content) const
void writeFace (ofstream &out, CPoint3d p0, CPoint3d p1, CPoint3d p2, unsigned int layer) const
void writeLayer (ofstream &out, unsigned int layer, const QString &color) const
void writePolyline (ofstream &out, unsigned int layer, const QString &color) const
void writeVertex (ofstream &out, CPoint3d p0, unsigned int layer) const


Detailed Description

An abstract class containing the methods needed for DXF writing.

Definition at line 30 of file sailwriter-dxf.h.


Constructor & Destructor Documentation

CSailDxfWriter::CSailDxfWriter (  )  [inline]

The constructor.

Definition at line 35 of file sailwriter-dxf.h.


Member Function Documentation

void CSailDxfWriter::writeBegin ( ofstream &  out,
const QString &  filename 
) const

Open the given file, then write comment and header section.

Parameters:
out the output stream
filename the output file name

Definition at line 66 of file sailwriter-dxf.cpp.

References writeAtom().

Referenced by CSailDxfWriter2d::writeBlocks(), CSailDxfWriter3d::writeNormal(), CSailDxfWriter2d::writeNormal(), CSailDxfWriter3d::writeSplit(), and CSailDxfWriter2d::writeSplit().

void CSailDxfWriter::writeEnd ( ofstream &  out  )  const

Write end of file then close file.

Parameters:
out the output stream

Definition at line 86 of file sailwriter-dxf.cpp.

References writeAtom().

Referenced by CSailDxfWriter2d::writeBlocks(), CSailDxfWriter3d::writeNormal(), CSailDxfWriter2d::writeNormal(), CSailDxfWriter3d::writeSplit(), and CSailDxfWriter2d::writeSplit().

void CSailDxfWriter::writeAtom ( ofstream &  out,
int  code,
const QString &  content 
) const

Write a DXF atom to the file output stream.

Parameters:
out the output stream
code atom code
content atom content

Definition at line 55 of file sailwriter-dxf.cpp.

Referenced by writeBegin(), CSailDxfWriter2d::writeBlocks(), writeEnd(), writeFace(), writeLayer(), CSailDxfWriter3d::writeNormal(), CSailDxfWriter2d::writeNormal(), CSailDxfWriter2d::writePanel(), writePolyline(), CSailDxfWriter3d::writeSplit(), CSailDxfWriter2d::writeSplit(), and writeVertex().

void CSailDxfWriter::writeFace ( ofstream &  out,
CPoint3d  p0,
CPoint3d  p1,
CPoint3d  p2,
unsigned int  layer 
) const

Write a triangular face to the file output stream.

Parameters:
out the output stream
p0 first point
p1 second point
p2 third point
layer 

Definition at line 101 of file sailwriter-dxf.cpp.

References writeAtom(), CVector3d::x(), CVector3d::y(), and CVector3d::z().

Referenced by CSailDxfWriter3d::writePanel().

void CSailDxfWriter::writeLayer ( ofstream &  out,
unsigned int  layer,
const QString &  color 
) const

Write a DXF layer to the file output stream.

Parameters:
out the output stream
layer 
color the color

Definition at line 141 of file sailwriter-dxf.cpp.

References writeAtom().

Referenced by CSailDxfWriter2d::writeBlocks(), CSailDxfWriter3d::writeNormal(), CSailDxfWriter2d::writeNormal(), CSailDxfWriter3d::writeSplit(), and CSailDxfWriter2d::writeSplit().

void CSailDxfWriter::writePolyline ( ofstream &  out,
unsigned int  layer,
const QString &  color 
) const

Write a DXF Polyline header to the file output stream.

Parameters:
out the output stream
layer 
color the color

Definition at line 157 of file sailwriter-dxf.cpp.

References writeAtom().

Referenced by CSailDxfWriter2d::writePanel().

void CSailDxfWriter::writeVertex ( ofstream &  out,
CPoint3d  pt,
unsigned int  layer 
) const

Write a 2D DXF Vertex to the file output stream.

Parameters:
out the output stream
pt point
layer 

Definition at line 177 of file sailwriter-dxf.cpp.

References writeAtom(), CVector3d::x(), and CVector3d::y().

Referenced by CSailDxfWriter2d::writePanel().


The documentation for this class was generated from the following files:

Generated on Sun Mar 22 21:38:32 2009 for Sailcut CAD by  doxygen 1.5.6