CeresEngine 0.2.0
A game development framework
Loading...
Searching...
No Matches
Win32FileWatcher.hpp
Go to the documentation of this file.
1
2//
3// CeresEngine - A game development framework
4//
5// Created by Rogiel Sulzbach.
6// Copyright (c) 2018-2023 Rogiel Sulzbach. All rights reserved.
7//
8
9#pragma once
10
11#include "Forward.hpp"
12
15
20
21#include <windows.h>
22
23#include <memory>
24#include <mutex>
25#include <vector>
26
27namespace CeresEngine {
28
30
86
87} // namespace CeresEngine
A retain-release type of smart pointer.
Definition SmartPtr.hpp:132
A context for function object execution.
Definition ExecutionContext.hpp:90
Handle for a file or directory.
Definition FileHandle.hpp:46
Interface for accessing file systems.
Definition FileSystem.hpp:28
Interface for file watcher implementations.
Definition FileWatcher.hpp:114
Representation of the local file system on Windows.
Definition Win32FileSystem.hpp:27
File watcher for the local file system for the Windows platform.
Definition Win32FileWatcher.hpp:32
FileHandle mHandle
Directory that is watched.
Definition Win32FileWatcher.hpp:46
IFileSystem * getFileSystem() const final
Gets file system that this watcher watches for.
void start() final
Starts the file watching operation.
Win32Handle mWin32DirectoryHandle
Handle for the directory.
Definition Win32FileWatcher.hpp:55
bool mRecursive
Watch recursively?
Definition Win32FileWatcher.hpp:52
char buffer[1024 *sizeof(FILE_NOTIFY_INFORMATION)]
Buffer for overlapped data (1024 * sizeof(FILE_NOTIFY_INFORMATION))
Definition Win32FileWatcher.hpp:64
Win32FileWatcher(Win32FileSystem &fs, ExecutionContext &executionContext, const FileHandle &directory, const FileEvents &events, bool recursive)
Creates a new Win32FileWatcher instance.
void stop() final
Stops the file watching operation.
RC< Win32FileSystem > mFileSystem
File system that created this watcher.
Definition Win32FileWatcher.hpp:39
::OVERLAPPED mWin32Overlapped
Overlapped data (for asynchronous operation)
Definition Win32FileWatcher.hpp:61
FileEvents mEvents
Watched events.
Definition Win32FileWatcher.hpp:49
friend class Win32FileWatcherService
Definition Win32FileWatcher.hpp:33
ExecutionContext & mExecutionContext
The execution context in which the file watcher events should be fired from.
Definition Win32FileWatcher.hpp:43
Win32FileWatcher(Win32FileWatcher &&) noexcept=delete
UPtr< void, decltype(&::CloseHandle)> Win32Handle
Definition Win32FileWatcher.hpp:36
Win32Handle mWin32Event
Event that is triggered for this watcher.
Definition Win32FileWatcher.hpp:58
Definition Application.hpp:19
std::unique_ptr< T, Deleter > UPtr
UPtr is a smart pointer that owns and manages another object through a pointer and disposes of that o...
Definition SmartPtr.hpp:28
constexpr size_t hash(const T &v)
Generates a hash for the provided type.
Definition Hash.hpp:25