equal
deleted
inserted
replaced
|
1 /* |
|
2 * Copyright (c) 2008 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: Base class for Sensor conditions |
|
15 * |
|
16 */ |
|
17 |
|
18 #ifndef CSENSORCONDITIONBASE_H |
|
19 #define CSENSORCONDITIONBASE_H |
|
20 |
|
21 #include <e32base.h> |
|
22 |
|
23 class CSensorConditionBase : public CBase |
|
24 { |
|
25 public: |
|
26 /** |
|
27 * Destructor |
|
28 */ |
|
29 virtual ~CSensorConditionBase(); |
|
30 |
|
31 protected: |
|
32 /** |
|
33 * Constructor |
|
34 */ |
|
35 CSensorConditionBase(TInt aChannelId); |
|
36 |
|
37 public: // New methods |
|
38 |
|
39 /** |
|
40 * Evaluate condition |
|
41 * @param aData value this conditions is matched against |
|
42 * @return ETrue if matched, EFalse if not |
|
43 */ |
|
44 virtual TBool Evaluate(TReal aValue, TInt aChannelId) = 0; |
|
45 |
|
46 inline TInt GetChannelId() |
|
47 { |
|
48 return iChannelId; |
|
49 }; |
|
50 |
|
51 protected: // Member data |
|
52 |
|
53 /** |
|
54 * ID number of the channel this condition is interested in |
|
55 */ |
|
56 TInt iChannelId; |
|
57 }; |
|
58 |
|
59 #endif // CSENSORCONDITIONBASE_H |