opponentformopponent.cpp
来自「最新官方例子,图形,描述副,基本控件,通讯协议,等等,」· C++ 代码 · 共 71 行
CPP
71 行
/**
*
* @brief Definition of TOpponentFormOpponent
*
* Copyright (c) EMCC Software Ltd 2003
* @version 1.0
*/
// INCLUDE FILES
// Class include
#include "OpponentFormOpponent.h"
// ================= MEMBER FUNCTIONS =======================
TBool TOpponentFormOpponent::IsValid() const
{
return (iName.Length() > 0) && (iPower.Length() > 0);
}
void TOpponentFormOpponent::SetName(const TDesC& aName)
{
if (aName.Length() > KMaxNameLength)
{
return;
}
iName.Copy(aName);
}
const TDes& TOpponentFormOpponent::Name() const
{
return iName;
}
void TOpponentFormOpponent::SetStrength(TInt aStrength)
{
iStrength = aStrength;
}
const TInt TOpponentFormOpponent::Strength() const
{
return iStrength;
}
void TOpponentFormOpponent::SetPower(const TDesC& aPower)
{
if (aPower.Length() > KMaxPowerLength)
{
return;
}
iPower.Copy(aPower);
}
const TDes& TOpponentFormOpponent::Power() const
{
return iPower;
}
void TOpponentFormOpponent::SetPowerIndex(TInt aPowerIndex)
{
iPowerIndex = aPowerIndex;
}
const TInt TOpponentFormOpponent::PowerIndex() const
{
return iPowerIndex;
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?