|
1 /* |
|
2 * Copyright (c) 2002 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: This file contains function definitions to class |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 // ---------------------------------------------------------------------------- |
|
21 // TMuiuFlags::SetFlag() |
|
22 // ---------------------------------------------------------------------------- |
|
23 // |
|
24 inline void TMuiuFlags::SetFlag( const TUint aFlag ) |
|
25 { |
|
26 iFlags |= ( static_cast<TUint64>( 0x01 ) << aFlag ); |
|
27 } |
|
28 |
|
29 |
|
30 // ---------------------------------------------------------------------------- |
|
31 // TMuiuFlags::ClearFlag() |
|
32 // ---------------------------------------------------------------------------- |
|
33 // |
|
34 inline void TMuiuFlags::ClearFlag( const TUint aFlag ) |
|
35 { |
|
36 iFlags &= ~( static_cast<TUint64>( 0x01 ) << aFlag ); |
|
37 } |
|
38 |
|
39 // ---------------------------------------------------------------------------- |
|
40 // TMuiuFlags::Flag() |
|
41 // ---------------------------------------------------------------------------- |
|
42 // |
|
43 inline TBool TMuiuFlags::Flag( const TUint aFlag ) const |
|
44 { |
|
45 return ( iFlags >> aFlag ) & 0x01; |
|
46 } |
|
47 |
|
48 // ---------------------------------------------------------------------------- |
|
49 // TMuiuFlags::ChangeFlag() |
|
50 // ---------------------------------------------------------------------------- |
|
51 // |
|
52 inline void TMuiuFlags::ChangeFlag( |
|
53 const TUint aFlag, |
|
54 const TBool aNewState ) |
|
55 { |
|
56 if ( aNewState ) |
|
57 { |
|
58 SetFlag( aFlag ); |
|
59 } |
|
60 else |
|
61 { |
|
62 ClearFlag( aFlag ); |
|
63 } |
|
64 } |
|
65 |
|
66 |
|
67 // End of File |