Initial import of the CDE 2.1.30 sources from the Open Group.
[oweals/cde.git] / cde / programs / dtinfo / DtMmdb / mgrs / misc.h
1 /*
2  * $XConsortium: misc.h /main/4 1996/06/11 17:22:54 cde-hal $
3  *
4  * Copyright (c) 1993 HAL Computer Systems International, Ltd.
5  * All rights reserved.  Unpublished -- rights reserved under
6  * the Copyright Laws of the United States.  USE OF A COPYRIGHT
7  * NOTICE IS PRECAUTIONARY ONLY AND DOES NOT IMPLY PUBLICATION
8  * OR DISCLOSURE.
9  * 
10  * THIS SOFTWARE CONTAINS CONFIDENTIAL INFORMATION AND TRADE
11  * SECRETS OF HAL COMPUTER SYSTEMS INTERNATIONAL, LTD.  USE,
12  * DISCLOSURE, OR REPRODUCTION IS PROHIBITED WITHOUT THE
13  * PRIOR EXPRESS WRITTEN PERMISSION OF HAL COMPUTER SYSTEMS
14  * INTERNATIONAL, LTD.
15  * 
16  *                         RESTRICTED RIGHTS LEGEND
17  * Use, duplication, or disclosure by the Government is subject
18  * to the restrictions as set forth in subparagraph (c)(l)(ii)
19  * of the Rights in Technical Data and Computer Software clause
20  * at DFARS 252.227-7013.
21  *
22  *          HAL COMPUTER SYSTEMS INTERNATIONAL, LTD.
23  *                  1315 Dell Avenue
24  *                  Campbell, CA  95008
25  * 
26  */
27
28
29 #ifndef _misc_h
30 #define _misc_h
31
32 #include "object/root.h"
33 #include "utility/ostring.h"
34 #include "storage/abs_storage.h"
35 #include "object/handler.h"
36
37 Boolean name_oid_ls(const void* o1, const void* o2);
38 Boolean name_oid_eq(const void* o1, const void* o2);
39
40 Boolean oid_storage_ls(const void* o1, const void* o2);
41 Boolean oid_storage_eq(const void* o1, const void* o2);
42
43 //Boolean oid_ls(const void* o1, const void* o2);
44 //Boolean oid_eq(const void* o1, const void* o2);
45
46 class name_oid_t 
47 {
48
49 public:
50    name_oid_t(const char* nm, abs_storage* store = 0) : v_store(store) 
51    { 
52      v_name.set(nm);
53    }
54    name_oid_t(const char* nm, const oid_t& id, abs_storage* store = 0) : 
55       v_oid(id), v_store(store) 
56    { 
57      v_name.set(nm);
58    };
59
60    ~name_oid_t() {};
61
62 public:
63    ostring v_name;
64    oid_t v_oid;
65    abs_storage* v_store;
66 };
67
68 void delete_name_oid_rec_f(const void* name_oid_ptr);
69
70 class mark_t : private ostring
71 {
72 public:
73    mark_t(char* marks = "\t\n ");
74    virtual ~mark_t() {};
75    friend istream& operator >>(istream&, mark_t&);
76    friend ostream& operator <<(ostream&, mark_t&);
77 };
78
79
80 #endif