本文整理汇总了C++中discard_event函数的典型用法代码示例。如果您正苦于以下问题:C++ discard_event函数的具体用法?C++ discard_event怎么用?C++ discard_event使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了discard_event函数的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: TraceLogger
boost::statechart::result QuittingGame::react(const ShutdownServer& u) {
TraceLogger(FSM) << "(HumanClientFSM) QuittingGame.ShutdownServer";
if (!m_server_process) {
ErrorLogger(FSM) << "m_server_process is nullptr";
post_event(TerminateServer());
return discard_event();
}
if (m_server_process->Empty()) {
if (Client().Networking().IsTxConnected()) {
WarnLogger(FSM) << "Disconnecting from server that is already killed.";
Client().Networking().DisconnectFromServer();
}
post_event(TerminateServer());
return discard_event();
}
if (Client().Networking().IsTxConnected()) {
DebugLogger(FSM) << "Sending server shutdown message.";
Client().Networking().SendMessage(ShutdownServerMessage());
post_event(WaitForDisconnect());
} else {
post_event(TerminateServer());
}
return discard_event();
}
开发者ID:matt474,项目名称:freeorion,代码行数:29,代码来源:HumanClientFSM.cpp
示例2: assert
boost::statechart::result WaitingForTurnData::react(const CombatStart& msg) {
// HACK! I get some long and inscrutable error message if
// WaitingForTurnData doesn't have a CombatStart handler, even though
// WaitingForTurnDataImpl actually handles this message.
assert(!"Function WaitingForTurnData.CombatStart should never be called!");
return discard_event();
}
开发者ID:anarsky,项目名称:freeorion,代码行数:7,代码来源:HumanClientFSM.cpp
示例3: discard_event
sc::result GettingFeedback::react(const EvMotionCompleted&)
{
// Since the build head is now in the physical home position,
// (even though we're not yet in the Home state), disengage the motors.
PRINTENGINE->DisableMotors();
return discard_event();
}
开发者ID:lineuve,项目名称:ember-firmware,代码行数:7,代码来源:PrinterStateMachine.cpp
示例4: ExtractMessageData
boost::statechart::result MPLobby::react(const LobbyUpdate& msg) {
if (TRACE_EXECUTION) Logger().debugStream() << "(HumanClientFSM) MPLobby.LobbyUpdate";
MultiplayerLobbyData lobby_data;
ExtractMessageData(msg.m_message, lobby_data);
Client().m_ui->GetMultiPlayerLobbyWnd()->LobbyUpdate(lobby_data);
return discard_event();
}
开发者ID:anarsky,项目名称:freeorion,代码行数:7,代码来源:HumanClientFSM.cpp
示例5: DebugLogger
boost::statechart::result WaitingForTurnData::react(const SaveGameDataRequest& msg) {
if (TRACE_EXECUTION) DebugLogger() << "(HumanClientFSM) WaitingForTurnData.SaveGameDataRequest";
DebugLogger() << "Sending Save Game Data to Server";
Client().GetClientUI()->GetMessageWnd()->HandleGameStatusUpdate(UserString("SERVER_SAVE_INITIATE_ACK") + "\n");
Client().HandleSaveGameDataRequest();
return discard_event();
}
开发者ID:Ouaz,项目名称:freeorion,代码行数:7,代码来源:HumanClientFSM.cpp
示例6: FCPPT_TEXT
boost::statechart::result
insula::states::finished::react(
events::render const &r)
{
context<game_outer>().react(
r);
context<game_inner>().react(
r);
fcppt::string const s =
context<game_outer>().players_left()
?
FCPPT_TEXT("Press enter for next player")
:
FCPPT_TEXT("Press enter for the score board");
sge::font::draw_text(
context<game_outer>().large_font(),
context<game_outer>().font_drawer(),
FCPPT_TEXT("Great job!\n")+s,
sge::font::pos::null(),
fcppt::math::dim::structure_cast<sge::font::dim>(
context<machine>().systems().renderer()->screen_size()),
sge::font::align_h::center,
sge::font::align_v::center,
sge::font::flags::none);
return discard_event();
}
开发者ID:pmiddend,项目名称:insula,代码行数:30,代码来源:finished.cpp
示例7: react
boost::statechart::result react( common::CTransactionAckEvent const & _transactionAckEvent )
{
if ( _transactionAckEvent.m_status == common::TransactionsStatus::Invalid )
{
context< CEnterNetworkAction >().setExit();
}
else
{
common::CAdmitProof admitProof;
admitProof.m_proofTransactionHash = _transactionAckEvent.m_transactionSend.GetHash();
context< CEnterNetworkAction >().addRequest(
new common::CSendMessageRequest(
common::CPayloadKind::AdmitProof
, admitProof
, context< CEnterNetworkAction >().getActionKey()
, new CByKeyMediumFilter( context< CEnterNetworkAction >().getPartnerKey() ) ) );
context< CEnterNetworkAction >().addRequest(
new common::CTimeEventRequest(
WaitTime
, new CMediumClassFilter( common::CMediumKinds::Time ) ) );
}
return discard_event();
}
开发者ID:salivan-ratcoin-dev-team,项目名称:dims,代码行数:26,代码来源:enterNetworkAction.cpp
示例8: post_event
//--------------------FIRST RESPONDER------------------------------
sc::result Running::react( const EvCheckCellData & ){
post_event(EvCellStateChart_CellCycleUpdate());
post_event(EvCellStateChart_GLD1Update());
post_event(EvCellStateChart_LAG1Update());
post_event(EvCellStateChart_GLP1Update());
post_event(EvCellStateChart_LifeUpdate());
return discard_event();
};
开发者ID:KathrynA,项目名称:ChasteElegansProject,代码行数:9,代码来源:VaryingCycleDurationStatechartModel.cpp
示例9: react
sc::result react( const EvCheckCtorArgs & ev )
{
BOOST_REQUIRE( ev.expectedArgs_ == outermost_context().CtorArgs() );
outermost_context_type & machine = outermost_context();
machine.my_scheduler().queue_event(
machine.my_handle(), MakeEvent( new EvTerminate() ) );
return discard_event();
}
开发者ID:0xDEC0DE8,项目名称:mcsema,代码行数:8,代码来源:FifoSchedulerTest.cpp
示例10: ExtractMessageData
boost::statechart::result PlayingGame::react(const TurnProgress& msg) {
if (TRACE_EXECUTION) DebugLogger() << "(HumanClientFSM) PlayingGame.TurnProgress";
Message::TurnProgressPhase phase_id;
ExtractMessageData(msg.m_message, phase_id);
Client().GetClientUI()->GetMessageWnd()->HandleTurnPhaseUpdate(phase_id);
return discard_event();
}
开发者ID:hworpel,项目名称:freeorion,代码行数:9,代码来源:HumanClientFSM.cpp
示例11: TraceLogger
boost::statechart::result MPLobby::react(const CancelMPGameClicked& a)
{
TraceLogger(FSM) << "(HumanClientFSM) MPLobby.CancelMPGameClicked";
// See reaction_transition_note.
auto retval = discard_event();
Client().ResetToIntro();
return retval;
}
开发者ID:MatGB,项目名称:freeorion,代码行数:9,代码来源:HumanClientFSM.cpp
注:本文中的discard_event函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论