plugify 1.2.6
Loading...
Searching...
No Matches
mem_accessor.hpp
1#pragma once
2
3#include "mem_addr.hpp"
4#include "prot_flag.hpp"
5
6#include <plugify_export.h>
7
8namespace plugify {
13 class PLUGIFY_API MemAccessor {
14 public:
23 static bool MemCopy(MemAddr dest, MemAddr src, size_t size);
24
35 static bool SafeMemCopy(MemAddr dest, MemAddr src, size_t size, size_t& written) noexcept;
36
47 static bool SafeMemRead(MemAddr src, MemAddr dest, size_t size, size_t& read) noexcept;
48
57 static ProtFlag MemProtect(MemAddr dest, size_t size, ProtFlag newProtection, bool& status);
58 };
59} // namespace plugify
A class providing various memory access routines.
static bool SafeMemCopy(MemAddr dest, MemAddr src, size_t size, size_t &written) noexcept
Defines a memory write routine that will not throw exceptions, and can handle potential writes to NO_...
static bool SafeMemRead(MemAddr src, MemAddr dest, size_t size, size_t &read) noexcept
Defines a memory read routine that will not throw exceptions, and can handle potential reads from NO_...
static bool MemCopy(MemAddr dest, MemAddr src, size_t size)
Defines a memory read/write routine that may fail ungracefully. It's expected this library will only ...
static ProtFlag MemProtect(MemAddr dest, size_t size, ProtFlag newProtection, bool &status)
Defines a memory protection set/unset routine that may fail ungracefully.
A wrapper class for memory addresses, providing utility functions for pointer manipulation.
Definition mem_addr.hpp:10