synfig-core
1.0.3
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
src
synfig
filesystemgroup.h
Go to the documentation of this file.
1
/* === S Y N F I G ========================================================= */
21
/* ========================================================================= */
22
23
/* === S T A R T =========================================================== */
24
25
#ifndef __SYNFIG_FILESYSTEMGROUP_H
26
#define __SYNFIG_FILESYSTEMGROUP_H
27
28
/* === H E A D E R S ======================================================= */
29
30
#include <list>
31
#include "
filesystem.h
"
32
33
/* === M A C R O S ========================================================= */
34
35
/* === T Y P E D E F S ===================================================== */
36
37
/* === C L A S S E S & S T R U C T S ======================================= */
38
39
namespace
synfig
40
{
41
42
class
FileSystemGroup
:
public
FileSystem
43
{
44
public
:
45
struct
Entry
46
{
47
std::string
prefix
;
48
Handle
file_system
;
49
inline
Entry
() { }
50
inline
Entry
(
const
std::string
&
prefix
,
const
Handle
&
file_system
):
51
prefix(prefix), file_system(file_system) { }
52
};
53
54
private
:
55
std::list< Entry > entries_;
56
57
bool
find_system(
const
std::string
&filename,
FileSystem::Handle
&out_file_system,
std::string
&out_filename);
58
59
public
:
60
FileSystemGroup
();
61
explicit
FileSystemGroup
(
Handle
default_file_system);
62
63
void
register_system
(
const
std::string
&prefix,
FileSystem::Handle
file_system);
64
void
unregister_system
(
const
std::string
&prefix);
65
66
virtual
bool
is_file
(
const
std::string
&filename);
67
virtual
bool
is_directory
(
const
std::string
&filename);
68
69
virtual
bool
directory_create
(
const
std::string
&dirname);
70
71
virtual
bool
file_remove
(
const
std::string
&filename);
72
virtual
bool
file_rename
(
const
std::string
&from_filename,
const
std::string
&to_filename);
73
virtual
ReadStreamHandle
get_read_stream
(
const
std::string
&filename);
74
virtual
WriteStreamHandle
get_write_stream
(
const
std::string
&filename);
75
};
76
77
}
78
79
/* === E N D =============================================================== */
80
81
#endif
Generated on Mon Nov 16 2015 15:33:40 for synfig-core by
1.8.1.2