00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028 #ifndef DL_WRITER_ASCII_H
00029 #define DL_WRITER_ASCII_H
00030
00031 #if _MSC_VER > 1000
00032 #pragma once
00033 #endif // _MSC_VER > 1000
00034
00035 #include "dl_writer.h"
00036 #include <fstream>
00037 #include <string>
00038 using std::string;
00039
00050 class DL_WriterA : public DL_Writer {
00051 public:
00052 DL_WriterA(const char* fname, DL_Codes::version version=VER_2000)
00053 : DL_Writer(version), m_ofile(fname) {}
00054 virtual ~DL_WriterA() {}
00055
00056 bool openFailed() const;
00057 void close() const;
00058 void dxfReal(int gc, double value) const;
00059 void dxfInt(int gc, int value) const;
00060 void dxfHex(int gc, int value) const;
00061 void dxfString(int gc, const char* value) const;
00062 void dxfString(int gc, const string& value) const;
00063
00064 static void strReplace(char* str, char src, char dest);
00065
00066 private:
00070 mutable std::ofstream m_ofile;
00071
00072 };
00073
00074 #endif
00075