2 * CDE - Common Desktop Environment
4 * Copyright (c) 1993-2012, The Open Group. All rights reserved.
6 * These libraries and programs are free software; you can
7 * redistribute them and/or modify them under the terms of the GNU
8 * Lesser General Public License as published by the Free Software
9 * Foundation; either version 2 of the License, or (at your option)
12 * These libraries and programs are distributed in the hope that
13 * they will be useful, but WITHOUT ANY WARRANTY; without even the
14 * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
15 * PURPOSE. See the GNU Lesser General Public License for more
18 * You should have received a copy of the GNU Lesser General Public
19 * License along with these librararies and programs; if not, write
20 * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
21 * Floor, Boston, MA 02110-1301 USA
23 /*%% (c) Copyright 1993, 1994 Hewlett-Packard Company */
24 /*%% (c) Copyright 1993, 1994 International Business Machines Corp. */
25 /*%% (c) Copyright 1993, 1994 Sun Microsystems, Inc. */
26 /*%% (c) Copyright 1993, 1994 Novell, Inc. */
27 /*%% $XConsortium: tt_isam_record.h /main/3 1995/10/20 16:45:07 rswiston $ */
29 * tt_isam_record.h - Defines the TT ISAM record class. This class simplifies
30 * putting data in a record. To get an empty record ready
31 * to be filled with data, call the _Tt_isam_file::getEmptyRecord.
33 * Copyright (c) 1992 by Sun Microsystems, Inc.
36 #ifndef _TT_ISAM_RECORD_H
37 #define _TT_ISAM_RECORD_H
39 #include "util/tt_object.h"
40 #include "util/tt_string.h"
41 #include "tt_isam_key_descriptor_utils.h"
43 class _Tt_isam_record : public _Tt_object {
45 // Dummy constructor needed to make tt_isam_record_utils.cc happy
49 _Tt_isam_record (const _Tt_isam_key_descriptor_list_ptr &key_descriptor_list,
50 int max_record_length,
51 int min_record_length);
54 int getNumberOfKeys () const;
55 _Tt_isam_key_descriptor_ptr getKeyDescriptor (int) const;
57 _Tt_string getKeyPartValue (int, int) const;
58 void setKeyPartValue (int, int, const _Tt_string&);
60 _Tt_string getBytes (int, int) const;
61 void setBytes (int, const _Tt_string&);
62 void setBytes (int, int, const _Tt_string&);
64 void setLength (int length)
66 currentLength = length;
69 int getLength () const
74 int getMaxLength () const
79 int getMinLength () const
84 const _Tt_string &getRecord () const
91 _Tt_isam_key_descriptor_list_ptr keyDescriptorList;
97 #endif /* _TT_ISAM_RECORD_H */