Woman, Life, Freedom


Adaptive AUTOSAR
ARA public interface header documentation
function_group_state.h
1#ifndef FUNCTION_GROUP_STATE_H
2#define FUNCTION_GROUP_STATE_H
3
4#include <vector>
5#include "./function_group.h"
6
7namespace ara
8{
9 namespace exec
10 {
13 {
14 private:
15 const FunctionGroup *mFunctionGroup;
16 std::string mStateMetaModel;
17
19 const FunctionGroup* functionGroup,
20 std::string metaModelIdentifier);
21
22 public:
27 const FunctionGroup &functionGroup,
28 std::string metaModelIdentifier);
29
30 FunctionGroupState() = delete;
31 FunctionGroupState(const FunctionGroupState &other) = delete;
33 FunctionGroupState &operator=(const FunctionGroupState &other) = delete;
34 FunctionGroupState &operator=(FunctionGroupState &&other);
35 ~FunctionGroupState() noexcept = default;
36
39 const FunctionGroup &GetFunctionGroup() const noexcept;
40
43 const std::string &GetState() const noexcept;
44
48 void Serialize(std::vector<uint8_t> &serializedObject) const;
49
50 inline bool operator==(const FunctionGroupState &other) const noexcept
51 {
52 return (mFunctionGroup == other.mFunctionGroup) &&
53 (mStateMetaModel == other.mStateMetaModel);
54 }
55
56 inline bool operator!=(const FunctionGroupState &other) const noexcept
57 {
58 return (mFunctionGroup != other.mFunctionGroup) ||
59 (mStateMetaModel != other.mStateMetaModel);
60 }
61 };
62 }
63}
64
65#endif
A wrapper around the callee's return value and its possible error.
Definition: result.h:16
Class that links a function group to a certain state.
Definition: function_group_state.h:13
void Serialize(std::vector< uint8_t > &serializedObject) const
Serialized the object.
Definition: function_group_state.cpp:51
const std::string & GetState() const noexcept
Get the state bound to the instance.
Definition: function_group_state.cpp:46
static core::Result< FunctionGroupState > Create(const FunctionGroup &functionGroup, std::string metaModelIdentifier)
FunctionGroupState factory.
Definition: function_group_state.cpp:16
const FunctionGroup & GetFunctionGroup() const noexcept
Get the function group bound to the instance.
Definition: function_group_state.cpp:41
A function group representative based on a manifest.
Definition: function_group.h:14