32#ifndef API_MIP_UPE_ACTION_H_
33#define API_MIP_UPE_ACTION_H_
74 return static_cast<ActionType>(
static_cast<unsigned int>(a) |
static_cast<unsigned int>(b));
80 return static_cast<ActionType>(
static_cast<unsigned int>(a) &
static_cast<unsigned int>(b));
86 return static_cast<ActionType>(
static_cast<unsigned int>(a) ^
static_cast<unsigned int>(b));
103 virtual void Link() {}
104 virtual const std::string& GetId()
const {
return mId; }
105 virtual bool operator==(
const Action& action)
const {
106 return ((GetId() == action.GetId()) && (
GetType() == action.
GetType()) && IsEqual(action));
110 virtual bool IsEqual(
const Action& action)
const = 0;
112 Action(
const std::string&
id) : mId(id) {}
constexpr ActionType operator|(ActionType a, ActionType b)
Or (|) operator for Action type enum.
constexpr ActionType operator^(ActionType a, ActionType b)
Xor (^) operator for Action type enum.
ActionType
Different action types.
@ PROTECT_BY_ENCRYPT_ONLY
@ REMOVE_DYNAMIC_WATERMARK
@ PROTECT_DO_NOT_FORWARD_DK
constexpr ActionType operator&(ActionType a, ActionType b)
And (&) operator for Action type enum.
Interface for an action. Each action translates to a step that needs to be taken by the application t...
virtual ActionType GetType() const =0
Get the type of Action.