home *** CD-ROM | disk | FTP | other *** search
/ Power GUI Programming with VisualAge C++ / powergui.iso / trialva / ibmcppw / samples / som / somk / c / tp / word.idl < prev   
Encoding:
Text File  |  1996-01-24  |  1.7 KB  |  80 lines

  1. /*
  2.  *    %Z% %I% %W% %G% %U% [%H% %T%] (c)IBM Corp. 1992
  3.  */
  4.  
  5. // This file was generated by the SOM Compiler.
  6. // FileName: word.id2.
  7. // Generated using:
  8. //     SOM Precompiler spc: 6.9
  9. //     SOM Emitter emitidl.dll: 6.8
  10.  
  11. //  This class is adapted from the book
  12. //    Class Construction in C and C++, Object Oriented Fundamentals
  13. //    by Roger Sessions, Copyright (c) 1992 Prentice Hall.
  14. //  Reprinted with permission.
  15.  
  16. #ifndef word_idl
  17. #define word_idl
  18.  
  19. #include "bt.idl"
  20.  
  21. interface word : baseType
  22. {
  23.   word wordInit1(in string newWord);
  24.   
  25.   // Initialize a word with a character string.
  26.  
  27.   word wordInit2(in char newChar, 
  28.                  in long count);
  29.   
  30.   // Initialize a word with a character and
  31.   // count.  The new word will contain a null
  32.   // terminated buffer containing count number of
  33.   // newChars.
  34.  
  35.   readonly attribute long length;
  36.   // The length of a word.
  37.  
  38.   long wordToInt();
  39.   
  40.   // Translate a word to an integer, such as "123" to 123.
  41.  
  42.   void wrdReplace(in string newWord);
  43.   
  44.   // Replace the contents of a word by another word.
  45.  
  46.  
  47.  
  48. #ifdef __SOMIDL__
  49.   implementation {
  50.  
  51.     releaseorder: wordInit1,wordInit2,_get_length,wordToInt,wrdReplace;
  52.  
  53.     //# Class Modifiers
  54.     callstyle = oidl;
  55.     local; 
  56.     filestem = word;
  57.  
  58.     passthru C_h =      "void showWordStats();";
  59.  
  60.  
  61.     //# Internal Instance Variables
  62.     string storage;               
  63.  
  64.     //# Method Modifiers
  65.     match: override;
  66.     print: override;
  67.     somInit: override;
  68.     somUninit: override;
  69.     somDumpSelfInt: override;
  70.  
  71.     //# Data Modifiers
  72.     storage: ;
  73.     length: ;
  74.  
  75.   };
  76. #endif /* __SOMIDL__ */
  77. };
  78.  
  79. #endif  /* word_idl */
  80.