dtinfo: Fix coverity warning related to using delete not delete []
[oweals/cde.git] / cde / programs / dtinfo / DtMmdb / storage / rep_cell.h
1 /*
2  * CDE - Common Desktop Environment
3  *
4  * Copyright (c) 1993-2012, The Open Group. All rights reserved.
5  *
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)
10  * any later version.
11  *
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
16  * details.
17  *
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
22  */
23 /*
24  * $XConsortium: rep_cell.h /main/4 1996/08/21 15:53:50 drk $
25  *
26  * Copyright (c) 1992 HaL Computer Systems, Inc.  All rights reserved.
27  * UNPUBLISHED -- rights reserved under the Copyright Laws of the United
28  * States.  Use of a copyright notice is precautionary only and does not
29  * imply publication or disclosure.
30  * 
31  * This software contains confidential information and trade secrets of HaL
32  * Computer Systems, Inc.  Use, disclosure, or reproduction is prohibited
33  * without the prior express written permission of HaL Computer Systems, Inc.
34  * 
35  *                         RESTRICTED RIGHTS LEGEND
36  * Use, duplication, or disclosure by the Government is subject to
37  * restrictions as set forth in subparagraph (c)(l)(ii) of the Rights in
38  * Technical Data and Computer Software clause at DFARS 252.227-7013.
39  *                        HaL Computer Systems, Inc.
40  *                  1315 Dell Avenue, Campbell, CA  95008
41  * 
42  */
43
44
45 #ifndef _rep_cell_h
46 #define _rep_cell_h 1
47
48 #ifdef C_API
49 #include "utility/c_stream.h"
50 #else
51 #include <sstream>
52 #endif
53
54 #include "dstr/dlist.h"
55 #include "utility/debug.h"
56
57
58 enum position_t { ACTIVE, INACTIVE, NOWHERE };
59
60 class rep_cell : public dlist_cell 
61 {
62 public:
63    rep_cell() : pos(NOWHERE) {};
64    virtual ~rep_cell() ;
65
66    position_t get_position() { return pos; };
67    void       set_position(position_t x) { pos = x; };
68
69 protected:
70    position_t pos;
71
72 };
73
74 class lru_cell_void_dt : public rep_cell
75 {
76
77 protected:
78
79 public:
80    void* dt;
81
82    lru_cell_void_dt(void* x = 0) : dt(x) {};
83    virtual ~lru_cell_void_dt();
84 };
85
86
87 #endif