home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / cset21v1.zip / IBMCPP / IBMCLASS / IRESLIB.INL < prev    next >
Text File  |  1993-10-22  |  4KB  |  90 lines

  1. #ifndef _IRESLIB_INL_
  2. #define _IRESLIB_INL_ 0
  3. /*******************************************************************************
  4. * FILE NAME: ireslib.inl                                                       *
  5. *                                                                              *
  6. * DESCRIPTION:                                                                 *
  7. *   This file contains the definition of the inline functions for the          *
  8. *   class(es) declared in ireslib.hpp.                                         *
  9. *                                                                              *
  10. * COPYRIGHT:                                                                   *
  11. *   Licensed Materials - Property of IBM                                       *
  12. *   (C) Copyright IBM Corporation 1992, 1993                                   *
  13. *   All Rights Reserved                                                        *
  14. *   US Government Users Restricted Rights - Use, duplication, or               *
  15. *   disclosure                                                                 *
  16. *   restricted by GSA ADP Schedule Contract with IBM Corp.                     *
  17. *                                                                              *
  18. *******************************************************************************/
  19. #ifndef _IRESLIB_
  20.   #undef  _IRESLIB_INL_
  21.   #define _IRESLIB_INL_ 1
  22.   #include <ireslib.hpp>
  23. #endif
  24.  
  25. #ifndef _IAPP_
  26.   #include <iapp.hpp>
  27. #endif
  28.  
  29. #if _IRESLIB_INL_
  30.   #define inline
  31. #endif
  32.  
  33. /*----------------------------- IResourceLibrary -----------------------------*/
  34. inline IPointerHandle IResourceLibrary::loadPointer(unsigned long iconId, IBase::Boolean cached) const
  35. /***************************************************************/
  36. /* Load a Pointer.                                             */
  37. /***************************************************************/
  38. { return loadIcon(iconId, cached); }
  39.  
  40. inline IBase::Boolean IResourceLibrary::isOpen() const
  41. /***************************************************************/
  42. /* Return the fact the the library is always open.             */
  43. /***************************************************************/
  44. {
  45.   return true;
  46. }
  47.  
  48. /*------------------------------- IResourceId --------------------------------*/
  49. inline IResourceId :: IResourceId(unsigned long resourceId, const IResourceLibrary& resourceLibrary)
  50.                      : reslibCl(resourceLibrary), ulClId(resourceId)
  51. /***************************************************************/
  52. /* Construct from an IResourceLibrary and Id.                  */
  53. /***************************************************************/
  54. { }
  55.  
  56. inline IResourceId :: IResourceId(unsigned long resourceId, const IDynamicLinkLibrary& dllLibrary)
  57.                      : reslibCl(dllLibrary), ulClId(resourceId)
  58. /***************************************************************/
  59. /* Construct from an IDynamicLinkLibrary and Id.               */
  60. /***************************************************************/
  61. { }
  62.  
  63. inline IResourceId :: IResourceId(unsigned long resourceId)
  64.                        : reslibCl ( IApplication::current().userResourceLibrary() ),
  65.                          ulClId   ( resourceId )
  66. /***************************************************************/
  67. /* Construct a Resource Id from the userResourceLibrary.       */
  68. /***************************************************************/
  69. { }
  70.  
  71. inline const IResourceLibrary& IResourceId::resourceLibrary() const
  72. /***************************************************************/
  73. /* Return the Resource Manager associated with the id.         */
  74. /***************************************************************/
  75. { return reslibCl; }
  76.  
  77. inline IResourceId::operator unsigned long( )   const
  78. /***************************************************************/
  79. /* Return the Resource Id as an unsigned long integer.         */
  80. /***************************************************************/
  81. { return this->ulClId; }
  82.  
  83. inline unsigned long IResourceId::id( )   const
  84. /***************************************************************/
  85. /* Return the Resource Id as an unsigned long integer.         */
  86. /***************************************************************/
  87. { return this->ulClId; }
  88.  
  89. #endif // _IRESLIB_INL_
  90.