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]);
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.
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.
RegionXY()=default
Constructor.
int y
y-position of the region.
int height
height of the region.