Object.h
1 /**************************************************************************\
2  *
3  * FILE: Object.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_OBJECT_H
31 #define DIME_OBJECT_H
32 
33 #include <dime/Base.h>
34 #include <dime/Basic.h>
35 #include <dime/util/Array.h>
36 #include <dime/util/Linear.h>
37 #include <dime/RecordHolder.h>
38 
39 class dimeModel;
40 
41 class DIME_DLL_API dimeObject : public dimeRecordHolder
42 {
43  friend class dimeObjectesSection;
44  friend class dimeModel;
45 
46 public:
47  dimeObject();
48  virtual ~dimeObject();
49 
50  virtual const char *getObjectName() const = 0;
51  virtual dimeObject *copy(dimeModel * const model) const = 0;
52  virtual bool read(dimeInput * const in);
53  virtual bool write(dimeOutput * const out);
54  virtual bool isOfType(const int thetypeid) const;
55  virtual int typeId() const = 0;
56  virtual int countRecords() const;
57  virtual void print() const {}
58 
59 protected:
60  virtual bool handleRecord(const int groupcode,
61  const dimeParam &param,
62  dimeMemHandler * const memhandler);
63 
64 public:
65  static dimeObject *createObject(const char * const name,
66  dimeMemHandler * const memhandler = NULL);
67 protected:
68  bool copyRecords(dimeObject * const newobject, dimeModel * const model) const;
69 
70 }; // class dimeObject
71 
72 #endif // ! DIME_OBJECT_H
73 

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