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 / FWABndSt.cpp next >
Encoding:
Text File  |  1996-09-17  |  2.3 KB  |  64 lines  |  [TEXT/MPS ]

  1. //========================================================================================
  2. //
  3. //    File:                FWABndSt.cpp
  4. //    Release Version:    $ ODF 2 $
  5. //
  6. //    Copyright:    (c) 1993 - 1996 by Apple Computer, Inc., all rights reserved.
  7. //
  8. //========================================================================================
  9. // We separate the archiving functions into their own translation units in order to
  10. // enable dead-stripping.
  11.  
  12. #include "FWFound.hpp"
  13.  
  14. #ifndef FWBNDSTR_H
  15. #include "FWBndStr.h"
  16. #endif
  17.  
  18. //========================================================================================
  19. // File scope definitions
  20. //========================================================================================
  21.  
  22. #ifdef FW_BUILD_MAC
  23. #pragma segment Strings
  24. #endif
  25.  
  26. //========================================================================================
  27. //    CLASS FW_CString32
  28. //========================================================================================
  29.  
  30. const FW_ClassTypeConstant FW_LString32 = FW_TYPE_CONSTANT('s','t','3','2');
  31. FW_REGISTER_ARCHIVABLE_CLASS(FW_LString32,    FW_CString32,    FW_CString32::Read,        0, 0, FW_CString::Write)
  32.  
  33. //----------------------------------------------------------------------------------------
  34. // FW_CString32::Read
  35. //----------------------------------------------------------------------------------------
  36.  
  37. void* FW_CString32::Read(FW_CReadableStream& stream, FW_ClassTypeConstant type)
  38. {
  39. FW_UNUSED(type);
  40.     FW_CString32* string = FW_NEW(FW_CString32, ());
  41.     string->PrivRead(stream);
  42.     return string;
  43. }
  44.  
  45. //========================================================================================
  46. //    CLASS FW_CString255
  47. //========================================================================================
  48.  
  49. const FW_ClassTypeConstant FW_LString255 = FW_TYPE_CONSTANT('s','t','2','5');
  50. FW_REGISTER_ARCHIVABLE_CLASS(FW_LString255,    FW_CString255,    FW_CString255::Read,    0, 0, FW_CString::Write)
  51.  
  52. //----------------------------------------------------------------------------------------
  53. // FW_CString255::Read
  54. //----------------------------------------------------------------------------------------
  55.  
  56. void* FW_CString255::Read(FW_CReadableStream& stream, FW_ClassTypeConstant type)
  57. {
  58. FW_UNUSED(type);
  59.     FW_CString255* string = FW_NEW(FW_CString255, ());
  60.     string->PrivRead(stream);
  61.     return string;
  62. }
  63.  
  64.