Container for dumping the savegame (quickly) to memory. More...
Public Member Functions | |
| MemoryDumper () | |
| Initialise our variables. | |
| void | WriteByte (byte b) |
| Write a single byte into the dumper. | |
| void | Flush (SaveFilter *writer) |
| Flush this dumper into a writer. | |
| size_t | GetSize () const |
| Get the size of the memory dump made so far. | |
Data Fields | |
| AutoFreeSmallVector< byte *, 16 > | blocks |
| Buffer with blocks of allocated memory. | |
| byte * | buf |
| Buffer we're going to write to. | |
| byte * | bufe |
| End of the buffer we write to. | |
Container for dumping the savegame (quickly) to memory.
Definition at line 312 of file saveload.cpp.
| MemoryDumper::MemoryDumper | ( | ) | [inline] |
Initialise our variables.
Definition at line 318 of file saveload.cpp.
| void MemoryDumper::Flush | ( | SaveFilter * | writer | ) | [inline] |
Flush this dumper into a writer.
| writer | The filter we want to use. |
Definition at line 342 of file saveload.cpp.
References blocks, SaveFilter::Finish(), GetSize(), MEMORY_CHUNK_SIZE, min(), and SaveFilter::Write().
Referenced by SaveFileToDisk().
| size_t MemoryDumper::GetSize | ( | ) | const [inline] |
Get the size of the memory dump made so far.
Definition at line 361 of file saveload.cpp.
References blocks, buf, bufe, SmallVector< T, S >::Length(), and MEMORY_CHUNK_SIZE.
Referenced by Flush(), and SlAutolength().
| void MemoryDumper::WriteByte | ( | byte | b | ) | [inline] |
Write a single byte into the dumper.
| b | The byte to write. |
Definition at line 326 of file saveload.cpp.
References SmallVector< T, S >::Append(), blocks, buf, bufe, and MEMORY_CHUNK_SIZE.
Referenced by SlWriteByte().
1.7.1