Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

58 lines
1.2 KiB

  1. //+-------------------------------------------------------------------------
  2. //
  3. // Microsoft Windows
  4. // Copyright (C) Microsoft Corporation, 1994 - 1998.
  5. //
  6. // File: SizeSer.hxx
  7. //
  8. // Contents: Class to compute size of serialized structure.
  9. //
  10. // History: 28-Jul-94 KyleP Created
  11. //
  12. //--------------------------------------------------------------------------
  13. #pragma once
  14. #include <sstream.hxx>
  15. class CSizeSerStream : public PSerStream
  16. {
  17. public:
  18. CSizeSerStream();
  19. virtual ~CSizeSerStream();
  20. virtual void PutByte( BYTE b );
  21. virtual void PutChar( char const * pc, ULONG cc );
  22. virtual void PutWChar( WCHAR const * pwc, ULONG cc );
  23. virtual void PutUShort( USHORT us );
  24. virtual void PutULong( ULONG ul );
  25. virtual void PutLong( long l );
  26. virtual void PutFloat( float f );
  27. virtual void PutDouble( double d );
  28. virtual void PutString( char const * psz );
  29. virtual void PutWString( WCHAR const * pwsz );
  30. virtual void PutBlob( BYTE const * pb, ULONG cb );
  31. virtual void PutGUID( GUID const & guid );
  32. virtual void PutULONGLONG( ULONGLONG ul )
  33. {}
  34. inline unsigned Size() { return _cb; }
  35. protected:
  36. unsigned _cb;
  37. };