ROLAND  0.70
Amstrad Emulator based on Caprice Source rewritten in C++.
directory.h
Go to the documentation of this file.
1 /***************************************************************************
2  * Copyright (C) 2005 by Fred Klaus *
3  * frednet@web.de *
4  * *
5  * This program is free software; you can redistribute it and/or modify *
6  * it under the terms of the GNU General Public License as published by *
7  * the Free Software Foundation; either version 2 of the License, or *
8  * (at your option) any later version. *
9  * *
10  * This program is distributed in the hope that it will be useful, *
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of *
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
13  * GNU General Public License for more details. *
14  * *
15  * You should have received a copy of the GNU General Public License *
16  * along with this program; if not, write to the *
17  * Free Software Foundation, Inc., *
18  * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
19  ***************************************************************************/
20 #ifndef DIRECTORY_H
21 #define DIRECTORY_H
22 
23 #include "compspec.h"
24 #include "filename.h"
25 
26 #include <vector>
27 
28 using std::vector;
29 
40 class Directory : public vector<FileName>
41 {
42 
43 public:
44  enum Options : char {None = 0, ParentDir = 1, OwnDir = 2, BothDir = 3};
45 
47  Directory() : vector<FileName>() {};
49  Directory(const FileName & path, Options options = Options::None, char letter = 0);
52 
54  void scan(const FileName & path, Options options = Options::None, char letter = 0);
55 
59  void sort();
64  void sort(bool casesensitive);
65 
67  const FileName & path() {return mDirName;}
68 
69 private:
71 };
72 
73 #endif //DIRECTORY_H
void sort()
Definition: directory.cpp:87
const FileName & path()
Returns the current path of the Directory.
Definition: directory.h:67
A [std::vector] for directory entries.
Definition: directory.h:40
Options options
Definition: directory.h:54
~Directory() ROLAND_DEFAULT void scan(const FileName &path
Standarddestructor.
[std::string] extension for filenames
Definition: filename.h:39
Definition: directory.h:44
FileName mDirName
Definition: directory.h:70
Definition: directory.h:44
Definition: directory.h:44
Options
Definition: directory.h:44
Definition: directory.h:44
#define ROLAND_DEFAULT
Definition: compspec.h:46
Options char letter
Definition: directory.h:54
Directory()
Standardconstructor.
Definition: directory.h:47