equal
deleted
inserted
replaced
|
1 // Copyright (c) 2007-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 // |
|
15 |
|
16 #ifndef STATEBASE_H |
|
17 #define STATEBASE_H |
|
18 |
|
19 class CStateMachineBase; |
|
20 |
|
21 class CStateBase |
|
22 { |
|
23 protected: |
|
24 explicit CStateBase(int aStateId, CStateMachineBase& aStateMachine); |
|
25 inline CStateMachineBase& StateMachine() |
|
26 { |
|
27 return iStateMachine; |
|
28 } |
|
29 |
|
30 public: |
|
31 inline int StateId() |
|
32 { |
|
33 return iStateId; |
|
34 } |
|
35 |
|
36 virtual ~CStateBase(); |
|
37 virtual void EnterState(); |
|
38 virtual void ProcessState() = 0; |
|
39 |
|
40 private: |
|
41 CStateMachineBase& iStateMachine; |
|
42 int iStateId; |
|
43 }; |
|
44 |
|
45 #endif |
|
46 // STATEBASE_H |
|
47 |