home *** CD-ROM | disk | FTP | other *** search
- #ifndef _IBASE_
- #define _IBASE_
- /*******************************************************************************
- * FILE NAME: ibase.hpp *
- * *
- * DESCRIPTION: *
- * Declaration of the class(es): *
- * IBase - Empty "base" class to reduce global name space pollution *
- * *
- * In addition, this file contains definitions for various typedefs and *
- * macros previously defined in <ibasetype.hpp>. Over time, these *
- * definitions will probably migrate to more localized homes (e.g., *
- * <iwindow.hpp>). *
- * *
- * COPYRIGHT: *
- * Licensed Materials - Property of IBM *
- * (C) Copyright IBM Corporation 1992, 1993 *
- * All Rights Reserved *
- * US Government Users Restricted Rights - Use, duplication, or disclosure *
- * restricted by GSA ADP Schedule Contract with IBM Corp. *
- * *
- *$Log: R:/IBMCLASS/IBASE/VCS/IBASE.HPV $ *
- //
- // Rev 1.2 25 Oct 1992 16:46:12 nunn
- //changed library name to ICLUI
-
- Rev 1.1 12 Oct 1992 12:53:28 law
- Changed per new IBase.
-
- Rev 1.0 07 Oct 1992 10:10:04 law
- Initial revision.
- *******************************************************************************/
-
- class ostream;
-
- class IString;
-
- class IBase {
- /*******************************************************************************
- * This class is used to encapsulate the set of names that would otherwise be *
- * in global scope. All other classes in the ICLUI library inherit from *
- * this class. Thus, within such classes, the types and enumeration values *
- * defined herein can be utilized directly (i.e., without the qualifying *
- * "IBase::" prefix). *
- * *
- * Other code, particularly client code, must use either the qualified names, *
- * or, exploit the simplified "synonyms" declared in <isynonym.hpp>. *
- *******************************************************************************/
- public:
- /*--------------------------------- BOOLEAN ------------------------------------
- | The typedef Boolan is defined here, along with constant values for "true" |
- | and "false." |
- ------------------------------------------------------------------------------*/
- typedef int
- Boolean;
-
- enum {
- false = 0,
- true = 1
- };
-
- /*------------------------------- DIAGNOSTICS ----------------------------------
- | A left-shift (<<) operator is defined permitting any library object to be |
- | dumped to an ostream (e.g., cout << anObject;). Note that IBase can't |
- | say anything useful about the object so this function should be overridden |
- | in all subclasses. |
- | |
- | Likewise, the functions asString and asDebugInfo are provided to permit |
- | obtaining standard and diagnostic versions of object contents. |
- ------------------------------------------------------------------------------*/
- friend ostream
- &operator << ( ostream &aStream,
- const IBase &anObject );
-
- IString
- asString ( ) const,
- asDebugInfo ( ) const;
-
- }; // IBase
-
- #ifdef __BORLANDC__
- #define _System _syscall
- #define _Optlink _fastcall
- #endif
-
- #ifdef __ZTC__
- #define _System pascal far
- #define _Optlink
- #endif
-
- #ifdef __xlC__
- #define _System
- #define _Optlink
- #endif
-
- #ifndef IC_OS2LEVEL
- #ifdef __ZTC__
- #define IC_OS2LEVEL 130
- #else
- #define IC_OS2LEVEL 200
- #endif
- #endif
- #ifndef OS2LEVEL
- #define OS2LEVEL IC_OS2LEVEL
- #endif
-
- extern "C" {
-
- typedef int _System
- ICallback ( );
-
- typedef void * _System
- #if ( IC_OS2LEVEL >= 200 )
- IWinProc ( unsigned long, unsigned long, void *, void * );
- #else
- IWinProc ( void *, unsigned short, void *, void * );
- #endif
-
- // Compatibility:
- typedef ICallback
- ICALLBACK;
- typedef IWinProc
- IWINCALLBACK;
- }
-
- #ifdef IC_DEVELOP
- #define IC_TRACE_DEVELOP
- #endif
-
- #ifdef IC_RUNTIME
- #define IC_TRACE_RUNTIME
- #endif
-
- #ifdef IC_TRACE_ALL
- #define IC_TRACE_DEVELOP
- #define IC_TRACE_RUNTIME
- #endif
-
- #ifdef IC_TRACE_DEVELOP
- #define IC_TRACE_RUNTIME
- #endif
-
- #define IC_UM_BASE ( 0xFFE0 )
- #define IC_UM_WINDOWSETUP ( IC_UM_BASE + 0 )
- #define IC_UM_INITWIN ( IC_UM_BASE + 1 )
- #define IC_UM_CLOSEWINDOW ( IC_UM_BASE + 2 )
- #define IC_UM_DDE_CLOSED ( IC_UM_BASE + 3 )
- #define IC_UM_DRAGDROP_RENDER ( IC_UM_BASE + 4 )
-
- // compatibility
- #define UM_WINDOWSETUP IC_UM_WINDOWSETUP
- #define UM_INITWIN IC_UM_INITWIN
- #define UM_CLOSEWINDOW IC_UM_CLOSEWINDOW
- #define UM_DDE_CLOSED IC_UM_DDE_CLOSED
- #define UM_DRAGDROP_RENDER IC_UM_DRAGDROP_RENDER
-
- #ifndef _ISYNONYM_
- #include <isynonym.hpp>
- #endif
-
- #endif /* _IBASE_ */