home *** CD-ROM | disk | FTP | other *** search
- #ifndef _IEVTPARM_
- #define _IEVTPARM_
- /*******************************************************************************
- * FILE NAME: ievtparm.hpp *
- * *
- * DESCRIPTION: *
- * Declaration of the class(es): *
- * IEventParam - this class encapsulates the message parameter (MPARAM) *
- * *
- * 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/IBASEAPP/VCS/IEVTPARM.HPV $ *
- //
- // Rev 1.4 25 Oct 1992 17:59:58 nunn
- // Brad Broyles changes for external beta
-
- Rev 1.1 25 Jul 1992 12:00:00 KKL
- Init. design/code
- Rev 1.2 22 Oct 1992 11:00:00 WBB
- Amending to match skeleton.hpp
- *******************************************************************************/
-
- // Forward declarations for other classes:
- class IEventParam;
- class IPoint;
- #if !defined( _IHANDLE_ ) && !defined( I_NO_RELATED_HPP )
- #include <ihandle.hpp>
- #endif
-
- class IEventParam {
- /*******************************************************************************
- * The IEventParam class is used to encapsulate the message parameter (MPARAM) *
- *******************************************************************************/
- public:
- /*------------------------ CONSTRUCTORS/DESTRUCTORS ----------------------------
- | There are 7 ways to construct instances of this class: |
- | 1. default |
- | pvClMsg is set to zero |
- | 2. from a pointer to void |
- | pvClMsg is set to the void pointer |
- | 3. from an instance of IHandle |
- | pvClMsg is set to the handle |
- | 4. from an unsigned long value |
- | pvClMsg is set to the value of the unsigned long |
- | 5. from two unsigned long values |
- | pvClMsg is set with two short values obtained from the unsigned longs |
- | 6. from one unsigned long and two unsigned short values |
- | pvClMsg is set with the long value and two shorts combined to make a long|
- | 7. from another instance of IEventParam |
- | the values of the IEventParam are copied into the new instance |
- ------------------------------------------------------------------------------*/
- IEventParam();
- IEventParam(void* pv);
- IEventParam(IHandle hw);
- IEventParam(unsigned long ul);
- IEventParam(unsigned long ul1, unsigned long ul2);
- IEventParam(unsigned long u1, unsigned char uch1, unsigned char uch2);
- IEventParam(const IEventParam& epCopy);
-
- /*-------------------------------- ACCESSORS -----------------------------------
- | These function provide means of getting and setting the accessible |
- | attributes of instances of this class: |
- | number1 - returns the lower two bytes of the IEventParam |
- | number2 - returns the upper two bytes of the IEventParam |
- | char1 - returns the lowest byte of the IEventParam |
- | char2 - returns the second-lowest byte of the IEventParam |
- | char3 - returns the second-highest byte of the IEventParam |
- | char4 - returns the highest byte of the IEventParam |
- ------------------------------------------------------------------------------*/
- unsigned long
- number1() const,
- number2() const;
- unsigned char
- char1() const,
- char2() const,
- char3() const,
- char4() const;
-
- /*-------------------------------- OVERRIDES -----------------------------------
- | This class overrides the following inherited functions: |
- | = - assignment operator |
- | void* - cast operator to void pointer |
- | char* - cast operator to char pointer |
- | IPoint - extract IPoint from IEventParam |
- | unsigned long - extract unsigned long from IEventParam |
- | IHandle - extract IHandle from IEventParam |
- ------------------------------------------------------------------------------*/
- IEventParam&
- operator=(const IEventParam& ep);
- operator void*() const;
- operator char*() const;
- operator IPoint() const;
- operator unsigned long() const;
- operator IHandle() const;
-
- private:
- /*--------------------------------- PRIVATE ----------------------------------*/
- void*
- pvClMsg;
- }; // IEventParam
-
- /*--------------------------------- INLINES ----------------------------------*/
- #ifndef I_NO_INLINES
- #include <ievtparm.inl>
- #endif
-
- #endif /*_IEVTPARM_ */