Table.h
1 /**************************************************************************\
2  *
3  * FILE: Table.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_TABLE_H
31 #define DIME_TABLE_H
32 
33 #include <dime/Base.h>
34 #include <dime/util/Array.h>
35 
36 class dimeInput;
37 class dimeModel;
38 class dimeOutput;
39 class dimeTableEntry;
40 class dimeRecord;
41 
42 class DIME_DLL_API dimeTable : public dimeBase
43 {
44 public:
45  dimeTable(dimeMemHandler * const memhandler);
46  virtual ~dimeTable();
47 
48  bool read(dimeInput * const in);
49  bool write(dimeOutput * const out);
50  dimeTable *copy(dimeModel * const model) const;
51  int typeId() const;
52  int countRecords() const;
53  int tableType() const;
54 
55  void setTableName(const char * name);
56  const char * tableName() const;
57 
58  int getNumTableEntries() const;
59  dimeTableEntry *getTableEntry(const int idx);
60  void insertTableEntry(dimeTableEntry * const tableEntry, const int idx = -1);
61  void removeTableEntry(const int idx);
62 
63  int getNumTableRecords() const;
64  dimeRecord *getTableRecord(const int idx);
65  void insertTableRecord(dimeRecord * const record, const int idx = -1);
66  void removeTableRecord(const int idx);
67 
68 private:
69  int16 maxEntries; // dummy variable read from file
70  char * tablename;
71  dimeArray <dimeTableEntry*> tableEntries;
73  dimeMemHandler *memHandler;
74 }; // class dimeTable
75 
76 #endif // ! DIME_TABLE_H
77 

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