1 |
/*************************************************************************** |
/*************************************************************************** |
2 |
* * |
* * |
3 |
* Copyright (C) 2007 Christian Schoenebeck * |
* Copyright (C) 2007-2014 Christian Schoenebeck * |
4 |
* * |
* * |
5 |
* This library is free software; you can redistribute it and/or modify * |
* This library is free software; you can redistribute it and/or modify * |
6 |
* it under the terms of the GNU General Public License as published by * |
* it under the terms of the GNU General Public License as published by * |
44 |
*/ |
*/ |
45 |
class Path { |
class Path { |
46 |
public: |
public: |
47 |
|
/** |
48 |
|
* Default constructor. |
49 |
|
*/ |
50 |
Path(); |
Path(); |
51 |
|
|
52 |
/** |
/** |
53 |
|
* Creates a path object according to the local system's path conventions. |
54 |
|
* @see fromPosix(), fromWindows(), fromDbPath() |
55 |
|
*/ |
56 |
|
Path(std::string path); |
57 |
|
|
58 |
|
/** |
59 |
* Concatenate exactly one path node or filename to the end of this Path |
* Concatenate exactly one path node or filename to the end of this Path |
60 |
* object. This can be used to build up a full qualified path, directory |
* object. This can be used to build up a full qualified path, directory |
61 |
* by directory. |
* by directory. |
158 |
*/ |
*/ |
159 |
static std::string getBaseName(std::string path); |
static std::string getBaseName(std::string path); |
160 |
|
|
161 |
|
/** |
162 |
|
* Returns true if the path is reflecting an absolute path, false if it is |
163 |
|
* rather a relative path. |
164 |
|
*/ |
165 |
|
bool isAbsolute() const; |
166 |
|
|
167 |
private: |
private: |
168 |
std::vector<std::string> elements; ///< stores the path names raw = unencoded, each element is one node of the path |
std::vector<std::string> elements; ///< stores the path names raw = unencoded, each element is one node of the path |
169 |
char drive; |
char drive; |
170 |
|
bool absolute; |
171 |
}; |
}; |
172 |
|
|
173 |
} // namespace LinuxSampler |
} // namespace LinuxSampler |