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

📄 cleanupsupport.inl

📁 series60 应用程序开发的源代码 series60 应用程序开发的源代码
💻 INL
字号:
/**
*
* @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 + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -