home *** CD-ROM | disk | FTP | other *** search
/ Power GUI Programming with VisualAge C++ / powergui.iso / trialva / ibmcppw / macros / lpex.tde < prev    next >
Encoding:
Text File  |  1996-02-22  |  2.1 KB  |  66 lines

  1. --
  2. -- lpex.tde
  3. --
  4. -- This is the master template to be invoked from lpex guides.
  5. -- It includes the appropriate templates according to the macros
  6. -- instantiated by selecting collection classes features.
  7. --
  8. <include key.tde>
  9. <include element.tde>
  10. <include main.tde>
  11. <if ($KEY_PTR$)>
  12. <define KEY_TYPE>$KEY_CLASS$*\</define>
  13. <else>
  14. <define KEY_TYPE>$KEY_CLASS$\</define>
  15. </if>
  16. <if ($ELEMENT_PTR$)>
  17. <define ELEMENT_TYPE>$ELEMENT_CLASS$*\</define>
  18. <else>
  19. <define ELEMENT_TYPE>$ELEMENT_CLASS$\</define>
  20. </if>
  21. //------------------------------------------------------------------------------
  22. // COLLECTION CLASSES: declarations and usage sample
  23. //
  24. // The following is generated by the VisualAge C++ Collection Classes SmartGuide
  25. //------------------------------------------------------------------------------
  26.  
  27. #include <$INCLUDE_NAME$>
  28. #include <iostream.h>
  29. #include <istring.hpp>
  30. ----------------------------------------------------------------
  31. -- Definitions for class KeyType
  32. ----------------------------------------------------------------
  33. <if ($USER_DEFINED_KEY$)>
  34. $DEFINE_KEY$\<>
  35. <else>\<if (($K_HASH_FUNCTION$) & ($KEY_PTR$))>
  36. $DEFINE_K_HASH$\<>
  37. </if>\</if>
  38. ----------------------------------------------------------------
  39. -- Definitions for class ElementType
  40. ----------------------------------------------------------------
  41. <if ($USER_DEFINED_ELEMENT$)>
  42. $DEFINE_ELEMENT$\<>
  43. <else>\<if (($HASH_FUNCTION$) & ($ELEMENT_PTR$))>
  44. $DEFINE_E_HASH$\<>
  45. </if>\</if>
  46. ----------------------------------------------------------------
  47. -- Definitions for the collection class
  48. ----------------------------------------------------------------
  49. $DEFINE_COLLECTION_CLASS$
  50. ----------------------------------------------------------------
  51. -- Sample program
  52. ----------------------------------------------------------------
  53. <if ($GENERATE_MAIN$)>
  54. <define NULL>\</define>
  55.  \<if ($FILE_STEM$ != $NULL$) >
  56.   \<define MAINCPP>$FILE_STEM$.cpp\</define>
  57.    \<outfile $MAINCPP$ new>
  58. #include "$FILE_STEM$.hpp"
  59. $DEFINE_MAIN$\<>
  60.    \</outfile>
  61.  \<else>
  62. $DEFINE_MAIN$\<>
  63.  \</if>
  64. </if>
  65.  
  66.