ACloudViewer  3.9.4
A Modern Library for 3D Data Processing
DL_WriterA Class Reference

#include <dl_writer_ascii.h>

Inheritance diagram for DL_WriterA:
Collaboration diagram for DL_WriterA:

Public Member Functions

 DL_WriterA (const char *fname, DL_Codes::version version=DL_Codes::AC1015)
 
virtual ~DL_WriterA ()
 
bool openFailed () const
 
void close () const
 
void dxfReal (int gc, double value) const
 
void dxfInt (int gc, int value) const
 
void dxfHex (int gc, int value) const
 
void dxfString (int gc, const char *value) const
 
void dxfString (int gc, const std::string &value) const
 
- Public Member Functions inherited from DL_Writer
 DL_Writer (DL_Codes::version version)
 
virtual ~DL_Writer ()
 
void section (const char *name) const
 
void sectionHeader () const
 
void sectionTables () const
 
void sectionBlocks () const
 
void sectionEntities () const
 
void sectionClasses () const
 
void sectionObjects () const
 
void sectionEnd () const
 
void table (const char *name, int num, int h=0) const
 
void tableLayers (int num) const
 
void tableLinetypes (int num) const
 
void tableAppid (int num) const
 
void tableStyle (int num) const
 
void tableEnd () const
 
void dxfEOF () const
 
void comment (const char *text) const
 
void entity (const char *entTypeName) const
 
void entityAttributes (const DL_Attributes &attrib) const
 
void subClass (const char *sub) const
 
void tableLayerEntry (unsigned long int h=0) const
 
void tableLinetypeEntry (unsigned long int h=0) const
 
void tableAppidEntry (unsigned long int h=0) const
 
void sectionBlockEntry (unsigned long int h=0) const
 
void sectionBlockEntryEnd (unsigned long int h=0) const
 
void color (int col=256) const
 
void linetype (const char *lt) const
 
void linetypeScale (double scale) const
 
void lineWeight (int lw) const
 
void coord (int gc, double x, double y, double z=0) const
 
void coordTriplet (int gc, const double *value) const
 
void resetHandle () const
 
unsigned long handle (int gc=5) const
 
unsigned long getNextHandle () const
 
unsigned long incHandle () const
 
void setModelSpaceHandle (unsigned long h)
 
unsigned long getModelSpaceHandle ()
 
void setPaperSpaceHandle (unsigned long h)
 
unsigned long getPaperSpaceHandle ()
 
void setPaperSpace0Handle (unsigned long h)
 
unsigned long getPaperSpace0Handle ()
 
virtual void dxfBool (int gc, bool value) const
 

Static Public Member Functions

static void strReplace (char *str, char src, char dest)
 

Additional Inherited Members

- Protected Attributes inherited from DL_Writer
unsigned long m_handle
 
unsigned long modelSpaceHandle
 
unsigned long paperSpaceHandle
 
unsigned long paperSpace0Handle
 
DL_Codes::version version
 

Detailed Description

Implements functions defined in DL_Writer for writing low level DXF constructs to an ASCII format DXF file.

@para fname File name of the file to be created. @para version DXF version. Defaults to DL_VERSION_2002.

Todo:
What if fname is NULL? Or fname can't be opened for another reason?

Definition at line 50 of file dl_writer_ascii.h.

Constructor & Destructor Documentation

◆ DL_WriterA()

DL_WriterA::DL_WriterA ( const char *  fname,
DL_Codes::version  version = DL_Codes::AC1015 
)
inline

Definition at line 52 of file dl_writer_ascii.h.

◆ ~DL_WriterA()

virtual DL_WriterA::~DL_WriterA ( )
inlinevirtual

Definition at line 54 of file dl_writer_ascii.h.

Member Function Documentation

◆ close()

void DL_WriterA::close ( ) const

◆ dxfHex()

void DL_WriterA::dxfHex ( int  gc,
int  value 
) const
virtual

◆ dxfInt()

◆ dxfReal()

◆ dxfString() [1/2]

void DL_WriterA::dxfString ( int  gc,
const char *  value 
) const
virtual

◆ dxfString() [2/2]

void DL_WriterA::dxfString ( int  gc,
const std::string &  value 
) const
virtual

Must be overwritten by the implementing class to write a string to the file.

Parameters
gcGroup code.
valueThe string.

Implements DL_Writer.

Definition at line 124 of file dl_writer_ascii.cpp.

◆ openFailed()

bool DL_WriterA::openFailed ( ) const
Return values
trueOpening file has failed.
falseOtherwise.

Definition at line 46 of file dl_writer_ascii.cpp.

Referenced by DL_Dxf::out().

◆ strReplace()

void DL_WriterA::strReplace ( char *  str,
char  src,
char  dest 
)
static

Replaces every occurence of src with dest in the null terminated str.

Definition at line 132 of file dl_writer_ascii.cpp.

Referenced by dxfReal().


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