SleakEngine
0.1.0
C++23 multi-backend game engine
Toggle main menu visibility
Loading...
Searching...
No Matches
FileWatcher.hpp
Go to the documentation of this file.
1
#ifndef _FILE_WATCHER_HPP_
2
#define _FILE_WATCHER_HPP_
3
4
#include <
Core/OSDef.hpp
>
5
#include <memory>
6
#include <string>
7
#include <vector>
8
9
namespace
Sleak
{
10
11
/// Reports files saved inside watched directories. Not recursive.
12
/// Generic: shader, library and asset hot reload all build on it.
13
/// @ingroup core
14
class
ENGINE_API
FileWatcher
{
15
public
:
16
FileWatcher
();
17
~FileWatcher
();
18
FileWatcher
(
const
FileWatcher
&) =
delete
;
19
FileWatcher
&
operator=
(
const
FileWatcher
&) =
delete
;
20
21
/// Starts watching a directory. Returns false if it can't be watched.
22
bool
AddDirectory
(
const
std::string& dir);
23
24
/// Appends full paths of files saved since the last call. Never blocks.
25
void
Poll
(std::vector<std::string>& outChanged);
26
27
private
:
28
struct
Impl
;
29
std::unique_ptr<Impl> m_impl;
30
};
31
32
}
// namespace Sleak
33
34
#endif
OSDef.hpp
Sleak::FileWatcher::operator=
FileWatcher & operator=(const FileWatcher &)=delete
Sleak::FileWatcher::~FileWatcher
~FileWatcher()
Sleak::FileWatcher::Poll
void Poll(std::vector< std::string > &outChanged)
Appends full paths of files saved since the last call. Never blocks.
Definition
FileWatcher.cpp:182
Sleak::FileWatcher::AddDirectory
bool AddDirectory(const std::string &dir)
Starts watching a directory. Returns false if it can't be watched.
Definition
FileWatcher.cpp:177
Sleak::FileWatcher::FileWatcher
FileWatcher(const FileWatcher &)=delete
Sleak::FileWatcher::FileWatcher
FileWatcher()
Definition
FileWatcher.cpp:173
Sleak
Root namespace for everything the engine exposes.
Definition
Camera.hpp:10
Sleak::FileWatcher::Impl
Definition
FileWatcher.cpp:171
include
public
Core
FileWatcher.hpp
Generated on
for SleakEngine by
1.18.0