~ubuntu-branches/debian/squeeze/stella/squeeze

« back to all changes in this revision

Viewing changes to src/emucore/Serializer.hxx

  • Committer: Bazaar Package Importer
  • Author(s): Luca Falavigna, Franczen Attila, Luca Falavigna
  • Date: 2008-11-08 12:04:12 UTC
  • mfrom: (1.1.3 upstream)
  • Revision ID: james.westby@ubuntu.com-20081108120412-w6xq87vzgokstfey
Tags: 2.6.1-0ubuntu1
[ Franczen Attila ]
* New upstream release (LP: #183571).
* Updated policy to 3.8.0.

[ Luca Falavigna ]
* debian/patches/gcc-4.3: fix FTBFS with gcc-4.3 compiler.

Show diffs side-by-side

added added

removed removed

Lines of Context:
8
8
//  SS  SS   tt   ee      ll   ll  aa  aa
9
9
//   SSSS     ttt  eeeee llll llll  aaaaa
10
10
//
11
 
// Copyright (c) 1995-2005 by Bradford W. Mott and the Stella team
 
11
// Copyright (c) 1995-2008 by Bradford W. Mott and the Stella team
12
12
//
13
13
// See the file "license" for information on usage and redistribution of
14
14
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
15
15
//
16
 
// $Id: Serializer.hxx,v 1.10 2005/12/17 22:48:24 stephena Exp $
 
16
// $Id: Serializer.hxx,v 1.14 2008/02/06 13:45:22 stephena Exp $
17
17
//============================================================================
18
18
 
19
19
#ifndef SERIALIZER_HXX
27
27
  serialized and sent to an output binary file in a system-
28
28
  independent way.
29
29
 
30
 
  All bytes and integers are written as int's.  Strings are
31
 
  written as characters prepended by the length of the string.
32
 
  Boolean values are written using a special pattern.
 
30
  Bytes are written as characters, integers are written as 4 characters
 
31
  (32-bit), strings are written as characters prepended by the length of the
 
32
  string, boolean values are written using a special character pattern.
33
33
 
34
34
  @author  Stephen Anthony
35
 
  @version $Id: Serializer.hxx,v 1.10 2005/12/17 22:48:24 stephena Exp $
 
35
  @version $Id: Serializer.hxx,v 1.14 2008/02/06 13:45:22 stephena Exp $
36
36
*/
37
37
class Serializer
38
38
{
71
71
    bool isOpen(void);
72
72
 
73
73
    /**
74
 
      Writes an int value to the current output stream.
 
74
      Writes an byte value (8-bit) to the current output stream.
 
75
 
 
76
      @param value The byte value to write to the output stream.
 
77
    */
 
78
    void putByte(char value);
 
79
 
 
80
    /**
 
81
      Writes an int value (32-bit) to the current output stream.
75
82
 
76
83
      @param value The int value to write to the output stream.
77
84
    */
96
103
    fstream myStream;
97
104
 
98
105
    enum {
99
 
      TruePattern  = 0xfab1fab2,
100
 
      FalsePattern = 0xbad1bad2
 
106
      TruePattern  = 0xfe,
 
107
      FalsePattern = 0x01
101
108
    };
102
109
};
103
110