phonebookui/Phonebook2/UIControls/inc/CPbk2FindStringSplitter.h
changeset 0 e686773b3f54
equal deleted inserted replaced
-1:000000000000 0:e686773b3f54
       
     1 /*
       
     2 * Copyright (c) 2002-2007 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:   Utility class for splitting find string into separate words
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef CPBK2FINDSTRINGSPLITTER_H
       
    20 #define CPBK2FINDSTRINGSPLITTER_H
       
    21 
       
    22 //  INCLUDES
       
    23 #include <e32base.h>
       
    24 #include <bamdesca.h>
       
    25 
       
    26 // FORWARD DECLARATIONS
       
    27 class MPbk2ContactNameFormatter;
       
    28 
       
    29 
       
    30 NONSHARABLE_CLASS ( CPbk2FindStringSplitter ) : public CBase
       
    31     {
       
    32     public: // Constructors and destructor
       
    33 
       
    34         /**
       
    35          * Creates a new instance of this class.
       
    36          *
       
    37          * @param aText             The text to separate into words.
       
    38          * @param aNameFormatter    Name formatter.
       
    39          * @return A new instance of this class.
       
    40          */
       
    41         static CPbk2FindStringSplitter* NewL(
       
    42             MPbk2ContactNameFormatter& aNameFormatter );
       
    43         /**
       
    44          * Destructor.
       
    45          */
       
    46         ~CPbk2FindStringSplitter();
       
    47         
       
    48         MDesCArray* SplitTextIntoArrayL( const TDesC& aText );
       
    49 
       
    50     private: // Implementation
       
    51         CPbk2FindStringSplitter(
       
    52             MPbk2ContactNameFormatter& aNameFormatter );
       
    53         void ConstructL();
       
    54 
       
    55     private: // Data
       
    56         /// Ref: Name formatter
       
    57         MPbk2ContactNameFormatter& iNameFormatter;
       
    58     };
       
    59 
       
    60 #endif // CPBK2FINDSTRINGSPLITTER_H