Пример #1
0
/*
-------------------------------------------------------------------------------

    Class: CStifSectionParser

    Method: NewL

    Description: Two-phased constructor.

    Parameters: const TInt aLength: in: Parsed section length

    Return Values: CStifSectionParser* : pointer to CStifSectionParser object

    Errors/Exceptions:  Leaves if section length is negative
                        Leaves if construction fails

    Status: Approved

-------------------------------------------------------------------------------
*/
CStifSectionParser* CStifSectionParser::NewL( const TInt aLength )
    {
    __TRACE( KInfo, ( _L( "STIFPARSER: Create a section" ) ) );
    __ASSERT_ALWAYS( aLength > 0, User::Leave( KErrArgument ) );

    CStifSectionParser* item = new (ELeave) CStifSectionParser( aLength );

    CleanupStack::PushL( item );
    item->ConstructL();
    CleanupStack::Pop( item );

    return item;

    }