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