home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / oclsrc15.zip / OCL / Include / OCL.hpp < prev    next >
C/C++ Source or Header  |  1996-08-12  |  5KB  |  189 lines

  1. // OCL - OS/2 Class Library
  2. // (c) Cubus 1995
  3. // All Rights Reserved
  4. // OCL.HPP
  5.  
  6. /*
  7.  * Redistribution and use in source and binary forms, with or without
  8.  * modification, are permitted provided that the following conditions
  9.  * are met:
  10.  * 1. Redistributions of source code must retain the above copyright
  11.  *    notice, this list of conditions and the following disclaimer.
  12.  * 2. Neither the name Cubus nor the name Team OCL may be used to
  13.  *    endorse or promote products derived from this software
  14.  *    without specific prior written permission.
  15.  * 3. See OCL.INF for a detailed copyright notice.
  16.  *
  17.  *              THIS SOFTWARE IS PROVIDED ``AS IS'' AND
  18.  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  19.  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  20.  * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
  21.  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  22.  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  23.  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  24.  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  25.  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  26.  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  27.  * SUCH DAMAGE.
  28.  */
  29.  
  30.  
  31. // $Header: W:/Projects/OCL/INCLUDE/rcs/OCL.hpp 1.1 1996/08/12 00:01:11 B.STEIN Release $
  32.  
  33. #ifndef OCL_HPP_INCLUDED
  34.   #define OCL_HPP_INCLUDED
  35.  
  36. #define __OCL__
  37. #define OCLVER      150
  38.  
  39.  
  40. #define INCL_DOS
  41. #define INCL_PM
  42. #define INCL_WIN
  43. #define INCL_GPI
  44.  
  45. #if ( defined (__HIGHC__))
  46.   #pragma Off(Optimize_ptr_mem_func)
  47.   #pragma Off(Behaved)
  48.   #define __MULTI__
  49. #endif
  50.  
  51. #ifndef __EMX__
  52.  #include <os2.h>
  53.  #include <stddef.h>
  54.  #include <bsedos.h>
  55.  #include <bsedev.h>
  56.  #include <bseerr.h>
  57. #else
  58.  #define INCL_DOSDEVIOCTL    
  59.  #define INCL_DOSERRORS
  60.  #define INCL_DOSPROCESS
  61.  #define APIENTRY16
  62.  typedef unsigned short APIRET16;
  63.  #define __OCL_RESOLVE_TEMPLATES__
  64.  #define strcmpi( String1, String2) stricmp( String1, String2)
  65.  #include <os2.h>
  66. #endif
  67.  
  68. #include <limits.h>
  69. #include <float.h>
  70. #include <string.h>
  71. #include <stdio.h>
  72. #include <stdlib.h>
  73. #include <process.h>
  74. #include <iostream.h>
  75. #include <fstream.h>
  76.  
  77. #if ( defined (__BCPLUSPLUS__) || defined (__HIGHC__) )
  78.   typedef const char *PCSZ;
  79. #endif
  80.  
  81. #ifdef __BUILD_OCL_DLL__
  82. # ifdef __IBMCPP__
  83. #   define __CPP_EXPORT__ _Export
  84. # endif
  85. # if (defined (__WATCOM_CPLUSPLUS__) || defined (__BCPLUSPLUS__))
  86. #   define __CPP_EXPORT__ __export
  87. # endif
  88. # ifdef __HIGHC__
  89. #   define __CPP_EXPORT__
  90. #   pragma On(dllexport)
  91. # endif
  92. #else
  93. # define __CPP_EXPORT__
  94. #endif
  95.  
  96. #ifdef __IBMCPP__
  97. # define __OCL16 
  98. #elif __WATCOM_CPLUSPLUS__
  99. # define __OCL16 __far16
  100. #elif __BCPLUSPLUS__
  101. # define __OCL16
  102. #elif __HIGHC__
  103. # define __OCL16 _Seg16
  104. #endif
  105.  
  106.  
  107. #include <OCLObject.hpp>
  108. #include <OString.hpp>
  109.  
  110. #ifdef OINCL_BASE
  111.  #include <OList.hpp>
  112.  #include <OSortedList.hpp>
  113. #endif
  114.  
  115.  
  116. #ifdef __DEBUG_ALLOC__
  117.  
  118. class __CPP_EXPORT__ MemoryChecker
  119. {
  120.  public:
  121.     MemoryChecker() {}
  122.     ~MemoryChecker() {
  123.        _dump_allocated(-1); }
  124. };
  125.  
  126. extern MemoryChecker memCheck;
  127.  
  128. #endif // __DEBUG_ALLOC__
  129.  
  130.  
  131. class __CPP_EXPORT__ OCL
  132. {
  133.  protected:
  134.  
  135.     static
  136.         OString           transport;
  137.  
  138.     OCL                   () {}
  139.  
  140.     virtual
  141.         ~OCL              () {}
  142.  
  143.  public:
  144.  
  145.     static
  146.         OString            MSGFILE;
  147.  
  148.     static OString
  149.         &Version           (),
  150.         &Version           (OString& str),
  151.         &error             (ULONG x),
  152.         &apierror          (ULONG x, ULONG rc);
  153.  
  154.     static BOOL
  155.         saveID            (PCH Desk);
  156.  
  157.     static void
  158.         showDialogItem    (HWND hwnd, ULONG usDialogIDs[], ULONG usItemCount),
  159.         hideDialogItem    (HWND hwnd, ULONG usDialogIDs[], ULONG usItemCount),
  160.         disableDialogItem (HWND hwnd, ULONG usDialogIDs[], ULONG usItemCount, ULONG ulStyle),
  161.         disableControls   (HWND hwnd, ULONG usDialogIDs[], ULONG count),
  162.         enableControls    (HWND hwnd, ULONG usDialogIDs[], ULONG count),
  163.         hideControls      (HWND hwnd, ULONG usDialogIDs[], ULONG count),
  164.         showControls      (HWND hwnd, ULONG usDialogIDs[], ULONG count);
  165.  
  166.     static APIRET
  167.         startSession      (STARTDATA *SessionData);
  168. };
  169.  
  170.  
  171. #ifndef DB_DEPRESSED
  172.   #define DB_DEPRESSED 0x800
  173. #endif
  174.  
  175. #ifndef DB_RAISED
  176.   #define DB_RAISED 0x400
  177. #endif
  178.  
  179.  
  180. #if (defined (__OCL_SOURCE__) && defined (__IBMCPP__) && (__IBMCPP__ == 300))
  181.   #pragma hdrstop
  182. #endif
  183.  
  184.  
  185. #endif // OCL_HPP_INCLUDED
  186.  
  187.  
  188. // end of source  
  189.