Added comments.

This commit is contained in:
hiker 2016-01-27 07:39:53 +11:00
parent 560ff7cee4
commit 618248ef4d
2 changed files with 12 additions and 4 deletions

View File

@ -52,7 +52,7 @@ GameSetup::~GameSetup()
void GameSetup::addPlayer(NetworkPlayerProfile* profile) void GameSetup::addPlayer(NetworkPlayerProfile* profile)
{ {
m_players.push_back(profile); m_players.push_back(profile);
Log::info("GameSetup", "New player in the game setup. Race id : %d.", Log::info("GameSetup", "New player in the game setup. Player id : %d.",
profile->getGlobalPlayerId()); profile->getGlobalPlayerId());
} // addPlayer } // addPlayer

View File

@ -78,18 +78,26 @@ public:
Protocol *getProtocol() { return m_protocol; } Protocol *getProtocol() { return m_protocol; }
}; // class ProtocolRequest; }; // class ProtocolRequest;
// ---------------------------------------------------------------------------- // ============================================================================
/** \struct ProtocolRequest /** \struct ProtocolRequest
* \brief Used to pass the event to protocols that need it * \brief Used to pass the event to protocols that need it
*/ */
typedef struct EventProcessingInfo struct EventProcessingInfo
{ {
/** The event to process. */
Event* m_event; Event* m_event;
/** Arrival time of the event. Used to time out events that are not
* handled in time (e.g. because the receiving protocol is not running).*/
double m_arrival_time; double m_arrival_time;
/** The list of protocol ids to which this event can be
* sent to. */
std::vector<unsigned int> m_protocols_ids; std::vector<unsigned int> m_protocols_ids;
} EventProcessingInfo; } EventProcessingInfo;
// ---------------------------------------------------------------------------- // ============================================================================
/** \class ProtocolManager /** \class ProtocolManager
* \brief Manages the protocols at runtime. * \brief Manages the protocols at runtime.
* *