A unix-style path string which can be modified at runtime. More...
#include <fs_path.h>
Public Member Functions | |
UnixPath (const char *root) | |
Constructs with the directory root . | |
bool | empty () const |
const char * | c_str () const |
void | push (const char *name) |
Appends the directory name . | |
void | push (const std::string &name) |
Appends the directory name . | |
void | push (const char *first, const char *last) |
Appends the directory [first , last ). | |
void | push_filename (const char *name) |
Appends the filename name . | |
void | push_filename (const std::string &name) |
Appends the filename name . | |
void | pop () |
Removes the last directory or filename appended. | |
Private Member Functions | |
void | check_separator () |
Private Attributes | |
StringBuffer | m_string |
A unix-style path string which can be modified at runtime.
Definition at line 31 of file fs_path.h.
UnixPath::UnixPath | ( | const char * | root | ) | [inline] |
Constructs with the directory root
.
Definition at line 42 of file fs_path.h.
References check_separator().
const char* UnixPath::c_str | ( | ) | const [inline] |
void UnixPath::check_separator | ( | ) | [inline, private] |
bool UnixPath::empty | ( | ) | const [inline] |
Definition at line 47 of file fs_path.h.
References m_string.
Referenced by check_separator(), and pop().
void UnixPath::pop | ( | ) | [inline] |
void UnixPath::push | ( | const char * | first, | |
const char * | last | |||
) | [inline] |
Appends the directory [first
, last
).
Definition at line 66 of file fs_path.h.
References check_separator(), and m_string.
void UnixPath::push | ( | const std::string & | name | ) | [inline] |
Appends the directory name
.
Definition at line 61 of file fs_path.h.
References check_separator(), and m_string.
void UnixPath::push | ( | const char * | name | ) | [inline] |
Appends the directory name
.
Definition at line 56 of file fs_path.h.
References check_separator(), and m_string.
void UnixPath::push_filename | ( | const std::string & | name | ) | [inline] |
void UnixPath::push_filename | ( | const char * | name | ) | [inline] |
StringBuffer UnixPath::m_string [private] |
Definition at line 32 of file fs_path.h.
Referenced by c_str(), check_separator(), empty(), pop(), push(), and push_filename().