StringRecord.h
1 /**************************************************************************\
2  *
3  * FILE: StringRecord.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_STRINGRECORD_H
31 #define DIME_STRINGRECORD_H
32 
33 #include <dime/records/Record.h>
34 
35 class DIME_DLL_API dimeStringRecord : public dimeRecord
36 {
37 public:
38  dimeStringRecord(const int group_code = 0);
39  virtual ~dimeStringRecord();
40 
41  virtual dimeRecord *copy(dimeMemHandler * const mh) const;
42  virtual void setValue(const dimeParam &param, dimeMemHandler * const memhandler = NULL);
43  virtual void getValue(dimeParam &param) const;
44 
45  void setStringPointer(char * const s);
46  bool setString(const char * const s,
47  dimeMemHandler * const memhandler = NULL);
48  char *getString();
49 
50 public:
51  bool isEndOfSectionRecord() const;
52  bool isEndOfFileRecord() const;
53  int typeId() const;
54  bool read(dimeInput * const in);
55  bool write(dimeOutput * const out);
56 
57 protected:
58  char *string;
59 
60 }; // class dimeStringRecord
61 
62 #endif // ! DIME_STRINGRECORD_H
63 
virtual void setValue(const dimeParam &param, dimeMemHandler *const memhandler=NULL)=0
virtual bool isEndOfFileRecord() const
Definition: Record.cpp:120
virtual void getValue(dimeParam &param) const =0
The dimeStringRecord class is a container class for string records.
Definition: StringRecord.h:35
The dimeMemHandler class is a special-purpose memory manager.
Definition: MemHandler.h:35
virtual dimeRecord * copy(dimeMemHandler *const memhandler) const =0
virtual bool read(dimeInput *const in)=0
virtual bool isEndOfSectionRecord() const
Definition: Record.cpp:110
The dimeInput class offers transparent file I/O for DXF and DXB.
Definition: Input.h:38
The dimeParam class is a union of the different parameter types.
Definition: Basic.h:97
virtual bool write(dimeOutput *const out)
Definition: Record.cpp:140
The dimeRecord class is the superclass of all record classes.
Definition: Record.h:40
virtual int typeId() const =0
The dimeOutput class handles writing of DXF and DXB files.
Definition: Output.h:38

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