equal
deleted
inserted
replaced
|
1 // Copyright (c) 1999-2009 Nokia Corporation and/or its subsidiary(-ies). |
|
2 // All rights reserved. |
|
3 // This component and the accompanying materials are made available |
|
4 // under the terms of "Eclipse Public License v1.0" |
|
5 // which accompanies this distribution, and is available |
|
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
7 // |
|
8 // Initial Contributors: |
|
9 // Nokia Corporation - initial contribution. |
|
10 // |
|
11 // Contributors: |
|
12 // |
|
13 // Description: |
|
14 // TBITFLAGS.H |
|
15 // |
|
16 // |
|
17 |
|
18 #ifndef __TBITFLAGS_H__ |
|
19 #define __TBITFLAGS_H__ |
|
20 |
|
21 // System includes |
|
22 #include <e32std.h> |
|
23 #include <babitflags.h> |
|
24 |
|
25 class TestBitFlags |
|
26 { |
|
27 public: |
|
28 enum TFavColor |
|
29 { |
|
30 EBlue = 0, |
|
31 ERed = 1, |
|
32 EGreen = 2, |
|
33 EYellow = 3, |
|
34 EPurple = 4, |
|
35 EBlack = 5, |
|
36 EWhite = 6, |
|
37 EGrey = 7 |
|
38 }; |
|
39 public: |
|
40 void TestSetAll(); |
|
41 void TestClearAll(); |
|
42 void TestSetL(TInt aColor); |
|
43 void TestClearL(TInt aColor); |
|
44 void TestAssign(TInt aColor, TBool aSetOrClear); |
|
45 void TestToggleL(TInt aColor); |
|
46 TBool TestOperator1(TInt aColor); //operator [] |
|
47 void TestOperator2(); //operator = |
|
48 void TestOperator3(); //operator == |
|
49 TBool TestIsSet(TInt aColor); |
|
50 TBool TestIsClear(TInt aColor); |
|
51 TInt TestValue(); |
|
52 |
|
53 private: |
|
54 TBitFlags iTestFlags; |
|
55 TBitFlags iFlagA; |
|
56 TBitFlags iFlagB; |
|
57 }; |
|
58 |
|
59 enum TTestEnum |
|
60 { |
|
61 ETest0 = 0x00000000, |
|
62 ETest1 = 0x00000001, |
|
63 ETest2 = 0x00000002, |
|
64 ETest3 = 0x00000004, |
|
65 ETest4 = 0x00000008, |
|
66 ETest5 = 0x00000010, |
|
67 ETest6 = 0x00000020, |
|
68 ETest7 = 0x00000040, |
|
69 ETest8 = 0x00000080, |
|
70 ETest9 = 0x00000100, |
|
71 ETest10 = 0x00000200, |
|
72 ETest11 = 0x00000400, |
|
73 ETest12 = 0x00000800, |
|
74 ETest13 = 0x00001000, |
|
75 ETest14 = 0x00002000, |
|
76 ETest15 = 0x00004000, |
|
77 ETest16 = 0x00008000, |
|
78 ETest17 = 0x00010000, |
|
79 ETest18 = 0x00020000, |
|
80 ETest19 = 0x00040000, |
|
81 ETest20 = 0x00080000, |
|
82 ETest21 = 0x00100000, |
|
83 ETest22 = 0x00200000, |
|
84 ETest23 = 0x00400000, |
|
85 ETest24 = 0x00800000, |
|
86 ETest25 = 0x01000000, |
|
87 ETest26 = 0x02000000, |
|
88 ETest27 = 0x04000000, |
|
89 ETest28 = 0x08000000, |
|
90 ETest29 = 0x10000000, |
|
91 ETest30 = 0x20000000, |
|
92 ETest31 = 0x40000000, |
|
93 ETest32 = 0x80000000, |
|
94 }; |
|
95 |
|
96 #endif |