smbmusicaplibscrew.inl

来自「索爱手机代码」· INL 代码 · 共 112 行

INL
112
字号
/* Copyright (C) 2006 Sony Ericsson Mobile Communications Japan, Inc. */
/*--------------------------------------------------------------------*/
// FileName:
//	SmbMusicAPLibScrew.inl
//
// Description:
//	PTX810 Musicアプリ ミュ〖ジック鼎奶ライブラリ
/*--------------------------------------------------------------------*/
//恃构旺悟
//泣烧			|恃构荚			|柒推
//--------------+---------------+--------------------------------------
//2006/09/23	|SEMC饷畲		|ファイルシステム鼎奶ライブラリから磊り叫し

/**
 *  $Revision: 1.2 $ $Date: 2006/04/05 17:21:27 $
 */
#include    <e32base.h>     // for class CleanupStack

SEMCJ_NAMESPACE_BEGIN
MUSICAPLIB_NAMESPACE_BEGIN

// ----------------------------------------------------------------------------
//  DeleteAndNullify()
// ----------------------------------------------------------------------------
template<typename T>
inline void DeleteAndNullify( T*& aPtr )
    {
    delete aPtr;
    aPtr = NULL;
    }

// ----------------------------------------------------------------------------
//  ReAllocAndPopL()
// ----------------------------------------------------------------------------
template<typename T>
inline T ReAllocAndPopL( T aPtr, TInt aMaxLength )
    {
    T after = aPtr->ReAllocL( aMaxLength );
    CleanupStack::Pop( aPtr );
    return after;
    }

// ----------------------------------------------------------------------------
//  ReAllocAndPopL()
// ----------------------------------------------------------------------------
template<typename T>
inline T ReAllocAndReplacePushLC( T aPtr, TInt aMaxLength )
    {
    T after = ReAllocAndPopL( aPtr, aMaxLength );
    CleanupStack::PushL( after );
    return after;
    }

// ----------------------------------------------------------------------------
//  Contains()
// ----------------------------------------------------------------------------
inline TBool Contains( const TRect& aLhs, const TRect& aRhs )
    {
    return Intersection( aLhs, aRhs ) == aRhs;
    }

// ----------------------------------------------------------------------------
//  Intersection()
// ----------------------------------------------------------------------------
inline const TRect Intersection( const TRect& aLhs, const TRect& aRhs )
    {
    TRect tmp( aLhs );
    tmp.Intersection( aRhs );
    return tmp;
    }

// ----------------------------------------------------------------------------
//  Union()
// ----------------------------------------------------------------------------
inline const TRect Union( const TRect& aLhs, const TRect& aRhs )
    {
    TRect tmp( aLhs );
    tmp.BoundingRect( aRhs );
    return tmp;
    }

// ----------------------------------------------------------------------------
//  Moved()
// ----------------------------------------------------------------------------
inline const TRect Moved( const TRect& aRect, const TPoint& aDist )
    {
    TRect tmp( aRect );
    tmp.Move( aDist );
    return tmp;
    }

// ----------------------------------------------------------------------------
//  TSmbMusicAPLib_Noop4DesOverflow::Overflow()
// ----------------------------------------------------------------------------
inline void TSmbMusicAPLib_Noop4DesOverflow::Overflow( TDes8& /*aDes*/ )
    {
    // nothing to do.
    }

// ----------------------------------------------------------------------------
//  TSmbMusicAPLib_Noop4DesOverflow::Overflow()
// ----------------------------------------------------------------------------
inline void TSmbMusicAPLib_Noop4DesOverflow::Overflow( TDes16& /*aDes*/ )
    {
    // nothing to do.
    }

MUSICAPLIB_NAMESPACE_END
SEMCJ_NAMESPACE_END

/* Copyright (C) 2006 Sony Ericsson Mobile Communications Japan, Inc. */

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?