libintrovirt v0.57.4
IntroVirt introspection library
Loading...
Searching...
No Matches
EVENT_ACCESS_MASK.hh
Go to the documentation of this file.
1/*
2 * Copyright 2021 Assured Information Security, Inc.
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#pragma once
17
18#include "ACCESS_MASK.hh"
19
20namespace introvirt {
21namespace windows {
22namespace nt {
23
38
44class EVENT_ACCESS_MASK final : public ACCESS_MASK {
45 public:
53 bool has(EventAccessMaskFlag flag) const { return (value() & flag) == flag; }
54
60 void set(EventAccessMaskFlag flag) { value(value() | flag); }
61
67 void clear(EventAccessMaskFlag flag) { value(value() & ~flag); }
68
69 AccessMaskType type() const override { return EventAccessMask; }
70
71 // Constructors and assignment operators
72 EVENT_ACCESS_MASK() = default;
73 EVENT_ACCESS_MASK(uint32_t mask) : ACCESS_MASK(mask) {}
74
77};
78
79const std::string& to_string(EventAccessMaskFlag);
80std::ostream& operator<<(std::ostream&, EventAccessMaskFlag);
81
83std::ostream& operator<<(std::ostream&, EVENT_ACCESS_MASK);
84
85} /* namespace nt */
86} /* namespace windows */
87} /* namespace introvirt */
Generic ACCESS_MASK type.
Definition ACCESS_MASK.hh:109
uint32_t value() const
Get the raw value.
Definition ACCESS_MASK.hh:155
AccessMaskType
Definition ACCESS_MASK.hh:111
@ EventAccessMask
Definition ACCESS_MASK.hh:113
ACCESS_MASK class for event permissions.
Definition EVENT_ACCESS_MASK.hh:44
EVENT_ACCESS_MASK(uint32_t mask)
Definition EVENT_ACCESS_MASK.hh:73
EVENT_ACCESS_MASK(const EVENT_ACCESS_MASK &)=default
EVENT_ACCESS_MASK & operator=(const EVENT_ACCESS_MASK &)=default
void clear(EventAccessMaskFlag flag)
Clear the given flag.
Definition EVENT_ACCESS_MASK.hh:67
void set(EventAccessMaskFlag flag)
Set the state of the given flag to enabled.
Definition EVENT_ACCESS_MASK.hh:60
AccessMaskType type() const override
Get the type of access mask.
Definition EVENT_ACCESS_MASK.hh:69
bool has(EventAccessMaskFlag flag) const
Check if the given flag is enabled.
Definition EVENT_ACCESS_MASK.hh:53
EventAccessMaskFlag
Valid flags for EVENT_ACCESS_MASK.
Definition EVENT_ACCESS_MASK.hh:29
@ EVENT_ALL_ACCESS
Full access to the state.
Definition EVENT_ACCESS_MASK.hh:36
@ EVENT_QUERY_STATE
Read state information.
Definition EVENT_ACCESS_MASK.hh:31
@ EVENT_MODIFY_STATE
Definition EVENT_ACCESS_MASK.hh:34
std::ostream & operator<<(std::ostream &, APPHELPCACHESERVICECLASS val)
const std::string & to_string(APPHELPCACHESERVICECLASS val)
Core IntroVirt classes.
Definition Cr0.hh:20