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