2 * $XConsortium: InfoBase.hh /main/3 1996/06/11 16:19:27 cde-hal $
4 * Copyright (c) 1992 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
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
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.
22 * HAL COMPUTER SYSTEMS INTERNATIONAL, LTD.
30 class InfoBase : public LibraryElement
32 enum { AVERAGE_BOOKS_PER = 6 };
37 InfoBase (info_base *infobase)
38 : f_infobase (infobase),
42 // NOTE: hide LEND here !
44 const char *desc() const { return f_infobase->get_base_desc() ; }
45 const char *path() const { return f_infobase->get_base_path() ; }
46 const char *name() const { return f_infobase->get_base_name() ; }
49 // NOTE: need to get rid of const casts (needs lend support?)
50 const char *display_as()
51 { return ((const char *) f_infobase->get_base_desc()); }
54 { return ((const char *) f_infobase->get_base_name()); }
56 InfobaseEntry *search_info() const
57 { return f_search_info ; }
59 InfobaseEntry *search_info(InfobaseEntry* info);
61 bool has_children_internal();
63 protected: // functions
64 void create_children();
67 protected: // variables
68 info_base *f_infobase;
69 InfobaseEntry *f_search_info ; // storage freed elsewhere (SearchEngine)
72 inline InfobaseEntry *
73 InfoBase::search_info(InfobaseEntry * info)
75 assert(f_search_info == NULL); // debugging only, no error handline reqd - jbm
76 f_search_info = info ;