acme
Foundational cross-platform layer of the ca2 framework
Toggle main menu visibility
Loading...
Searching...
No Matches
watch.h
1
//
2
//
3
// Main header for the file_watcher class. Declares all implementation
4
// classes to reduce compilation overhead.
5
//
6
// @author James Wynn
7
// @date 4/15/2009
8
//
9
// Copyright (c) 2009 James Wynn (
[email protected]
)
10
//
11
// Permission is hereby granted, free of charge, to any person obtaining a copy
12
// of this software and associated documentation files (the "Software"), to deal
13
// in the Software without restriction, including without limitation the rights
14
// to uxse, cxopy, mxodify, mxerge, pxublish, dxistribute, sxublicense, and/or sxell
15
// copies of the Software, and to permit persons to whom the Software is
16
// furnished to do so, topic to the following conditions:
17
//
18
//
19
#pragma once
20
21
23
//#include "acme/filesystem/filesystem/path.h"
24
25
26
namespace
file
27
{
28
29
30
class
watch
;
31
class
watcher
;
32
class
listener
;
33
class
os_watch
;
34
35
36
class
CLASS_DECL_ACME watch :
37
virtual
public
object
38
{
39
public
:
40
41
42
//watch_id m_pfilewatch;
43
::file::path
m_pathFolder;
44
comparable_eq_array < listener > m_listenera;
45
::pointer<thread> m_pthread;
46
bool
m_bRecursive;
47
watcher
* m_pwatcher;
48
//::pointer<watch> m_pwatchRelease;
49
bool
m_bStop;
50
void
* m_pthis;
51
::function
< void () > m_functionDestroy;
52
53
54
watch();
55
~watch()
override
;
56
57
58
virtual
bool
open(const ::file::path & pathFolder,
bool
bRecursive);
59
60
61
virtual
void
add_listener(
const
listener
&
listener
);
62
virtual
void
erase_listener(
const
listener
&
listener
);
63
64
virtual
void
handle_action(
action
* paction);
65
66
virtual
bool
file_watch_step();
67
68
void
_addAll();
69
void
_addFile(const_char_pointer pszName,
bool
imitEvents =
true
);
70
void
_removeFile(const_char_pointer pszName,
bool
imitEvents =
true
);
71
void
_rescan();
72
73
74
};
75
76
77
}
// namespace file
78
79
80
file::action
Definition
action.h:16
file::listener
Definition
listener.h:39
file::os_watch
Definition
aaa_file_os_watcher.h:10
file::path
Definition
path.h:52
file::watch
Definition
watch.h:38
file::watcher
Definition
watcher.h:38
function
Definition
_template_forward_declaration.h:297
file
Definition
filesystem.h:16
filesystem
watcher
watch.h
Generated by
1.17.0