home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 22 gnu / 22-gnu.zip / db02_src.zip / nserver.h < prev    next >
C/C++ Source or Header  |  1993-11-05  |  2KB  |  86 lines

  1. /**************************************************************************
  2.  * Source Id :
  3.  *
  4.  * $Id: nserver.h,v 1.9 1993/11/04 14:57:06 kevinl Exp $
  5.  *-------------------------------------------------------------------------
  6.  * Project Notes :
  7.  *
  8.  *  Diamond Base
  9.  *  ============
  10.  *      A solid database implementation, spurred on by the continuing
  11.  *  Metal (Lead) Base saga.
  12.  *
  13.  *  Project Team :
  14.  *        A. Davison
  15.  *        K. Lentin
  16.  *        D. Platt
  17.  *
  18.  *    Project Commenced : 05-02-1993
  19.  *
  20.  *-------------------------------------------------------------------------
  21.  *  Module Notes :
  22.  *
  23.  *    Name Server Class : This will return the path leading to the database
  24.  *   files related a relation by its name.
  25.  *
  26.  *  Original Author :
  27.  *        Andy
  28.  *
  29.  *-------------------------------------------------------------------------
  30.  * Revision History:
  31.  *
  32.  * $Log: nserver.h,v $
  33.  * Revision 1.9  1993/11/04  14:57:06  kevinl
  34.  * Added allowAll and isOpen and took care of unnamed relations "" being
  35.  * added to the array
  36.  *
  37.  * Revision 1.8  1993/07/11  08:46:18  kevinl
  38.  * Minor compile time thingos
  39.  *
  40.  * Revision 1.7  1993/07/11  08:19:19  kevinl
  41.  * Stopped NameServer exiting when config file is empty/missing
  42.  *
  43.  * Revision 1.6  1993/05/11  14:44:50  kevinl
  44.  * Added version number output
  45.  *
  46.  * Revision 1.5  1993/04/27  07:03:31  kevinl
  47.  * Comments
  48.  *
  49.  * Revision 1.4  1993/03/25  22:21:42  davison
  50.  * queryName now takes a const char*
  51.  *
  52.  * Revision 1.3  1993/03/20  15:12:56  davison
  53.  * Now returns a name ID, so that only one dbobject for each relation is
  54.  * available at any time.
  55.  *
  56.  * Revision 1.2  1993/02/22  05:40:05  davison
  57.  * Fixed RCS Header.
  58.  *
  59.  **************************************************************************/
  60.  
  61. #ifndef __Name_Server_h__
  62. #define __Name_Server_h__
  63.  
  64. #include <ctype.h>
  65. #include <string.h>
  66. #include <defs.h>
  67.  
  68. #define MAX_RELATIONS 20
  69.  
  70. class TNameServer
  71. {
  72.     char    PathName[MAX_RELATIONS][200];
  73.     char    RelName[MAX_RELATIONS][40];
  74.     int        NumNames;
  75.     bool    allowAll;
  76. protected:
  77.     bool    nsOpen;
  78. public:
  79.             TNameServer(char* name=0);
  80.     char*    queryName(const char*, long& nameId);
  81.     char*    verStr(void);
  82.     bool    ok(void) { return nsOpen; }
  83. };
  84.  
  85. #endif
  86.