Make method write const:
```cpp
void write( std::ofstream& ) const;
```