46 void read (std::istream & stream, Type & value)
48 stream.read (
reinterpret_cast<char*
> (&value),
sizeof(value));
53 void read (std::istream & stream, Type * value,
int nr_values)
55 for (
int value_index = 0; value_index < nr_values; ++value_index)
57 read (stream, value[value_index]);
63 void write (std::ostream & stream, Type value)
65 stream.write (
reinterpret_cast<char*
> (&value),
sizeof (value));
70 void write (std::ostream & stream, Type * value,
int nr_values)
72 for (
int value_index = 0; value_index < nr_values; ++value_index)
74 write (stream, value[value_index]);
84 RegionXY () : x (0), y (0), width (0), height (0) {}
102 write (stream, width);
103 write (stream, height);
113 read (stream, width);
114 read (stream, height);