Main Page | Class Hierarchy | Class List | File List | Class Members

Record.h

00001 /**************************************************************************\ 00002 * 00003 * FILE: Record.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_RECORD_H 00031 #define DIME_RECORD_H 00032 00033 #include <dime/Basic.h> 00034 #include <dime/Base.h> 00035 #include <stdio.h> 00036 00037 class dimeInput; 00038 class dimeOutput; 00039 00040 class DIME_DLL_API dimeRecord : public dimeBase 00041 { 00042 public: 00043 dimeRecord(const int group_code); 00044 virtual ~dimeRecord(); 00045 00046 virtual void setValue(const dimeParam &param, dimeMemHandler * const memhandler = NULL) = 0; 00047 virtual void getValue(dimeParam &param) const = 0; 00048 virtual dimeRecord *copy(dimeMemHandler * const memhandler) const = 0; 00049 00050 void setGroupCode(const int group_code); 00051 int getGroupCode() const; 00052 00053 00054 public: 00055 virtual bool isEndOfSectionRecord() const; 00056 virtual bool isEndOfFileRecord() const; 00057 virtual int typeId() const = 0; 00058 virtual bool read(dimeInput * const in) = 0; 00059 virtual bool write(dimeOutput * const out); 00060 virtual void print() const {fprintf(stderr, "rec: %d\n", groupCode);} 00061 00062 public: 00063 static bool readRecordData(dimeInput * const in, const int group_code, 00064 dimeParam &param); 00065 static dimeRecord *readRecord(dimeInput * const in); 00066 static dimeRecord *createRecord(const int group_code, 00067 dimeMemHandler * const memhandler); 00068 static dimeRecord *createRecord(const int group_code, 00069 const dimeParam &param, 00070 dimeMemHandler * const memhandler); 00071 static int getRecordType(const int group_code); 00072 00073 protected: 00074 int groupCode; 00075 00076 }; // class dimeRecord 00077 00078 #endif // ! DIME_RECORD_H 00079

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