home *** CD-ROM | disk | FTP | other *** search
/ Power GUI Programming with VisualAge C++ / powergui.iso / trialva / ibmcppw / include / ivbvprtp.h < prev    next >
Encoding:
C/C++ Source or Header  |  1996-02-22  |  3.3 KB  |  79 lines

  1. #ifndef _IVBVPRTP_
  2.   #define _IVBVPRTP_
  3. /*******************************************************************************
  4. * FILE NAME: ivbvprtp.h                                                        *
  5. *                                                                              *
  6. * DESCRIPTION:                                                                 *
  7. *   Declaration of the class(es):                                              *
  8. *    IVBVariablePartPointer - Variable template class for pointer to a part.   *
  9. *                                                                              *
  10. * COPYRIGHT:                                                                   *
  11. *   IBM(R) VisualAge(TM) for C++                                               *
  12. *   (C) Copyright International Business Machines Corporation 1991, 1996       *
  13. *   Licensed Material - Program-Property of IBM - All Rights Reserved.         *
  14. *   US Government Users Restricted Rights - Use, duplication, or disclosure    *
  15. *   restricted by GSA ADP Schedule Contract with IBM Corp.                     *
  16. *******************************************************************************/
  17.  
  18. #ifndef _IVBVPART_
  19.   #include <ivbvpart.hpp>
  20. #endif
  21.  
  22. /*----------------------------------------------------------------------------*/
  23. /* Align classes on four byte boundary.                                       */
  24. /*----------------------------------------------------------------------------*/
  25. #pragma pack(4)
  26.  
  27. template < class Element >
  28. class IVBVariablePartPointer : public IVBVariablePartBase
  29. {
  30. public:
  31. /*--------------------------- PUBLIC -----------------------------------------*/
  32.  
  33. /*------------------------ Constructors ----------------------------------------
  34. | You can construct an instance of this class in the following ways:           |
  35.  -----------------------------------------------------------------------------*/
  36.   IVBVariablePartPointer ();
  37.  
  38. virtual
  39.   ~IVBVariablePartPointer ();
  40.  
  41. /*-------------------------------- Attributes ----------------------------------
  42. | These operations can be used to query and change the attributes:             |
  43. |   target            - Query the target attribute.                            |
  44. |   setTarget         - Set the target attribute.                              |
  45. |   targetId          - target attribute notification id.                      |
  46. |   targetPtr         - Query the target attribute as a pointer.               |
  47.  -----------------------------------------------------------------------------*/
  48. Element
  49.   target () const;
  50.  
  51. IVBVariablePartPointer <Element>
  52.  &setTarget (Element newTarget);
  53.  
  54. IVBVariablePartPointer <Element>
  55.  &IVBVariablePartPointer <Element>::deleteTarget ();
  56.  
  57. Element
  58.   targetPtr () const;
  59.  
  60. protected:
  61. IObserver&
  62.   dispatchNotificationEvent  ( const INotificationEvent& anEvent);
  63.  
  64. private:
  65. /*--------------------------------- PRIVATE ----------------------------------*/
  66.   Element iTarget;
  67. };
  68.  
  69. #if ! defined (__TEMPINC__)
  70. #include <ivbvprtp.c>
  71. #endif
  72.  
  73. /*----------------------------------------------------------------------------*/
  74. /* Resume compiler default packing.                                           */
  75. /*----------------------------------------------------------------------------*/
  76. #pragma pack()
  77.  
  78. #endif /* _IVBVPRTP_ */
  79.