📄 cleanupsupport.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 + -