|
CeresEngine 0.2.0
A game development framework
|
A FileEventHandler that calls a function or a lambda.
More...
#include <CeresEngine/Foundation/IO/FileWatcher.hpp>
Public Types | |
| using | EventFunc = std::function< void(const FileHandle &, FileEvent)> |
| Callback function type for file system events. | |
Public Member Functions | |
| FunctionalFileEventHandler () | |
| FunctionalFileEventHandler (EventFunc &&funcFileEvent) | |
Creates a new FunctionalFileEventHandler. | |
| ~FunctionalFileEventHandler () final | |
Public Member Functions inherited from CeresEngine::FileEventHandler | |
| FileEventHandler ()=default | |
| virtual | ~FileEventHandler ()=default |
Protected Member Functions | |
| void | onFileEvent (const FileHandle &handle, FileEvent event) final |
Protected Member Functions inherited from CeresEngine::FileEventHandler | |
| virtual void | onFileCreated (const FileHandle &handle) |
| Called when a file or directory has been created. | |
| virtual void | onFileRemoved (const FileHandle &handle) |
| Called when a file or directory has been removed. | |
| virtual void | onFileModified (const FileHandle &handle) |
| Called when a file or directory has been modified. | |
| virtual void | onFileAttributesChanged (const FileHandle &handle) |
| Called when file attributes have been modified. | |
Private Attributes | |
| EventFunc | mFuncFileEvent |
| A Callback function for file system events. | |
A FileEventHandler that calls a function or a lambda.
| using CeresEngine::FunctionalFileEventHandler::EventFunc = std::function<void(const FileHandle&, FileEvent)> |
Callback function type for file system events.
| CeresEngine::FunctionalFileEventHandler::FunctionalFileEventHandler | ( | ) |
|
explicit |
Creates a new FunctionalFileEventHandler.
| funcFileEvent | A function that will be called on each file system event. |
|
final |
|
finalprotectedvirtual |
Reimplemented from CeresEngine::FileEventHandler.
|
private |
A Callback function for file system events.