vtuis/videotelui/inc/commands/tvtflagcontainer.inl
branchRCL_3
changeset 25 779871d1e4f4
parent 0 ed9695c8bcbe
equal deleted inserted replaced
24:f15ac8e65a02 25:779871d1e4f4
       
     1 /*
       
     2 * Copyright (c) 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:  Flag container class inline methods.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 // -----------------------------------------------------------------------------
       
    20 // TVtFlagContainer::TVtFlagContainer
       
    21 // -----------------------------------------------------------------------------
       
    22 //
       
    23 TVtFlagContainer::TVtFlagContainer()
       
    24     {
       
    25     Clear();
       
    26     }
       
    27 
       
    28 // -----------------------------------------------------------------------------
       
    29 // TVtFlagContainer::Clear
       
    30 // -----------------------------------------------------------------------------
       
    31 //
       
    32 void TVtFlagContainer::Clear()
       
    33     {
       
    34     iFlags = 0;
       
    35     }
       
    36 
       
    37 // -----------------------------------------------------------------------------
       
    38 // TVtFlagContainer::IsFlag
       
    39 // -----------------------------------------------------------------------------
       
    40 //
       
    41 TBool TVtFlagContainer::IsFlag( TUint32 aFlags ) const
       
    42     {
       
    43     return ( iFlags & aFlags );
       
    44     }
       
    45 
       
    46 // -----------------------------------------------------------------------------
       
    47 // TVtFlagContainer::SetFlag
       
    48 // -----------------------------------------------------------------------------
       
    49 //
       
    50 void TVtFlagContainer::SetFlag( TUint32 aFlags )
       
    51     {
       
    52     iFlags |= aFlags;
       
    53     }
       
    54 
       
    55 // -----------------------------------------------------------------------------
       
    56 // TVtFlagContainer::ClearFlag
       
    57 // -----------------------------------------------------------------------------
       
    58 //
       
    59 void TVtFlagContainer::ClearFlag( TUint32 aFlags )
       
    60     {
       
    61     iFlags &= ~aFlags;
       
    62     }
       
    63 
       
    64 // -----------------------------------------------------------------------------
       
    65 // TVtFlagContainer::Value
       
    66 // -----------------------------------------------------------------------------
       
    67 //
       
    68 TUint32 TVtFlagContainer::Value() const
       
    69     {
       
    70     return iFlags;
       
    71     }
       
    72 
       
    73 // -----------------------------------------------------------------------------
       
    74 // TVtFlagContainer::SetValue
       
    75 // -----------------------------------------------------------------------------
       
    76 //
       
    77 void TVtFlagContainer::SetValue( TUint32 aValue )
       
    78     {
       
    79     iFlags = aValue;
       
    80     }
       
    81 
       
    82 // -----------------------------------------------------------------------------
       
    83 // TVtUpdateableFlagContainer::Update
       
    84 // -----------------------------------------------------------------------------
       
    85 //
       
    86 void TVtUpdateableFlagContainer::Update()
       
    87     {
       
    88     Clear();
       
    89     UpdateFlags();
       
    90     }