home *** CD-ROM | disk | FTP | other *** search
/ DOS/V Power Report 1996 November / VPR9611B.ISO / vabasic / ntclnt.exe / DISK8 / data.8 / datab / INCLUDE / VCATALOG.HH < prev    next >
Text File  |  1996-07-29  |  3KB  |  79 lines

  1. //--------------------------------------------------------------
  2. // $Source: /rcs/crcs/general/intel/vcatalog.hh,v $
  3. // Checked in by: $Author: andrews $
  4. // $Date: 1996/04/15 22:48:31 $             $Revision: 1.10 $
  5. //--------------------------------------------------------------
  6. //         Copyright(c) 1994, Visual Edge Software Ltd.
  7. //
  8. // ALL RIGHTS RESERVED. This notice is intended as a precaution
  9. // against inadvertent publication, and shall not be deemed to
  10. // consitute an acknowledgment that publication has occurred
  11. // nor to imply any waiver of confidentiality. The year included
  12. // in the notice is the year of the creation of the work.
  13. //--------------------------------------------------------------
  14. // DESCRIPTION:
  15. //      This file contains the implementation for the
  16. //      VCatMsg class. The VeCatalog class implements
  17. //      a message catalog utility that should be used for all
  18. //      internal warning, status, and error messages.
  19. //--------------------------------------------------------------
  20.  
  21. /* Copyright (c) International Business Machines Inc, 1994 */
  22.  
  23. #ifndef VCATALOG_H
  24. #define VCATALOG_H
  25.  
  26. #include <os.h>        // for VSYS_WINDOWS
  27. #include <dllclass.hh>    // for VeDllBasedClass
  28. #include <vtoolkit.hh>
  29. #include <vstring.hh>    // for VeString
  30.  
  31. #ifdef _OS2
  32. #define INCL_PM
  33. #define INCL_DOS
  34. #include <os2.h>          //included by vwtoolkt
  35. #define HINSTANCE void *
  36. #else
  37. #include <vtoolkit.hh>
  38.  
  39. #endif
  40.  
  41. #define VPASTE(token1,token2)            token1##token2
  42.  
  43. /*------------------------------------------------------------------------
  44.  * Convenience macro:
  45.  * instead of           catalog.GetMsg (MS_MSGID, DS_MS_MSGID)
  46.  * you can say          catalog.VGETMSG (MSGID);
  47.  *------------------------------------------------------------------------*/
  48.  
  49. #define VGETMSG(msgid) \
  50.         GetMsg(VPASTE (MS_,msgid), VPASTE(DS_MS_,msgid))
  51.  
  52.  
  53. VCLASS VeCatalog : public VeDllBasedClass
  54. {
  55.         public:
  56.  
  57.                 VOPERDECL         VeCatalog( const char* catname, 
  58.                           int msgset=0,
  59.                           VHInstance anInstance=0 );
  60.  
  61.                 virtual VOPERDECL     ~VeCatalog ();
  62.  
  63.                 VVIRTUALDECL(VeString)     GetMsg (int msgid, char *aMsg=0);
  64.  
  65.                 static VMETHODDECL(void) CloseAll ();     // No catalog can be used after this!
  66.         static VMETHODDECL(void) InitPath (VeString aPath);
  67.  
  68.         private:
  69.                 VeString        itsName;
  70.                 int             isAvailable;
  71.  
  72.         VHInstance    itsLocalInst;
  73.                 VHInstance    itsExternInst;
  74.  
  75.         static VeString ThePath;
  76. };
  77.  
  78. #endif //VCATALOG_H
  79.