home *** CD-ROM | disk | FTP | other *** search
/ Power GUI Programming with VisualAge C++ / powergui.iso / trialva / ibmcppw / smarts / ole / wizclass.ht < prev    next >
Encoding:
Text File  |  1996-02-21  |  4.0 KB  |  145 lines

  1. --------------------------------------------------------------------------------
  2. -- FILE NAME: WIZCLASS.HT
  3. --
  4. -- DESCRIPTION:
  5. --   OLE Compound Document Framework class file template
  6. --
  7. -- COPYRIGHT:
  8. --   IBM Open Class Library
  9. --   (C) Copyright International Business Machines Corporation 1992, 1996
  10. --   Licensed Material - Program-Property of IBM - All Rights Reserved.
  11. --   US Government Users Restricted Rights - Use, duplication, or disclosure
  12. --   restricted by GSA ADP Schedule Contract with IBM Corp.
  13. --
  14. --------------------------------------------------------------------------------
  15. --------------------------------------------------------------------------------
  16. -- Basic class template
  17. --------------------------------------------------------------------------------
  18. <include wizfile.ht>
  19. <code CLASS>
  20. <define FILE_HDR_CLASSES>
  21. //----------------------------------------------------------------------
  22. //  $CLASS_NAME$
  23. //----------------------------------------------------------------------
  24.  
  25. class $CLASS_NAME$ \<>
  26. <if ($CLASS_SUPERS$)> :
  27. </if>
  28. <repeat CLASS_SUPERS separate ,>
  29.   public $CLASS_SUPERS$
  30. </repeat>
  31. {
  32. <if ($PUBLIC_MACROS$)>
  33. public:
  34. $PUBLIC_MACROS$
  35. </if>
  36. <if ($PUBLIC_MEMBERS$)>
  37. public:
  38. $PUBLIC_MEMBERS$
  39. </if>
  40. <if ($PROTECTED_MEMBERS$)>
  41. protected:
  42. $PROTECTED_MEMBERS$
  43. </if>
  44. <if ($PRIVATE_MEMBERS$)>
  45. private:
  46. $PRIVATE_MEMBERS$
  47. </if>
  48. <if ($DATA_MEMBERS$)>
  49. private:
  50. $DATA_MEMBERS$\<>
  51. </if>
  52. };
  53.  
  54. </define>
  55. <clear CLASS_NAME>
  56. <clear CLASS_SUPERS>
  57. <clear PUBLIC_MACROS>
  58. <clear PUBLIC_MEMBERS>
  59. <clear PROTECTED_MEMBERS>
  60. <clear PRIVATE_MEMBERS>
  61. <clear DATA_MEMBERS>
  62. </code CLASS>
  63.  
  64. -------------------------------------------------------------------------------
  65. -- Standard operations template
  66. --------------------------------------------------------------------------------
  67. --
  68. -- options: 
  69. --    PROTECT_CONSTRUCT - if defined protect default constructor
  70. --    PROTECT_COPY      - if defined protect copy constructor
  71. --    ASSIGNMENT        - if defined puts operator= in public else in private
  72. --
  73. <code STANDARD_OPERATIONS>
  74. -- public members
  75. <define PUBLIC_MEMBERS>
  76. --<if ($PUBLIC_MEMBERS$)>
  77. --</if>
  78. <if (!$PROTECT_CONSTRUCT$)>
  79.                             $CLASS_NAME$();
  80. </if>
  81. <if (!$PROTECT_COPY$)>
  82.                             $CLASS_NAME$( const $CLASS_NAME$& copy );
  83. </if>
  84.     virtual                 ~$CLASS_NAME$();
  85. <if ($ASSIGNMENT$)>
  86.     $CLASS_NAME$& operator=( const $CLASS_NAME$& copy );
  87. </if>
  88. </define>
  89. -- protected members
  90. <define PROTECTED_MEMBERS>
  91. <if ($PROTECT_CONSTRUCT$)>
  92. <if ($NO_DEF_CONSTRUCT$ != t)>
  93.                             $CLASS_NAME$();
  94. </if>
  95. </if>
  96. <if ($PROTECT_COPY$)>
  97. <if ($NO_COPY_CONSTRUCT$ != t)>
  98.                             $CLASS_NAME$( const $CLASS_NAME$& copy );
  99. </if>
  100. </if>
  101. </define>
  102. -- private members
  103. <define PRIVATE_MEMBERS>
  104. <if (!$ASSIGNMENT$)>
  105.     // Hide assignment operator
  106.     $CLASS_NAME$& operator=( const $CLASS_NAME$& copy );
  107. </if>
  108. </define>
  109. <clear PROTECT_CONSTRUCT>
  110. <clear PROTECT_COPY>
  111. <clear ASSIGNMENT>
  112. <clear NO_DEF_CONSTRUCT>
  113. <clear NO_COPY_CONSTRUCT>
  114. </code STANDARD_OPERATIONS>
  115.  
  116. -------------------------------------------------------------------------------
  117. -- Streaming operators template
  118. --------------------------------------------------------------------------------
  119. <code STREAMING>
  120. $TYPE_EXTENSION$\<>
  121. -- public members
  122. <define PUBLIC_MEMBERS>
  123.  
  124.     virtual IBaseStream&    operator>>=( IBaseStream& toWhere ) const;
  125.     virtual IBaseStream&    operator<<=( IBaseStream& fromWhere );
  126. </define>
  127. -- private members
  128. <define PRIVATE_MEMBERS>
  129.     enum                    { kOriginalVersion };
  130. </define>
  131. </code STREAMING>
  132.  
  133. -------------------------------------------------------------------------------
  134. -- Extended type template
  135. --------------------------------------------------------------------------------
  136. <code TYPE_EXTENSION>
  137. -- public macros
  138. <if (!$PUBLIC_MACROS$)>
  139. <define PUBLIC_MACROS>
  140.     TypeExtensionDeclarationsMacro($CLASS_NAME$)
  141. </define>
  142. </if>
  143. $STANDARD_OPERATIONS$\<>
  144. </code TYPE_EXTENSION>
  145.