source: dev/trunk/ab5.0/abdev/abdev/include/ProjectManager/FileManager.h@ 829

Last change on this file since 829 was 829, checked in by イグトランス (egtra), 12 years ago

svn:eol-styleとsvn:mime-type(文字コード指定含む)の設定

  • Property svn:eol-style set to native
  • Property svn:mime-type set to text/plain; charset=Shift_JIS
File size: 1.3 KB
Line 
1#pragma once
2
3namespace ActiveBasic{ namespace PM{ namespace FM{
4
5
6class ItemBase
7{
8 HTREEITEM hTreeItem;
9
10public:
11 ItemBase( HTREEITEM hTreeItem )
12 : hTreeItem( hTreeItem )
13 {
14 }
15
16 HTREEITEM GetTreeItemHandle() const
17 {
18 return hTreeItem;
19 }
20 void SetTreeViewHandle( HTREEITEM hTreeItem )
21 {
22 this->hTreeItem = hTreeItem;
23 }
24};
25
26class File
27 : public ItemBase
28{
29 std::string relationalPath;
30
31public:
32 File( const std::string &relationalPath, HTREEITEM hTreeItem );
33
34 const std::string &GetRelationalPath() const
35 {
36 return relationalPath;
37 }
38 const std::string GetFullPath() const;
39};
40typedef std::vector<File> Files;
41
42class Folder;
43typedef std::vector<Folder> Folders;
44
45class Folder
46 : public ItemBase
47{
48 std::string name;
49public:
50 Files files;
51 Folders folders;
52
53 Folder( const std::string &name, HTREEITEM hTreeItem )
54 : ItemBase( hTreeItem )
55 , name( name )
56 {
57 }
58
59 const std::string &GetName() const
60 {
61 return name;
62 }
63
64 bool IsEmpty() const;
65 void Clear();
66 File &FindFile( HTREEITEM hTreeItem );
67 File &FindFile( const std::string &path );
68 bool IsExistFile( HTREEITEM hTreeItem ) const;
69 bool IsExistFile( const std::string &path ) const;
70 void Remove( HTREEITEM hTreeItem );
71};
72
73class FileSystem
74{
75public:
76 Folder root;
77 boost::mutex mutex;
78
79 FileSystem( const std::string &rootFolderName )
80 : root( rootFolderName, NULL )
81 {
82 }
83};
84
85
86}}}
Note: See TracBrowser for help on using the repository browser.