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]);
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.
void deserialize(::std::istream &stream)
Deserializes the object from the specified stream.
void serialize(std::ostream &stream) const
Serializes the object to the specified stream.
RegionXY()=default
Constructor.