settings.h

来自「RGA: Biowaste Game Example This C++ app」· C头文件 代码 · 共 72 行

H
72
字号
/*
* ==============================================================================
*  Name        : Settings.h
*  Part of     : RGA Game Example
*  Interface   :
*  Description : game settings, saving and loading
*  Version     : 1.0
*
*  Copyright (c) 2007-2008 Nokia Corporation.
*  This material, including documentation and any related
*  computer programs, is protected by copyright controlled by
*  Nokia Corporation.
* ==============================================================================
*/


#ifndef __SETTINGS_H__
#define __SETTINGS_H__

#include <e32base.h>


class CSettings : public CBase
	{
	public:
		CSettings();
		virtual ~CSettings();
		
		/**
		 * NewL
		 * 1st phase constructor
		 * @param aFilename file to save and load from
		 * @return pointer to initialised high score table
		 */
		static CSettings* NewL(const TDesC& aFilename);
		
		/**
		 * Load
		 * load settings from file
		 * @return KErrNone or error code
		 */
		TInt Load();
		
		/**
		 * Save
		 * save settings into a file
		 * @return KErrNone or error code
		 */
		TInt Save() const;
		
	public:		// data
		TInt			iVolume;
		TInt			iGraphicsDetail;
		
	private:
		/**
		 * ConstructL
		 * 2nd phase constructor
		 * @param aFilename file to save and load from
		 */
		void ConstructL(const TDesC& aFilename);
	
	private:
		HBufC*					iFilename;
	
	};


#endif	// __SETTINGS_H__


⌨️ 快捷键说明

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