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
00029
00030 #ifndef DIME_OUTPUT_H
00031 #define DIME_OUTPUT_H
00032
00033 #include <dime/Basic.h>
00034 #include <stdio.h>
00035
00036 class dimeModel;
00037
00038 class DIME_DLL_API dimeOutput
00039 {
00040 public:
00041 dimeOutput();
00042 ~dimeOutput();
00043
00044 void setCallback(const int numrecords,
00045 int (*cb)(float, void *), void *cbdata);
00046 bool setFileHandle(FILE *fp);
00047 bool setFilename(const char * const filename);
00048 void setBinary(const bool state = true);
00049 bool isBinary() const;
00050
00051 bool writeHeader() {return true;}
00052 bool writeGroupCode(const int groupcode);
00053 bool writeInt8(const int8 val);
00054 bool writeInt16(const int16 val);
00055 bool writeInt32(const int32 val);
00056 bool writeFloat(const float val);
00057 bool writeDouble(const dxfdouble val);
00058 bool writeString(const char * const str);
00059
00060 int getUniqueHandleId();
00061
00062 private:
00063 friend class dimeModel;
00064 dimeModel *model;
00065 FILE *fp;
00066 bool binary;
00067
00068 int (*callback)(float, void*);
00069 void *callbackdata;
00070 int numrecords;
00071 int numwrites;
00072 bool aborted;
00073 bool didOpenFile;
00074
00075 };
00076
00077 #endif // ! DIME_OUTPUT_H
00078