📄 shoppingitem.cpp
字号:
/* Copyright (c) 2003, Nokia. All rights reserved */
#include <s32file.h>
#include <e32std.h>
#include "shoppingitem.h"
CShoppingItem* CShoppingItem::NewL()
{
CShoppingItem* self = CShoppingItem::NewLC();
CleanupStack::Pop(self);
return self;
}
CShoppingItem* CShoppingItem::NewLC()
{
CShoppingItem* self = new (ELeave) CShoppingItem;
CleanupStack::PushL(self);
self->ConstructL();
return self;
}
CShoppingItem::CShoppingItem()
{
// No implementation required
}
CShoppingItem::~CShoppingItem()
{
delete iName;
iName = NULL;
}
void CShoppingItem::ConstructL()
{
// No implementation required
}
void CShoppingItem::ExternalizeL(RWriteStream& aStream) const
{
if (iName)
{
aStream << *iName;
}
else
{
aStream << KNullDesC;
}
aStream.WriteInt32L(iFlags);
}
void CShoppingItem::InternalizeL(RReadStream& aStream)
{
delete iName;
iName = HBufC::NewL(aStream, KMaxTInt);
iFlags = aStream.ReadInt32L();
}
void CShoppingItem::SetNameL(HBufC* aValue)
{
delete iName;
iName = aValue;
}
HBufC* CShoppingItem::Name() const
{
return iName;
}
void CShoppingItem::SetFlags(TUint aValue)
{
iFlags = aValue;
}
TUint CShoppingItem::Flags() const
{
return iFlags;
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -