engine/time/source/WorldTimeKeeper.cpp
// Do the actual serialization of the observers map
Do the actual serialization of the observers map
Do the actual serialization of the observers map
bool WorldTimeKeeper::serialize_observers(ostream& stream) const
{
  Serialize::write_size_t(stream, observers.size());
  for (const WorldTimeKeeperObserverMap::value_type& observer_pair : observers)
  {
    Serialize::write_uint(stream, observer_pair.first);
    TimeObserverMap pair_second = observer_pair.second;
    Serialize::write_size_t(stream, pair_second.size());
    for (const TimeObserverMap::value_type& time_observer_pair : pair_second)
    {
      string time_observer_first = time_observer_pair.first;
      ITimeObserverPtr time_observer_ptr = time_observer_pair.second;
      Serialize::write_string(stream, time_observer_first);
      Serialize::write_class_id(stream, time_observer_ptr->get_class_identifier());
      time_observer_ptr->serialize(stream);
    }
  }
  return true;
}
bool WorldTimeKeeper :: serialize_observers ( ostream & stream ) const { Serialize :: write_size_t ( stream , observers . size ( ) ) ; for ( const WorldTimeKeeperObserverMap :: value_type & observer_pair : observers ) { Serialize :: write_uint ( stream , observer_pair . first ) ; TimeObserverMap pair_second = observer_pair . second ; Serialize :: write_size_t ( stream , pair_second . size ( ) ) ; for ( const TimeObserverMap :: value_type & time_observer_pair : pair_second ) { string time_observer_first = time_observer_pair . first ; ITimeObserverPtr time_observer_ptr = time_observer_pair . second ; Serialize :: write_string ( stream , time_observer_first ) ; Serialize :: write_class_id ( stream , time_observer_ptr -> get_class_identifier ( ) ) ; time_observer_ptr -> serialize ( stream ) ; } } return true ; }
Do the actual serialization of the observers map
Do the actual serialization of the observers map