1
/****************************************************************************
2
** $Id: dl_writer_ascii.h 2719 2005-09-24 20:41:23Z andrew $
4
** Copyright (C) 2001-2003 RibbonSoft. All rights reserved.
5
** Copyright (C) 2001 Robert J. Campbell Jr.
7
** This file is part of the dxflib project.
9
** This file may be distributed and/or modified under the terms of the
10
** GNU General Public License version 2 as published by the Free Software
11
** Foundation and appearing in the file LICENSE.GPL included in the
12
** packaging of this file.
14
** Licensees holding valid dxflib Professional Edition licenses may use
15
** this file in accordance with the dxflib Commercial License
16
** Agreement provided with the Software.
18
** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
19
** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
21
** See http://www.ribbonsoft.com for further details.
23
** Contact info@ribbonsoft.com if any conditions of this licensing are
26
**********************************************************************/
28
#ifndef DL_WRITER_ASCII_H
29
#define DL_WRITER_ASCII_H
33
#endif // _MSC_VER > 1000
35
#include "dl_writer.h"
41
* Implements functions defined in DL_Writer for writing low
42
* level DXF constructs to an ASCII format DXF file.
44
* @para fname File name of the file to be created.
45
* @para version DXF version. Defaults to VER_2002.
47
* @todo What if \c fname is NULL? Or \c fname can't be opened for
50
class DL_WriterA : public DL_Writer
53
DL_WriterA( const char* fname, DL_Codes::version version = VER_2000 )
54
: DL_Writer( version ), m_ofile( fname ) {}
55
virtual ~DL_WriterA() {}
57
bool openFailed() const;
59
void dxfReal( int gc, double value ) const;
60
void dxfInt( int gc, int value ) const;
61
void dxfHex( int gc, int value ) const;
62
void dxfString( int gc, const char* value ) const;
63
void dxfString( int gc, const string& value ) const;
65
static void strReplace( char* str, char src, char dest );
69
* DXF file to be created.
71
mutable std::ofstream m_ofile;