menucontentsrv/enginc/menuengvisitor.h
changeset 0 79c6a41cd166
equal deleted inserted replaced
-1:000000000000 0:79c6a41cd166
       
     1 /*
       
     2 * Copyright (c) 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:
       
    15 *
       
    16 */
       
    17 
       
    18 #ifndef __MENUENGVISITOR_H__
       
    19 #define __MENUENGVISITOR_H__
       
    20 
       
    21 // INCLUDES
       
    22 
       
    23 #include <e32base.h>
       
    24 
       
    25 // FORWARD DECLARATION
       
    26 
       
    27 class CMenuEngObject;
       
    28 
       
    29 // CLASS DECLARATION
       
    30 
       
    31 /**
       
    32 * Menu Engine hierarchical visitor interface.
       
    33 * Object tree depth-first traversal.
       
    34 */
       
    35 NONSHARABLE_CLASS( MMenuEngVisitor )
       
    36     {
       
    37 
       
    38 public:     // new methods
       
    39 
       
    40     /**
       
    41     * Enter folder.
       
    42     * @param aFolder Entering this folder.
       
    43     * @return ETrue to visit children of this folder. VisitLeaveL() will
       
    44     *         be called after children of this folder are visited.
       
    45     *         EFalse to skip children of this folder. VisitLeaveL() will
       
    46     *         be called next.
       
    47     */
       
    48     virtual TBool VisitEnterL( CMenuEngObject& /*aFolder*/ )    
       
    49         { return ETrue; };
       
    50 
       
    51     /**
       
    52     * Leave folder.
       
    53     * @param aFolder Leaving this folder.
       
    54     * @return ETrue to visit next sibling of this folder.
       
    55     *         EFalse to stop visiting items at this level.
       
    56     */
       
    57     virtual TBool VisitLeaveL( CMenuEngObject& /*aFolder*/ )    
       
    58         { return ETrue; };
       
    59 
       
    60     /**
       
    61     * Visit leaf node.
       
    62     * @param aLeaf Leaf node.
       
    63     * @return ETrue to visit next sibling of this leaf.
       
    64     *         EFalse to stop visiting items at this level.
       
    65     */
       
    66     virtual TBool VisitL( CMenuEngObject& /*aLeaf*/ )
       
    67         { return ETrue; };
       
    68 
       
    69     };
       
    70 
       
    71 #endif // __MENUENGVISITOR_H__