Add GNU LGPL headers to all .c .C and .h files
[oweals/cde.git] / cde / lib / tt / lib / api / c / api_objid_spec.C
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 //%%  (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: api_objid_spec.C /main/3 1995/10/23 09:53:54 rswiston $                                                     
28 /* -*-C++-*-
29  *
30  * api_objid_spec.cc
31  *
32  * Copyright (c) 1990 by Sun Microsystems, Inc.
33  * 
34  */
35
36 #include "api/c/api_objid_spec.h"
37
38
39 _Tt_objid_spec ::
40 _Tt_objid_spec()
41 {
42         onDiskFlag = FALSE;
43 }       // end -_Tt_objid_spec()-
44
45 _Tt_objid_spec ::
46 _Tt_objid_spec(_Tt_string objid)
47
48         : _Tt_db_object(objid)
49 {
50         onDiskFlag = TRUE;
51 }       // end -_Tt_objid_spec()-
52
53
54 _Tt_objid_spec ::
55 ~_Tt_objid_spec()
56 {
57         // nothing special
58 }       // end -~_Tt_objid_spec()-
59
60
61 // onDiskFlag - Rules for flag value are:
62 //
63 // 1) Set sync flag to TRUE by default, if the
64 //    object is already on disk.  If it is a
65 //    brand new object that has never been written
66 //    to disk, set the flag to FALSE.
67 // 2) If a memory only set is done, set sync
68 //    flag to FALSE.
69 // 3) If a write to disk is done, set sync flag
70 //    to TRUE.
71 // 4) If sync flag is TRUE, read from disk by
72 //    refreshing memory version and calling read
73 //    member functions.
74 // 5) If sync flag is FALSE, read from memory.
75 //
76
77 void _Tt_objid_spec ::
78 setOnDiskFlag(bool_t flag)
79 {
80         onDiskFlag = flag;
81 }       // end -setOnDiskFlag()-
82
83
84 bool_t _Tt_objid_spec ::
85 getOnDiskFlag()
86 {
87         return onDiskFlag;
88 }       // end -getOnDiskFlag()-