📄 initsender.h
字号:
stuff like velocity, stamina, etc */ const Player& M_self; const Stadium& M_stadium; };/*!//===================================================================//// CLASS: InitSenderPlayerV1//// DESC: version 1 of the init protocol.////===================================================================*/ class InitSenderPlayerV1 : public InitSenderPlayer { public: InitSenderPlayerV1( const Params& params ); protected: InitSenderPlayerV1( const Params& params, const boost::shared_ptr< InitSenderCommon > common ); public: virtual ~InitSenderPlayerV1(); virtual void sendInit(); virtual void sendReconnect(); virtual void sendScore(); virtual void sendChangedPlayers(); };/*!//===================================================================//// CLASS: InitSenderPlayerV7//// DESC: version 7 of the init protocol.////===================================================================*/ class InitSenderPlayerV7 : public InitSenderPlayerV1 { public: InitSenderPlayerV7( const Params& params ); protected: InitSenderPlayerV7( const Params& params, const boost::shared_ptr< InitSenderCommon > common ); public: virtual ~InitSenderPlayerV7(); virtual void sendChangedPlayers(); };/*!//===================================================================//// CLASS: InitSenderPlayerV8//// DESC: version 8 of the init protocol.////===================================================================*/ class InitSenderPlayerV8 : public InitSenderPlayerV7 { public: InitSenderPlayerV8( const Params& params ); protected: InitSenderPlayerV8( const Params& params, const boost::shared_ptr< InitSenderCommon > common ); public: virtual ~InitSenderPlayerV8(); }; /*!//===================================================================//// CLASS: InitSenderOnlineCoach//// DESC: Base class for the init protocol for online coaches.////===================================================================*/ class InitSenderOnlineCoach : public InitSender { public: typedef InitSenderOnlineCoach Base; class Params { public: std::ostream& m_transport; const OnlineCoach& m_self; const Stadium& m_stadium; const SerializerOnlineCoach& m_ser; Params( std::ostream& transport, const OnlineCoach& self, const Stadium& stadium, const SerializerOnlineCoach& ser ) : m_transport( transport ), m_self( self ), m_stadium( stadium ), m_ser( ser ) {} }; public: typedef std::auto_ptr< rcss::InitSenderOnlineCoach > Ptr; typedef Ptr(*Creator)( const rcss::InitSenderOnlineCoach::Params& ); typedef rcss::lib::Factory< Creator, int > Factory; static Factory& factory(); InitSenderOnlineCoach( const Params& params, const boost::shared_ptr< InitSenderCommon > common ); virtual ~InitSenderOnlineCoach(); protected: const SerializerOnlineCoach& serializer() const { return M_serializer; } const OnlineCoach& self() const { return M_self; } const Stadium& stadium() const { return M_stadium; } private: const SerializerOnlineCoach& M_serializer;/*:TODO: M_self needs to be replaced with a reference to a InitObserver and InitObserver should have virtual functions for stuff like velocity, stamina, etc */ const OnlineCoach& M_self; const Stadium& M_stadium; };/*!//===================================================================//// CLASS: InitSenderOnlineCoachV1//// DESC: version 1 of the init protocol.////===================================================================*/ class InitSenderOnlineCoachV1 : public InitSenderOnlineCoach { public: InitSenderOnlineCoachV1( const Params& params ); protected: InitSenderOnlineCoachV1( const Params& params, const boost::shared_ptr< InitSenderCommon > common ); public: virtual ~InitSenderOnlineCoachV1(); virtual void sendInit(); virtual void sendReconnect(); virtual void sendScore(); virtual void sendChangedPlayers(); };/*!//===================================================================//// CLASS: InitSenderOnlineCoachV6//// DESC: version 6 of the init protocol.////===================================================================*/ class InitSenderOnlineCoachV6 : public InitSenderOnlineCoachV1 { public: InitSenderOnlineCoachV6( const Params& params ); protected: InitSenderOnlineCoachV6( const Params& params, const boost::shared_ptr< InitSenderCommon > common ); public: virtual ~InitSenderOnlineCoachV6(); virtual void sendInit(); };/*!//===================================================================//// CLASS: InitSenderOnlineCoachV7//// DESC: version 7 of the init protocol.////===================================================================*/ class InitSenderOnlineCoachV7 : public InitSenderOnlineCoachV6 { public: InitSenderOnlineCoachV7( const Params& params ); protected: InitSenderOnlineCoachV7( const Params& params, const boost::shared_ptr< InitSenderCommon > common ); public: virtual ~InitSenderOnlineCoachV7(); virtual void sendChangedPlayers(); };/*!//===================================================================//// CLASS: InitSenderOnlineCoachV8//// DESC: version 8 of the init protocol.////===================================================================*/ class InitSenderOnlineCoachV8 : public InitSenderOnlineCoachV7 { public: InitSenderOnlineCoachV8( const Params& params ); protected: InitSenderOnlineCoachV8( const Params& params, const boost::shared_ptr< InitSenderCommon > common ); public: virtual ~InitSenderOnlineCoachV8(); };/*!//===================================================================//// CLASS: InitSenderOfflineCoach//// DESC: Base class for the init protocol for offline coaches.////===================================================================*/ class InitSenderOfflineCoach : public InitSender { public: typedef InitSenderOfflineCoach Base; class Params { public: std::ostream& m_transport; const Coach& m_self; const Stadium& m_stadium; const SerializerCoach& m_ser; Params( std::ostream& transport, const Coach& self, const Stadium& stadium, const SerializerCoach& ser ) : m_transport( transport ), m_self( self ), m_stadium( stadium ), m_ser( ser ) {} }; typedef std::auto_ptr< rcss::InitSenderOfflineCoach > Ptr; typedef Ptr(*Creator)( const rcss::InitSenderOfflineCoach::Params& ); typedef rcss::lib::Factory< Creator, int > Factory; static Factory& factory(); public: InitSenderOfflineCoach( const Params& params, const boost::shared_ptr< InitSenderCommon > common ); public: virtual ~InitSenderOfflineCoach(); protected: const SerializerCoach& serializer() const { return M_serializer; } const Coach& self() const { return M_self; } const Stadium& stadium() const { return M_stadium; } private: const SerializerCoach& M_serializer;/*:TODO: M_self needs to be replaced with a reference to a InitObserver and InitObserver should have virtual functions for stuff like velocity, stamina, etc */ const Coach& M_self; const Stadium& M_stadium; };/*!//===================================================================//// CLASS: InitSenderOfflineCoachV1//// DESC: version 1 of the init protocol.////===================================================================*/ class InitSenderOfflineCoachV1 : public InitSenderOfflineCoach { public: InitSenderOfflineCoachV1( const Params& params ); protected: InitSenderOfflineCoachV1( const Params& params, const boost::shared_ptr< InitSenderCommon > common ); public: virtual ~InitSenderOfflineCoachV1(); virtual void sendInit(); virtual void sendReconnect(); virtual void sendScore(); virtual void sendChangedPlayers(); };/*!//===================================================================//// CLASS: InitSenderOfflineCoachV7//// DESC: version 7 of the init protocol.////===================================================================*/ class InitSenderOfflineCoachV7 : public InitSenderOfflineCoachV1 { public: InitSenderOfflineCoachV7( const Params& params ); protected: InitSenderOfflineCoachV7( const Params& params, const boost::shared_ptr< InitSenderCommon > common ); public: virtual ~InitSenderOfflineCoachV7(); };/*!//===================================================================//// CLASS: InitSenderOfflineCoachV8//// DESC: version 8 of the init protocol.////===================================================================*/ class InitSenderOfflineCoachV8 : public InitSenderOfflineCoachV7 { public: InitSenderOfflineCoachV8( const Params& params ); protected: InitSenderOfflineCoachV8( const Params& params, const boost::shared_ptr< InitSenderCommon > common ); public: virtual ~InitSenderOfflineCoachV8(); };}#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -