home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1997 January: Mac OS SDK / Dev.CD Jan 97 SDK2.toast / Development Kits (Disc 2) / OpenDoc Development Framework / ODFDev / ODF / Found / FWString / SLTxtRun.cpp < prev    next >
Encoding:
C/C++ Source or Header  |  1996-09-17  |  7.1 KB  |  260 lines  |  [TEXT/MPS ]

  1.  
  2. /*
  3.  *  This file was generated by the SOM Compiler.
  4.  *  Generated using: 
  5.  *      SOM Emitter emitxtm.dll: 2.33
  6.  */
  7.  
  8. #include "FWFound.hpp"
  9.  
  10. #ifndef FWSTDDEF_H
  11. #include "FWStdDef.h"
  12. #endif
  13.  
  14. #ifndef PRSTRREP_H
  15. #include "PRStrRep.h"
  16. #endif
  17.  
  18. #ifndef SOM_Module_ODFStringSubsystem_defined
  19. #include "FWTxtTyp.xh"
  20. #endif
  21.  
  22. #ifndef FWODEXCE_H
  23. #include "FWODExce.h"
  24. #endif
  25.  
  26. #define FW_OTextRunReader_Class_Source
  27. #define FW_OTextRunWriter_Class_Source
  28. #define FW_OMemoryRunReader_Class_Source
  29. #define FW_OMemoryRunWriter_Class_Source
  30. #include "SLTxtRun.xih"
  31.  
  32. #ifdef FW_BUILD_WIN
  33. #define corbastring string
  34. #endif
  35.  
  36. //========================================================================================
  37. // FW_OTextRunReader
  38. //========================================================================================
  39.  
  40. SOM_Scope corbastring  SOMLINK FW_OTextRunReader__GetCurrentRun(FW_OTextRunReader *somSelf, Environment *ev,
  41.         FW_ByteCount* length,
  42.         FW_Locale* locale)
  43. {
  44. FW_UNUSED(somSelf);
  45. FW_UNUSED(ev);
  46. FW_UNUSED(locale);
  47. FW_UNUSED(length);
  48.     FW_PRIV_ASSERT(Subclass_Responsibility);
  49.     return 0;
  50. }
  51.  
  52. SOM_Scope boolean  SOMLINK FW_OTextRunReader__NextRun(FW_OTextRunReader *somSelf, Environment *ev)
  53. {
  54. FW_UNUSED(somSelf);
  55. FW_UNUSED(ev);
  56.     FW_PRIV_ASSERT(Subclass_Responsibility);
  57.     return false;
  58. }
  59.  
  60. SOM_Scope boolean  SOMLINK FW_OTextRunReader__PreviousRun(FW_OTextRunReader *somSelf, Environment *ev)
  61. {
  62. FW_UNUSED(somSelf);
  63. FW_UNUSED(ev);
  64.     FW_PRIV_ASSERT(Subclass_Responsibility);
  65.     return false;
  66. }
  67.  
  68. SOM_Scope FW_ByteCount  SOMLINK FW_OTextRunReader__GetTotalLength(FW_OTextRunReader *somSelf, Environment *ev)
  69. {
  70. FW_UNUSED(somSelf);
  71. FW_UNUSED(ev);
  72.     FW_PRIV_ASSERT(Subclass_Responsibility);
  73.     return 0;
  74. }
  75.  
  76. //========================================================================================
  77. // FW_OTextRunWriter
  78. //========================================================================================
  79.  
  80. SOM_Scope corbastring  SOMLINK FW_OTextRunWriter__GetCurrentRun(FW_OTextRunWriter *somSelf, Environment *ev,
  81.         FW_ByteCount* length)
  82. {
  83. FW_UNUSED(somSelf);
  84. FW_UNUSED(ev);
  85. FW_UNUSED(length);
  86.     FW_PRIV_ASSERT(Subclass_Responsibility);
  87.     return 0;
  88. }
  89.  
  90. SOM_Scope void  SOMLINK FW_OTextRunWriter__FlushRun(FW_OTextRunWriter *somSelf, Environment *ev,
  91.         corbastring buffer,
  92.         FW_ByteCount bytesToFlush)
  93. {
  94. FW_UNUSED(somSelf);
  95. FW_UNUSED(ev);
  96. FW_UNUSED(buffer);
  97. FW_UNUSED(bytesToFlush);
  98.     FW_PRIV_ASSERT(Subclass_Responsibility);
  99. }
  100.  
  101. SOM_Scope boolean  SOMLINK FW_OTextRunWriter__NewRun(FW_OTextRunWriter *somSelf, Environment *ev,
  102.         FW_Locale* locale)
  103. {
  104. FW_UNUSED(somSelf);
  105. FW_UNUSED(ev);
  106. FW_UNUSED(locale);
  107.     FW_PRIV_ASSERT(Subclass_Responsibility);
  108.     return false;
  109. }
  110.  
  111. //========================================================================================
  112. // FW_OMemoryRunReader
  113. //========================================================================================
  114.  
  115. SOM_Scope FW_OMemoryRunReader*  SOMLINK FW_OMemoryRunReader__Initialize(FW_OMemoryRunReader *somSelf, Environment *ev,
  116.         corbastring buffer,
  117.         FW_ByteCount length)
  118. {
  119.     FW_OMemoryRunReaderData *somThis = FW_OMemoryRunReaderGetData(somSelf);
  120.     return FW_OMemoryRunReader__InitWithLocale(somSelf, ev, buffer, length, NULL);
  121. }
  122.  
  123. SOM_Scope FW_OMemoryRunReader*  SOMLINK FW_OMemoryRunReader__InitWithLocale(FW_OMemoryRunReader *somSelf, Environment *ev,
  124.         corbastring buffer,
  125.         FW_ByteCount length,
  126.         FW_Locale* locale)
  127. {
  128. FW_UNUSED(ev);
  129.     FW_OMemoryRunReaderData *somThis = FW_OMemoryRunReaderGetData(somSelf);    
  130.     somThis->fBuffer = buffer;
  131.     somThis->fLength = length;
  132.     if (locale)
  133.         somThis->fLocale = *locale;
  134.     else
  135.     {
  136. //        somThis->fLocale.fScriptCode = 0;
  137. //        somThis->fLocale.fLangCode = 0;
  138.         somThis->fLocale = FW_PrivGetDefaultLocale();
  139.     }
  140.     return somSelf;
  141. }
  142.  
  143. SOM_Scope void  SOMLINK FW_OMemoryRunReader__somInit(FW_OMemoryRunReader *somSelf)
  144. {
  145.     FW_OMemoryRunReaderData *somThis = FW_OMemoryRunReaderGetData(somSelf);
  146. //    FW_OMemoryRunReader_parent_FW_OTextRunReader_somInit(somSelf);
  147.     somThis->fBuffer = 0;
  148.     somThis->fLength = 0;
  149. }
  150.  
  151. SOM_Scope void  SOMLINK FW_OMemoryRunReader__somUninit(FW_OMemoryRunReader *somSelf)
  152. {
  153. FW_UNUSED(somSelf);
  154. //    FW_OMemoryRunReader_parent_FW_OTextRunReader_somUninit(somSelf);
  155. }
  156.  
  157. SOM_Scope corbastring  SOMLINK FW_OMemoryRunReader__GetCurrentRun(FW_OMemoryRunReader *somSelf, Environment *ev,
  158.         FW_ByteCount* length,
  159.         FW_Locale* locale)
  160. {
  161. FW_UNUSED(ev);
  162.     FW_OMemoryRunReaderData *somThis = FW_OMemoryRunReaderGetData(somSelf);
  163.     *length = somThis->fLength;
  164.     *locale = somThis->fLocale;
  165.     return somThis->fBuffer;
  166. }
  167.  
  168. SOM_Scope boolean  SOMLINK FW_OMemoryRunReader__NextRun(FW_OMemoryRunReader *somSelf, Environment *ev)
  169. {
  170. FW_UNUSED(ev);
  171. FW_UNUSED(somSelf);
  172.     return false;
  173. }
  174.  
  175. SOM_Scope boolean  SOMLINK FW_OMemoryRunReader__PreviousRun(FW_OMemoryRunReader *somSelf, Environment *ev)
  176. {
  177. FW_UNUSED(ev);
  178. FW_UNUSED(somSelf);
  179.     return false;
  180. }
  181.  
  182. SOM_Scope FW_ByteCount  SOMLINK FW_OMemoryRunReader__GetTotalLength(FW_OMemoryRunReader *somSelf, Environment *ev)
  183. {
  184. FW_UNUSED(ev);
  185.     FW_OMemoryRunReaderData *somThis = FW_OMemoryRunReaderGetData(somSelf);
  186.     return somThis->fLength;
  187. }
  188.  
  189. //========================================================================================
  190. // FW_OMemoryRunWriter
  191. //========================================================================================
  192.  
  193. SOM_Scope FW_OMemoryRunWriter*  SOMLINK FW_OMemoryRunWriter__Initialize(FW_OMemoryRunWriter *somSelf, Environment *ev,
  194.         corbastring buffer,
  195.         FW_ByteCount capacity)
  196. {
  197. FW_UNUSED(ev);
  198.     FW_OMemoryRunWriterData *somThis = FW_OMemoryRunWriterGetData(somSelf);
  199.     somThis->fBuffer = buffer;
  200.     somThis->fCapacity = capacity;
  201.     return somSelf;
  202. }
  203.  
  204. SOM_Scope void  SOMLINK FW_OMemoryRunWriter__somInit(FW_OMemoryRunWriter *somSelf)
  205. {
  206.     FW_OMemoryRunWriterData *somThis = FW_OMemoryRunWriterGetData(somSelf);
  207. //   FW_OMemoryRunWriter_parent_FW_OTextRunWriter_somInit(somSelf);
  208.     somThis->fBuffer = 0;
  209.     somThis->fCapacity = 0;
  210. }
  211.  
  212. SOM_Scope void  SOMLINK FW_OMemoryRunWriter__somUninit(FW_OMemoryRunWriter *somSelf)
  213. {
  214. FW_UNUSED(somSelf);
  215. //    FW_OMemoryRunWriter_parent_FW_OTextRunWriter_somUninit(somSelf);
  216. }
  217.  
  218. SOM_Scope corbastring  SOMLINK FW_OMemoryRunWriter__GetCurrentRun(FW_OMemoryRunWriter *somSelf, Environment *ev,
  219.         FW_ByteCount* length)
  220. {
  221. FW_UNUSED(ev);
  222.     FW_OMemoryRunWriterData *somThis = FW_OMemoryRunWriterGetData(somSelf);
  223.     *length = somThis->fCapacity;
  224.     return somThis->fBuffer;
  225. }
  226.  
  227. SOM_Scope void  SOMLINK FW_OMemoryRunWriter__FlushRun(FW_OMemoryRunWriter *somSelf, Environment *ev,
  228.         corbastring buffer,
  229.         FW_ByteCount bytesToFlush)
  230. {
  231. FW_UNUSED(ev);
  232. #ifndef FW_DEBUG
  233. FW_UNUSED(buffer);
  234. FW_UNUSED(bytesToFlush);
  235. #endif
  236.     FW_OMemoryRunWriterData *somThis = FW_OMemoryRunWriterGetData(somSelf);
  237.     FW_PRIV_ASSERT(somThis->fBuffer <= buffer);
  238.     FW_PRIV_ASSERT(buffer+bytesToFlush <= somThis->fBuffer+somThis->fCapacity);
  239.     // Nothing to do
  240. }
  241.  
  242. SOM_Scope boolean  SOMLINK FW_OMemoryRunWriter__NewRun(FW_OMemoryRunWriter *somSelf, Environment *ev,
  243.         FW_Locale* locale)
  244. {
  245. FW_UNUSED(ev);
  246. FW_UNUSED(somSelf);
  247. FW_UNUSED(locale);
  248.     return false;
  249. }
  250.  
  251. SOM_Scope void  SOMLINK FW_OTextRunWriter__GetLocale(FW_OTextRunWriter* somSelf, Environment* ev,
  252.         FW_Locale* locale)
  253. {
  254. FW_UNUSED(somSelf);
  255. FW_UNUSED(ev);
  256. //    locale->fScriptCode = 0;
  257. //    locale->fLangCode = 0;
  258.     *locale = FW_PrivGetDefaultLocale();
  259. }
  260.