TableEntry.h
1 /**************************************************************************\
2  *
3  * FILE: TableEntry.h
4  *
5  * This source file is part of DIME.
6  * Copyright (C) 1998-1999 by Systems In Motion. All rights reserved.
7  *
8  * This library is free software; you can redistribute it and/or modify it
9  * under the terms of the GNU General Public License, version 2, as
10  * published by the Free Software Foundation.
11  *
12  * This library is distributed in the hope that it will be useful, but
13  * WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15  * General Public License (the accompanying file named COPYING) for more
16  * details.
17  *
18  **************************************************************************
19  *
20  * If you need DIME for a non-GPL project, contact Systems In Motion
21  * to acquire a Professional Edition License:
22  *
23  * Systems In Motion http://www.sim.no/
24  * Prof. Brochs gate 6 sales@sim.no
25  * N-7030 Trondheim Voice: +47 22114160
26  * NORWAY Fax: +47 67172912
27  *
28 \**************************************************************************/
29 
30 #ifndef DIME_TABLEENTRY_H
31 #define DIME_TABLEENTRY_H
32 
33 #include <dime/Base.h>
34 #include <dime/RecordHolder.h>
35 
36 class dimeModel;
37 
38 class DIME_DLL_API dimeTableEntry : public dimeRecordHolder
39 {
40  friend class dimeUnknownTable;
41  friend class dimeLayerTable;
42 
43 public:
45  virtual ~dimeTableEntry();
46 
47  virtual const char *getTableName() const = 0;
48  virtual bool read(dimeInput * const in);
49  virtual bool write(dimeOutput * const out);
50  virtual dimeTableEntry *copy(dimeModel * const model) const = 0;
51  virtual int typeId() const = 0;
52  virtual bool isOfType(const int thetypeid) const;
53  virtual int countRecords() const;
54 
55  static dimeTableEntry *createTableEntry(const char * const name,
56  dimeMemHandler * const memhandler = NULL);
57 
58 protected:
59  bool preWrite(dimeOutput * const output);
60 
61  virtual bool handleRecord(const int groupcode,
62  const dimeParam &param,
63  dimeMemHandler * const memhandler);
64 
65  bool copyRecords(dimeTableEntry * const table, dimeModel * const model) const;
66 
67 }; // class dimeTableEntry
68 
69 #endif // ! DIME_TABLEENTRY_H
70 
The dimeLayerTable class reads and writes LAYER tables.
Definition: LayerTable.h:35
virtual ~dimeTableEntry()
Definition: TableEntry.cpp:61
virtual bool isOfType(const int thetypeid) const
Definition: RecordHolder.cpp:75
The dimeMemHandler class is a special-purpose memory manager.
Definition: MemHandler.h:35
virtual int typeId() const =0
bool copyRecords(dimeRecordHolder *const rh, dimeMemHandler *const memhandler) const
Definition: RecordHolder.cpp:86
The dimeRecordHolder class is a superclass for objects that store records.
Definition: RecordHolder.h:40
virtual bool write(dimeOutput *const out)
Definition: RecordHolder.cpp:172
The dimeModel class organizes a model.
Definition: Model.h:51
The dimeInput class offers transparent file I/O for DXF and DXB.
Definition: Input.h:38
virtual bool read(dimeInput *const in)
Definition: RecordHolder.cpp:116
The dimeParam class is a union of the different parameter types.
Definition: Basic.h:97
static dimeTableEntry * createTableEntry(const char *const name, dimeMemHandler *const memhandler=NULL)
Definition: TableEntry.cpp:99
dimeTableEntry()
Definition: TableEntry.cpp:52
virtual bool handleRecord(const int groupcode, const dimeParam &param, dimeMemHandler *const memhandler)
Definition: RecordHolder.cpp:201
The dimeTableEntry class is the superclass for all table classes.
Definition: TableEntry.h:38
virtual int countRecords() const
Definition: RecordHolder.cpp:345
The dimeOutput class handles writing of DXF and DXB files.
Definition: Output.h:38
The dimeUnknownTable class reads and writes undefined tables.
Definition: UnknownTable.h:35

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