Main Page   Class Hierarchy   Compound List   File List   Compound Members  

Output.h

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 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 }; // class dimeOutput
00074 
00075 #endif // ! DIME_OUTPUT_H
00076 

Copyright © 1998-1999, Systems In Motion <sales@sim.no>. All rights reserved.
System documentation was generated using doxygen.