cleanupsupport.inl
来自「最新官方例子,图形,描述副,基本控件,通讯协议,等等,」· INL 代码 · 共 48 行
INL
48 行
/**
*
* @class CleanupResetAndDestroy CleanupSupport.h
* @brief Cleanup support for RPointerArrays that own their contents.
*
* Copyright (c) EMCC Software Ltd 2003
* @version 1.0
*/
// INCLUDES
// Class includes.
#include "CleanupSupport.h"
// ================= MEMBER FUNCTIONS =======================
/**
* Push an item onto the CleanupStack using a TCleanupItem.
* @param aRef The item to be pushed.
*/
template <class T>
inline void CleanupResetAndDestroy<T>::PushL(T& aRef)
{
CleanupStack::PushL(TCleanupItem(&ResetAndDestroy, &aRef));
}
/**
* Function called when the item is destroyed from the Cleanup Stack.
* @param aPtr The item to be destroyed.
*/
template <class T>
void CleanupResetAndDestroy<T>::ResetAndDestroy(TAny* aPtr)
{
static_cast<T*>(aPtr)->ResetAndDestroy();
}
/**
* Utility function to push items onto the Cleanup Stack.
* @param aPtr The item to be destroyed.
*/
template <class T>
inline void CleanupResetAndDestroyPushL(T& aRef)
{
CleanupResetAndDestroy<T>::PushL(aRef);
}
// End of File.
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?