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

📄 shoppingitem.h

📁 为symbian7.0c操作系统series60系列开发的购物软件
💻 H
字号:
/* Copyright (c) 2003, Nokia. All rights reserved */

#ifndef __SHOPPINGITEM_H__
#define __SHOPPINGITEM_H__

/*! 
  @class CShoppingItem
  
  @discussion An instance of CShoppingItem represents a single item on the shopping list.
  It has a name, as an HBufC, and a set of flags, including a flag to indicate
  whether the item is marked or not.
  */
class CShoppingItem : public CBase
	{

public:

/*!
  @function NewL
   
  @discussion Create a CShoppingItem object
  @result a pointer to the created instance of CShoppingItem
*/
    static CShoppingItem* NewL();

/*!
  @function NewLC
   
  @discussion Create a CShoppingItem object
  @result a pointer to the created instance of CShoppingItem
*/
    static CShoppingItem* NewLC();

/*!
  @function	~CShoppingItem

  @discussion Destroy the object
  */

	~CShoppingItem();

public:



/*!
  @function	SetNameL

  @discussion Set the name of the shopping item to 'aValue'.
  @param aValue the value to set the name to
  */
	void SetNameL( HBufC* aValue);

/*!
  @function	Name

  @discussion Get the name of the shoppiing item.
  @result the name of the shopping item
  */
	HBufC* Name() const;

/*!
  @enum TFlagsBits
  
  @discussion The bits corresponding to the item's flags.
  @value EMarked Is the item marked ?
  */
    enum TFlagsBits
		{
		EMarked = 0x01
		};

/*!
  @function	SetFlags

  @discussion Set the flags according to bitfield aValue.
  @param aValue the bitfield to set the flags to
  */
	void SetFlags(TUint aValue);

/*!
  @function	Flags

  @discussion Get the flags bitfield.
  @result the flag bitfield
  */
	TUint Flags() const;

/*!
  @function	ExternalizeL

  @discussion Write the shopping item to aStream.
  @param aStream the stream to write the item to.
  */
	void ExternalizeL(RWriteStream& aStream) const;

/*!
  @function	InternalizeL

  @discussion Read the shopping item from aStream.
  @param aStream the stream to read the item from.
  */
	void InternalizeL(RReadStream& aStream);

private:

/*!
  @function	CShoppingItem

  @discussion Perform any first stage construction.
  */
	CShoppingItem();

/*!
  @function	ConstructL

  @discussion Perform any second stage construction.
  */
	void ConstructL();

private:

	/*! @var iName the name of the shopping item */
	HBufC* iName;

	/*! @var iFlags a bitfield of flags for the shopping item */
	TUint iFlags;
	};

#endif //__SHOPPINGITEM_H__

⌨️ 快捷键说明

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