⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 noughtsandcrossesinformationandsettings.h

📁 Symbian智能手机操作系统源代码值的参考_界面
💻 H
字号:
/* Copyright (c) 2005, Nokia. All rights reserved */


#ifndef __NOUGHTSANDCROSSESINFORMATIONANDSETTINGS_H__
#define __NOUGHTSANDCROSSESINFORMATIONANDSETTINGS_H__

// INCLUDES
#include <s32std.h>


// CONSTANTS
const TInt USERNAME_SIZE = 20;

// CLASS DECLARATION
class CNoughtsAndCrossesInformationAndSettings : public CBase
	{
	public:
		typedef TBuf<USERNAME_SIZE> TPlayerName;

	public:
		/**
		 * Constructor
		 */
		CNoughtsAndCrossesInformationAndSettings();

		/**
		 * Set player name 
		 */
		void SetPlayerName (const TPlayerName& aPlayerName);
		/**
		 * PlayerName()
		 * Return player name
		 */
		TPlayerName& PlayerName();
		/**
		 * SetHumanPlayFirst(TBool aPlayFirst)
		 */
		void SetHumanPlayFirst (TBool aPlayFirst);
		/**
		 * HumanPlayFirst()
		 * Return ETrue if human play first
		 */
		TBool& HumanPlayFirst();
		/**
		 * SetHumanTypeCross(TBool aPlayTypeCross)
		 */
		void SetHumanTypeCross (TBool aPlayTypeCross);
		/**
		 * HumanTypeCross()
		 * Return ETrue if human type is cross
		 */
		TBool& HumanTypeCross();
		/**
		 * AddHumanWins()
		 */
		void AddHumanWins();
		/**
		 * HumanWins()
		 * Return human wins
		 */
		TInt HumanWins() const ;
		/**
		 * AddHumanLosses()
		 */
		void AddHumanLosses();
		/**
		 * HumanLosses()
		 * Return human losses
		 */
		TInt HumanLosses() const;
		/**
		 * ExternalizeL(RWriteStream& aStream)
		 * Write the player settings to stream
		 */
		void ExternalizeL (RWriteStream& aStream) const;
	    /**
	     * InternalizeL(RReadStream& aStream)
		 * Read the contents of aStream.
		 */	
		void InternalizeL (RReadStream& aStream);

	private:
		/**
		 * Make a private copy constructor, so that the compiler will not create
		 * a default one. This way a copy of this object cannot be created accidentally.
		 */
		CNoughtsAndCrossesInformationAndSettings (
			const CNoughtsAndCrossesInformationAndSettings& aCopy);
		/**
		 * Define the assignment operator to be private, so that the compiler will not create
		 * a default one. We do not want assingments to be made between two objects of this class.
		 */
		CNoughtsAndCrossesInformationAndSettings& operator= (
			const CNoughtsAndCrossesInformationAndSettings& aOther);

	private:
		TPlayerName iPlayerName;
		TBool iPlayFirst;
		TBool iPlayTypeCross;
		TInt iHumanWins;
		TInt iHumanLosses;
	};

#endif // __NOUGHTSANDCROSSESINFORMATIONANDSETTINGS_H__

// End of File

⌨️ 快捷键说明

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