telutils/phoneparser/inc/CPhoneGsmParserContainer.h
changeset 0 ff3b6d0fd310
child 19 7d48bed6ce0c
equal deleted inserted replaced
-1:000000000000 0:ff3b6d0fd310
       
     1 /*
       
     2 * Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies). 
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of "Eclipse Public License v1.0"
       
     6 * which accompanies this distribution, and is available
       
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description:  It is handler that is also container for handlers. Parsing 
       
    15 *                requests are simply forwarded to the contained handlers.
       
    16 *
       
    17 */
       
    18 
       
    19 
       
    20 #ifndef CPHONEGSMPARSERCONTAINER_H
       
    21 #define CPHONEGSMPARSERCONTAINER_H
       
    22 
       
    23 // INCLUDES
       
    24 #include    <e32base.h>
       
    25 #include    "CPhoneGsmParserBase.h"
       
    26 
       
    27 // CLASS DECLARATION
       
    28 
       
    29 /**
       
    30 * It is itself a parser and it is container for parsers. Parsing is
       
    31 * done so that each of the contained parsers are called.
       
    32 *
       
    33 * @since 1.0
       
    34 * @lib phoneparser.lib
       
    35 */
       
    36 NONSHARABLE_CLASS( CPhoneGsmParserContainer )
       
    37     : public CPhoneGsmParserBase
       
    38     {
       
    39     public: // Constructors and destructor      
       
    40         
       
    41         /**
       
    42         * Two-phased constructor.
       
    43         */
       
    44         static CPhoneGsmParserContainer* NewLC();
       
    45         
       
    46         /**
       
    47         * Destructor.
       
    48         */
       
    49         ~CPhoneGsmParserContainer();
       
    50 
       
    51     public: // New functions
       
    52         
       
    53         /**
       
    54         * Add a parser to the container.
       
    55         *
       
    56         * Note that ownership is transferred. Panics if parser is already
       
    57         * added.
       
    58         */
       
    59         void AddL( CPhoneGsmParserBase& aParser );
       
    60 
       
    61     public: // Functios from base classes
       
    62 
       
    63         /**
       
    64         * From CPhoneGsmParserBase, parses strings.
       
    65         */
       
    66         TBool ParseL( 
       
    67             const TDesC& aString, 
       
    68             CPhoneGsmParserResult& aResult,
       
    69             CPhoneGsmOptionContainerBase& aOptions );
       
    70                 
       
    71     private:
       
    72 
       
    73         /**
       
    74         * C++ default constructor.
       
    75         */
       
    76         CPhoneGsmParserContainer();
       
    77 
       
    78         /**
       
    79         * Symbian OS constructor.
       
    80         */
       
    81         void ConstructL();
       
    82        
       
    83     private:    // Data
       
    84 
       
    85         // Type for parser array.
       
    86         typedef CArrayPtrFlat< CPhoneGsmParserBase > CParserArray;
       
    87 
       
    88         // Owned array of parsers.
       
    89         CParserArray* iArray;
       
    90 
       
    91     };
       
    92 
       
    93 #endif      // CPHONEGSMPARSERCONTAINER_H
       
    94             
       
    95 // End of File