|
http://www.sim.no http://www.coin3d.org |
00001 /**************************************************************************\ 00002 * 00003 * FILE: Output.h 00004 * 00005 * This source file is part of DIME. 00006 * Copyright (C) 1998-1999 by Systems In Motion. All rights reserved. 00007 * 00008 * This library is free software; you can redistribute it and/or modify it 00009 * under the terms of the GNU General Public License, version 2, as 00010 * published by the Free Software Foundation. 00011 * 00012 * This library is distributed in the hope that it will be useful, but 00013 * WITHOUT ANY WARRANTY; without even the implied warranty of 00014 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00015 * General Public License (the accompanying file named COPYING) for more 00016 * details. 00017 * 00018 ************************************************************************** 00019 * 00020 * If you need DIME for a non-GPL project, contact Systems In Motion 00021 * to acquire a Professional Edition License: 00022 * 00023 * Systems In Motion http://www.sim.no/ 00024 * Prof. Brochs gate 6 sales@sim.no 00025 * N-7030 Trondheim Voice: +47 22114160 00026 * NORWAY Fax: +47 67172912 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 }; // class dimeOutput 00076 00077 #endif // ! DIME_OUTPUT_H 00078
Copyright © 1998-2005 by Systems in Motion AS. All rights reserved.
Generated on Tue Dec 2 23:27:14 2008 for DIME by Doxygen. 1.4.7