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

  1. /**************************************************************************
  2.  * Source Id :
  3.  *
  4.  * $Id: pathinfo.h,v 1.2 1993/03/25 22:26:13 davison 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.  *
  24.  *        Pathinfo structure. Used to relay path information to objects.
  25.  *
  26.  *
  27.  *  Original Author : Andy
  28.  *
  29.  *-------------------------------------------------------------------------
  30.  * Revision History:
  31.  *
  32.  * $Log: pathinfo.h,v $
  33.  * Revision 1.2  1993/03/25  22:26:13  davison
  34.  * Path information structure .
  35.  *
  36.  * Revision 1.1  1993/03/20  15:07:05  davison
  37.  * Initial revision
  38.  *
  39.  **************************************************************************/
  40.  
  41. #ifndef __PATHINFO_H__
  42. #define __PATHINFO_H__
  43.  
  44. class TpathInfo
  45. {
  46. public:
  47. //-----
  48.     char* path;
  49.     char* prefix;
  50.  
  51.     TpathInfo(const char* pth, const char* pfx)
  52.     {
  53.         path = new char[strlen(pth)+3];
  54.         prefix = new char[strlen(pfx)+3];
  55.         strcpy(path,pth);
  56.         if(path[strlen(path)-1] != '/')
  57.             strcat(path,"/");
  58.         strcpy(prefix,pfx);
  59.     }
  60.  
  61.     ~TpathInfo()
  62.     {
  63.         delete path;
  64.         delete prefix;
  65.     }
  66. };
  67. #endif
  68.  
  69.