BasicSaveDataWrapper<TData>
A class in Root.Township, Alta.Saving.
Holds a basic save data object along with its serialized bits, so it is only serialized again after it changes.
- Listed in World, chunks and saving
Constructors
| Member | What it is |
|---|---|
BasicSaveDataWrapper() | Creates a BasicSaveDataWrapper with default values. |
Fields
4 private and internal fields
Properties
| Member | What it is |
|---|---|
TData Data { get; set; } | The save data. Setting it marks the cached bits stale. |
Methods
| Member | What it is |
|---|---|
BasicSaveDataWrapper<TData> Clone() | Serializes if needed and returns a copy holding a pooled copy of the bits. The copy's Data is a fresh default object, not the read data. |
void Dispose() | Returns the cached bits array to the shared pool. |
void MarkModified() | Marks the cached bits stale, so the next write serializes Data again. |
void ReadFrom(BinaryReader binary) | Reads the version info and bits, then builds Data from them. |
void WriteTo(BinaryWriter binary) | Serializes Data if stale, then writes the latest version info and the bits. |
Used in
Members of other types that take, return or hold a BasicSaveDataWrapper<TData>: