opponentformopponent.h

来自「series60 应用程序开发的源代码 series60 应用程序开发的源代码」· C头文件 代码 · 共 66 行

H
66
字号
#ifndef OPPONENTFORMOPPONENT_H
#define OPPONENTFORMOPPONENT_H

// INCLUDES

// System Includes
#include <E32BASE.H>
#include <in_sock.h>

// User Includes
#include "OpponentForm.hrh"

// FORWARD DECLARATIONS


// CLASS DECLARATION

/**
*
* @class    TOpponentFormOpponent OpponentFormOpponent.h
* @brief    This is a data class for storing a players details
* based on the standard Symbian OS architecture.
*
* Copyright (c) EMCC Software Ltd 2003
* @version    1.0
*
*/
class TOpponentFormOpponent
{

public: // constructor

    TOpponentFormOpponent() : iStrength(50){};

public: // members

    TBool IsValid() const;

public: // accessors

    void SetStrength(TInt aStrength);
    const TInt Strength() const;

    // should be no longer than KMaxNameLength. Will not set if too long
    void SetName(const TDesC& aName);
    const TDes& Name() const;

    // should be no longer than KMaxPowerLength. Will not set if too long
    void SetPower(const TDesC& aPower);
    const TDes& Power() const;

    void SetPowerIndex(TInt aPowerIndex);
    const TInt PowerIndex() const;

private: //Data

    TInt iStrength;
    TBuf<KMaxNameLength> iName;
    TBuf<KMaxPowerLength> iPower;
    TInt iPowerIndex;
};

#endif    // #ifndef OPPONENTFORMOPPONENT_H

// End of File

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?