OpenIndiana and Solaris port
[oweals/cde.git] / cde / programs / dtinfo / dtinfo / src / Basic / Atomizer.hh
1 /*
2  * $XConsortium: Atomizer.hh /main/3 1996/06/11 16:17:39 cde-hal $
3  *
4  * Copyright (c) 1992 HaL Computer Systems, Inc.  All rights reserved.
5  * UNPUBLISHED -- rights reserved under the Copyright Laws of the United
6  * States.  Use of a copyright notice is precautionary only and does not
7  * imply publication or disclosure.
8  * 
9  * This software contains confidential information and trade secrets of HaL
10  * Computer Systems, Inc.  Use, disclosure, or reproduction is prohibited
11  * without the prior express written permission of HaL Computer Systems, Inc.
12  * 
13  *                         RESTRICTED RIGHTS LEGEND
14  * Use, duplication, or disclosure by the Government is subject to
15  * restrictions as set forth in subparagraph (c)(l)(ii) of the Rights in
16  * Technical Data and Computer Software clause at DFARS 252.227-7013.
17  *                        HaL Computer Systems, Inc. 
18  *                  1315 Dell Avenue, Campbell, CA  95008
19  * 
20  */
21 /* This is just temporary code... */
22
23 /* The idea is that you construct atomizers (Atom was taken by X11) with
24    a string.  Atomizers constructed with the same initial string will
25    return the same value. */
26
27 #ifndef _Atomizer_hh
28 #define _Atomizer_hh
29
30 class Atomizer : public FolioObject
31 {
32 public: // functions
33   Atomizer (const char *);
34
35 // both of the following routines try to return
36 // a char * as an int.  hopefully, no one calls
37 // them and they can be eliminated.
38
39 #ifndef __osf__
40   size_t value() { return ((size_t) f_value); }
41   operator int () 
42     { return ((size_t) f_value); }
43 #endif
44
45   operator const char * ()
46     { return (f_value); }
47   const char *string() { return (f_value); }
48
49 protected: // variables
50   static List f_pool;
51   char *f_value;
52 };
53
54 #endif /* _Atomizer_hh */
55 /* DO NOT ADD ANY LINES AFTER THIS #endif */