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);
void read(std::istream &stream, Type &value)
Function for reading data from a stream.
void write(std::ostream &stream, Type value)
Function for writing data to a stream.
Defines a region in XY-space.
int x
x-position of the region.
void deserialize(::std::istream &stream)
Deserializes the object from the specified stream.
int width
width of the region.
void serialize(std::ostream &stream) const
Serializes the object to the specified stream.
int y
y-position of the region.
int height
height of the region.