本文整理匯總了C++中End函數的典型用法代碼示例。如果您正苦於以下問題:C++ End函數的具體用法?C++ End怎麽用?C++ End使用的例子?那麽, 這裏精選的函數代碼示例或許可以為您提供幫助。
在下文中一共展示了End函數的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C++代碼示例。
示例1:
CharMap::~CharMap()
{
for (std::list<CodePage *>::iterator it = Begin(); it != End(); ++it) {
delete *it;
}
}
示例2: End
// Called when another command which requires one or more of the same
// subsystems is scheduled to run
void CollectorFeedWithTimeoutCommand::Interrupted() {
End();
}
示例3: SAFE_DELETE
GameStateShop::~GameStateShop()
{
SAFE_DELETE( cycleCardsButton );
SAFE_DELETE( showCardListButton );
End();
}
示例4: End
// Called when another command which requires one or more of the same
// subsystems is scheduled to run
void DriveStraight::Interrupted() {
End();
}
示例5: End
CTimeMeasuring::~CTimeMeasuring(){
End();
}
示例6: End
T * End (T * end, std::optional<std::vector<T>> & opt) noexcept {
return opt ? End(*opt) : opt;
}
示例7: OnBigWillDied
void OnBigWillDied()
{
GetUnit()->SendChatMessage(CHAT_MSG_MONSTER_SAY, LANG_UNIVERSAL, "The Affray is over!");
End();
}
示例8: Increment
void Increment (string text) { Set_Periods (Dtime (text), Start (), End (), Wrap_Flag ()); }
示例9: End
// Called when another command which requires one or more of the same
// subsystems is scheduled to run
void BSetHaut::Interrupted()
{
End();
}
示例10: End
// Called when another command which requires one or more of the same
// subsystems is scheduled to run
void Shoot::Interrupted() { End(); }
示例11: End
void ChevalAuton::Interrupted()
{
End();
}
示例12: GColor
/*!
@fn int GColor(int ArgC, char * ArgV[])
*/
int GColor(int ArgC, char * ArgV[])
{
if (ArgC <= 2)
{
cerr << endl << endl;
cerr << "Graph Coloring Problem" << endl << endl;
cerr << "Usage:" << endl;
cerr << ArgV[0] << " " << ArgV[1] << " -i MaxIter [-t TabuLength -s RandomSeed]" << endl << endl;
cerr << "Input:" << endl;
cerr << "NumColor EdgeProbability NumVertex, NumEdge EdgeVertexPairs" << endl << endl;
cerr << "Output:" << endl;
cerr << "BestViolation Iteration Time" << endl;
cerr << "MemoryUsedByTheProgram" << endl;
cerr << "TabuLength NumColor EdgeProbability NumVertex, NumEdge EdgeVertexPairs"
"[VertexColors] RandomSeed" << endl;
cerr << endl << endl;
return ExitOnFailure;
}
Dim T = 0; // Tabu size
Itn I = 0; // Max iteration
Rnd theRnd;
for(Idx tIdx = 2; tIdx < castIdx(ArgC); ++tIdx)
{
if (ArgV[tIdx][0] == '-' && ArgV[tIdx][1] == 't')
T = parseN(ArgV[tIdx+1]);
else if (ArgV[tIdx][0] == '-' && ArgV[tIdx][1] == 'i')
I = parseN(ArgV[tIdx+1]);
else if (ArgV[tIdx][0] == '-' && ArgV[tIdx][1] == 's')
theRnd.seed(parseN(ArgV[tIdx+1]));
}
if(!I)
{
cerr << endl;
cerr << "Error in commandline parameter/value. Run only with parameter " << ArgV[1] << " to see usage." << endl;
cerr << endl;
return ExitOnFailure;
}
Dim L; cin >> L; // Num color
Flt P; cin >> P; // Edge probability
Dim V; cin >> V; // Num vertex
Dim E; cin >> E; // Num edges
b1<Int, kmm> Start(E), End(E); // Edges
for(Idx tIdx = 0; tIdx < E; ++tIdx)
{
Int tInt;
cin >> tInt;
Start[tIdx] = tInt - 1; // zero based numbering
cin >> tInt;
End[tIdx] = tInt - 1; // zero based numbering
}
if (!L || eq<Flt>::iof(P,0) || !V || !E)
{
cerr << endl;
cerr << "Error in input values." << endl;
cerr << endl;
return ExitOnFailure;
}
Sys & tSys = Sys::refm(Sys::def());
EvalTi::def(tSys.SysHdl);
HintTi::def(tSys.SysHdl);
QcSv2Tabu::def(tSys.SysHdl, T);
b1<Prm, kmm> tColors(V), tNotEquals(E);
for(Idx tIdx = 0; tIdx < V; ++tIdx)
tColors[tIdx] = Prm(Tv, StatRangeVarVi::def(tSys.SysHdl , 1, L));
for(Idx tIdx = 0; tIdx < E; ++tIdx)
tNotEquals[tIdx] = Prm(Tf, BneuXiFcMi::def(Xv, tSys.SysHdl, tColors[Start[tIdx]], tColors[End[tIdx]]), MasM | MasEn);
Prm TopSum = Prm(Tf, SumXiEFcMiHn::def(Xm | En, tSys.SysHdl, tNotEquals.items(), tNotEquals.itemCount()));
Prm HintHeap = Prm(Tf, Sv2TabuMaxHeapHiFrHi::def(tSys.SysHdl, TopSum));
Hdl const VarSelcHdl = RankedHintVar1Sp::def( tSys.SysHdl, HintHeap);
Hdl const ValSelcHdl = MinVal1StatRangeSdViZi::def( Zm, tSys.SysHdl, TopSum);
MinVal1StatRangeSdViZi::refm(tSys.SysHdl, ValSelcHdl).includeCurrValue(false);
Refc(tTopSum, SumXiEFcMiHn, tSys.SysHdl, TopSum.TermHdl);
tSys.initialiseVarsStatRand(theRnd);
#if CompLazyHalf
Selc::refm(tSys.SysHdl, VarSelcHdl).activate(true);
Selc::refm(tSys.SysHdl, ValSelcHdl).activate(true);
#endif
//.........這裏部分代碼省略.........
示例13: End
// Called when another command which requires one or more of the same
// subsystems is scheduled to run
void MoveForward::Interrupted()
{
End();
}
示例14: End
// Called when another command which requires one or more of the same
// subsystems is scheduled to run
void DrivingWithJoystick::Interrupted()
{
End();
}
示例15: switch
MsgResult RenderDemoDlg::Message(Msg* Message)
{
// See if it is for us
if (IS_OUR_DIALOG_MSG(Message))
{
// it is
DialogMsg* Msg = (DialogMsg*)Message;
// decide what to do
switch (Msg->DlgMsg)
{
// Create message
case DIM_CREATE :
break;
// Close and destroy the dialog
case DIM_COMMIT :
case DIM_CANCEL :
{
Close();
End();
break;
}
case DIM_LFT_BN_CLICKED :
{
// See which button was pressed
if (Msg->GadgetID == _R(IDC_REDRAWBTN))
{
// Toggle the colour
ShowFirst = ShowFirst ? FALSE : TRUE;
// invalidate the gadget with the picture in it
InvalidateGadget(_R(IDC_REDRAW_ME));
}
break;
}
case DIM_REDRAW :
{
// This is where all the redrawing is done
// Which control in the window is sending the redraw message (if there are many
// grdraw controls you can tell which is which from the Gadget ID
if (Msg->GadgetID == _R(IDC_REDRAW_ME))
{
// Draw the redraw_me control in here
// Render this control
RenderControl((ReDrawInfoType*) Msg->DlgMsgParam);
}
else
// there are no other controls that should get a redraw message ever
{
// give out an error in debug builds, ignore in retail builds
ERROR3("Got a redraw message for a control I don't know about");
break;
}
break;
}
default:
break;
}
// Return
return (DLG_EAT_IF_HUNGRY(Msg));
}
return OK;
}