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
24 * $XConsortium: dl_list.h /main/5 1996/06/11 17:24:17 cde-hal $
26 * Copyright (c) 1993 HAL Computer Systems International, Ltd.
27 * All rights reserved. Unpublished -- rights reserved under
28 * the Copyright Laws of the United States. USE OF A COPYRIGHT
29 * NOTICE IS PRECAUTIONARY ONLY AND DOES NOT IMPLY PUBLICATION
32 * THIS SOFTWARE CONTAINS CONFIDENTIAL INFORMATION AND TRADE
33 * SECRETS OF HAL COMPUTER SYSTEMS INTERNATIONAL, LTD. USE,
34 * DISCLOSURE, OR REPRODUCTION IS PROHIBITED WITHOUT THE
35 * PRIOR EXPRESS WRITTEN PERMISSION OF HAL COMPUTER SYSTEMS
38 * RESTRICTED RIGHTS LEGEND
39 * Use, duplication, or disclosure by the Government is subject
40 * to the restrictions as set forth in subparagraph (c)(l)(ii)
41 * of the Rights in Technical Data and Computer Software clause
42 * at DFARS 252.227-7013.
44 * HAL COMPUTER SYSTEMS INTERNATIONAL, LTD.
54 #include "utility/filter.h"
55 #include "object/composite.h"
56 #include "index/index.h"
57 #include "object/oid_list.h"
58 #include "object/dl_list_cell.h"
60 /***************************************
62 ****************************************/
64 class dl_list: public composite
69 dl_list(c_code_t = DL_LIST_CODE);
70 dl_list(const dl_list&);
73 void init_data_member(c_index_handlerPtr* indices,
77 MMDB_SIGNATURES(dl_list);
80 // value comparison functions
81 virtual Boolean value_EQ(root&, Boolean safe = true) const ;
82 virtual Boolean value_LS(root&, Boolean safe = true) const ;
85 virtual oid_t get_first_oid(const handler& query, int index);
87 // insert component functions. new_cell and old_cell
88 // are handlers to dl_list_cells already existing on
90 Boolean insert_before(dl_list_cell_handler& new_cell,
91 dl_list_cell_handler& old_cell
93 Boolean insert_after(dl_list_cell_handler& new_cell,
94 dl_list_cell_handler& old_cell
97 // insert as head/tail cell. new_cell is a handler to a
98 // del_list_cell already existing on the store
99 Boolean insert_as_head(const dl_list_cell_handler& new_cell);
100 Boolean insert_as_tail(dl_list_cell_handler& new_cell);
102 // iteration over components
103 virtual handler* get_component(int index) ;
105 // get a set of locs for element objects satisfying a 'query'
106 // 'index' indicates the index to be used.
107 virtual oid_list_handler* get_locs(handler& query, int index)
110 // first/last cell's oid.
111 oid_t first_cell_oid() const ;
112 oid_t last_cell_oid() const ;
114 // init/quit batch index
115 void batch_index_begin();
116 void batch_index_end();
118 // read in a set of object instances. Used with
119 // batch_index_begin() and batch_index_end() to
120 // load a mixed object stream
121 io_status batch_asciiIn(istream& s);
123 // instance in/out function
124 virtual io_status asciiOut(ostream&) ;
125 virtual io_status asciiIn(istream&) ;
127 // compacted disk representation In and Out functions
128 virtual int cdr_sizeof();
129 virtual io_status cdrOut(buffer&);
130 virtual io_status cdrIn(buffer&);
134 Boolean insert_to_indices(const dl_list_cell_handler& new_cell);
137 oid_t v_dl_list_head;
138 oid_t v_dl_list_tail;
140 c_index_handlerPtr *v_indices;
141 unsigned int v_num_indices;
144 HANDLER_SIGNATURES(dl_list)