16
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-07-19 04:19:19 +02:00

basic scenery data export in legacy text format

This commit is contained in:
tmj-fstate
2018-06-13 16:51:57 +02:00
parent e3f7ea33b3
commit 457de678c3
27 changed files with 1383 additions and 309 deletions

View File

@@ -164,6 +164,41 @@ void TMemCell::AssignEvents(TEvent *e)
OnSent = e;
};
// serialize() subclass details, sends content of the subclass to provided stream
void
TMemCell::serialize_( std::ostream &Output ) const {
// TODO: implement
}
// deserialize() subclass details, restores content of the subclass from provided stream
void
TMemCell::deserialize_( std::istream &Input ) {
// TODO: implement
}
// export() subclass details, sends basic content of the class in legacy (text) format to provided stream
void
TMemCell::export_as_text_( std::ostream &Output ) const {
// header
Output << "memcell ";
// location
Output
<< location().x << ' '
<< location().y << ' '
<< location().z << ' '
// cell data
<< szText << ' '
<< fValue1 << ' '
<< fValue2 << ' '
// associated track
<< ( asTrackName.empty() ? "none" : asTrackName ) << ' '
// footer
<< "endmemcell"
<< "\n";
}
// legacy method, initializes traction after deserialization from scenario file