Init basesystem source codes.
[staging/basesystem.git] / nsframework / framework_unified / client / NS_FrameworkCore / include / statemachine / frameworkunified_sm_finalstate.h
1 /*
2  * @copyright Copyright (c) 2016-2020 TOYOTA MOTOR CORPORATION.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  *      http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16
17 ///////////////////////////////////////////////////////////////////////////////
18 /// \ingroup  tag_StateMachine
19 /// \brief
20 ///
21 /// This file has the CFrameworkunifiedFinalState class definitions. CFrameworkunifiedFinalState is derived from
22 /// CFrameworkunifiedState class.This class implements the additional functionality supported by HSM Final
23 /// state.
24 ///
25 ///////////////////////////////////////////////////////////////////////////////
26 //@{
27
28 #ifndef FRAMEWORK_UNIFIED_CLIENT_NS_FRAMEWORKCORE_INCLUDE_STATEMACHINE_FRAMEWORKUNIFIED_SM_FINALSTATE_H_
29 #define FRAMEWORK_UNIFIED_CLIENT_NS_FRAMEWORKCORE_INCLUDE_STATEMACHINE_FRAMEWORKUNIFIED_SM_FINALSTATE_H_
30
31
32 #include <native_service/frameworkunified_sm_state.h>
33
34 ///////////////////////////////////////////////////////////////////////////////////////////////////
35 /// This class implements the additional functionality supported by HSM Final state.
36 ///////////////////////////////////////////////////////////////////////////////////////////////////
37 class CFrameworkunifiedFinalState : public CFrameworkunifiedState {
38  public :
39
40   ///////////////////////////////////////////////////////////////////////////////////////////
41   /// CFrameworkunifiedFinalState
42   /// Parameterized constructor
43   /// \param [in] f_pName
44   ///     string - Name of the state
45   ///
46   /// \return none
47   ///////////////////////////////////////////////////////////////////////////////////////////
48   CFrameworkunifiedFinalState(std::string f_pName);  // NOLINT  (readability/nolint)
49
50   ///////////////////////////////////////////////////////////////////////////////////////////
51   /// ~CFrameworkunifiedFinalState
52   /// Class destructor
53   ///
54   /// \return none
55   ///////////////////////////////////////////////////////////////////////////////////////////
56   virtual ~CFrameworkunifiedFinalState();
57
58   virtual CFrameworkunifiedState *FrameworkunifiedGetActiveState();
59
60   ///////////////////////////////////////////////////////////////////////////////////////////
61   /// UpdateHistory
62   /// This function stores the last active state
63   ///
64   /// \return EFrameworkunifiedStatus
65   ///     EFrameworkunifiedStatus - Returns status of operation
66   ///////////////////////////////////////////////////////////////////////////////////////////
67   EFrameworkunifiedStatus UpdateHistory();
68
69  protected :
70
71   ///////////////////////////////////////////////////////////////////////////////////////////
72   /// FrameworkunifiedOnEntry
73   /// state initialization can be performed in this function.
74   ///
75   /// \param [in] f_pEventData
76   ///     CEventDataPtr - Event data
77   ///
78   /// \return EFrameworkunifiedStatus
79   ///     EFrameworkunifiedStatus - Returns status of operation
80   ///////////////////////////////////////////////////////////////////////////////////////////
81   virtual EFrameworkunifiedStatus FrameworkunifiedOnEntry(CEventDataPtr f_pEventData);
82
83   ///////////////////////////////////////////////////////////////////////////////////////////
84   /// FrameworkunifiedOnExit
85   /// state cleanup can be performed in this function.
86   ///
87   /// \param [in] f_pEventData
88   ///     CEventDataPtr - Event data
89   ///
90   /// \return EFrameworkunifiedStatus
91   ///     EFrameworkunifiedStatus - Returns status of operation
92   ///////////////////////////////////////////////////////////////////////////////////////////
93   virtual EFrameworkunifiedStatus FrameworkunifiedOnExit(CEventDataPtr f_pEventData);
94 };
95
96 #endif  // FRAMEWORK_UNIFIED_CLIENT_NS_FRAMEWORKCORE_INCLUDE_STATEMACHINE_FRAMEWORKUNIFIED_SM_FINALSTATE_H_
97 // @}