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

network fixes and improvements, code refactoring

This commit is contained in:
milek7
2019-02-03 23:24:34 +01:00
parent 05ba7c653b
commit 85ad17af3c
29 changed files with 383 additions and 295 deletions

View File

@@ -26,9 +26,12 @@ public:
update( double Deltatime, int Iterationcount );
void
update_clocks();
// restores simulation data from specified file. returns: true on success, false otherwise
bool
deserialize( std::string const &Scenariofile );
// starts deserialization from specified file, returns context pointer on success, throws otherwise
std::shared_ptr<deserializer_state>
deserialize_begin(std::string const &Scenariofile);
// continues deserialization for given context, amount limited by time, returns true if needs to be called again
bool
deserialize_continue(std::shared_ptr<deserializer_state> state);
// stores class data in specified file, in legacy (text) format
void
export_as_text( std::string const &Scenariofile ) const;
@@ -63,6 +66,8 @@ extern TTrain *Train;
extern uint16_t prev_train_id;
extern bool is_ready;
class deserializer_state;
} // simulation
//---------------------------------------------------------------------------