📄 symbiandlldll.cpp
字号:
/*
============================================================================
Name : CSymbiandllDll from SymbiandllDll.h
Author :
Version :
Copyright : Your copyright notice
Description : CSymbiandllDll DLL source
============================================================================
*/
// Include Files
#include "SymbiandllDll.h" // CSymbiandllDll
#include "SymbiandllDll.pan" // panic codes
// Member Functions
EXPORT_C CSymbiandllDll* CSymbiandllDll::NewLC()
{
CSymbiandllDll* self = new (ELeave) CSymbiandllDll;
CleanupStack::PushL(self);
self->ConstructL();
return self;
}
EXPORT_C CSymbiandllDll* CSymbiandllDll::NewL()
{
CSymbiandllDll* self = CSymbiandllDll::NewLC();
CleanupStack::Pop(self);
return self;
}
CSymbiandllDll::CSymbiandllDll()
{
// note, CBase initialises all member variables to zero
}
void CSymbiandllDll::ConstructL()
{
// second phase constructor, anything that may leave must be constructed here
iString = new (ELeave) TSymbiandllDllExampleString;
}
EXPORT_C CSymbiandllDll::~CSymbiandllDll()
{
delete iString;
}
EXPORT_C TVersion CSymbiandllDll::Version() const
{
// Version number of example API
const TInt KMajor = 1;
const TInt KMinor = 0;
const TInt KBuild = 1;
return TVersion(KMajor, KMinor, KBuild);
}
EXPORT_C void CSymbiandllDll::ExampleFuncAddCharL(const TChar& aChar)
{
__ASSERT_ALWAYS(iString != NULL, Panic(ESymbiandllDllNullPointer));
if (iString->Length() >= KSymbiandllDllBufferLength)
{
User::Leave(KErrTooBig);
}
iString->Append(aChar);
}
EXPORT_C void CSymbiandllDll::ExampleFuncRemoveLast()
{
__ASSERT_ALWAYS(iString != NULL, Panic(ESymbiandllDllNullPointer));
if (iString->Length() > 0)
{
iString->SetLength(iString->Length() - 1);
}
}
EXPORT_C void CSymbiandllDll::ExampleFuncClearBuffer()
{
iString->Zero();
}
EXPORT_C const TPtrC CSymbiandllDll::ExampleFuncString() const
{
__ASSERT_ALWAYS(iString != NULL, Panic(ESymbiandllDllNullPointer));
return *iString;
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -