|
LRDE Tiger Compiler
1.34a $Id: 7fef12e1f5fa43449d667a0eec1d837c40fc1202 $
|
Helper for handling paths. More...
#include <path.hh>

Public Member Functions | |
| bool | absolute_get () const |
| Whether is an absolute path. | |
| bool | empty () const |
| Whether is empty. | |
Constructors. | |
| path () | |
| path (std::string p) | |
| Init object with p. | |
| path (const char *p) | |
Operations on path. | |
| path & | operator= (const path &rhs) |
| path & | operator+= (const path &rhs) |
| path | operator+ (const std::string &rhs) const |
| bool | operator== (const path &rhs) const |
Printing and converting. | |
| operator std::string () const | |
| std::ostream & | dump (std::ostream &ostr) const |
Private Types | |
| typedef std::list< std::string > | path_type |
| path is represented with a list of directories. | |
Private Member Functions | |
| void | append_dir (std::string dir) |
| Append a single directory dir. | |
| void | init (std::string p) |
| Init object with path p. | |
Private Attributes | |
| path_type | path_ |
| Represented path. | |
| bool | absolute_ |
| "absolute" flag. | |
Helper for handling paths.
|
private |
path is represented with a list of directories.
| misc::path::path | ( | ) |
| misc::path::path | ( | std::string | p | ) |
Init object with p.
References absolute_, and append_dir().
| misc::path::path | ( | const char * | p | ) |
Init object with p. Useful when passing char[], e.g., when using literal C strings.
|
inline |
Whether is an absolute path.
References absolute_.
Referenced by misc::file_library::ensure_absolute_path(), misc::file_library::find_file(), and misc::file_library::push_current_directory().
|
private |
Append a single directory dir.
References path_, and precondition.
Referenced by operator+=(), and path().
| std::ostream & misc::path::dump | ( | std::ostream & | ostr | ) | const |
Referenced by misc::operator<<().
|
inline |
|
private |
Init object with path p.
| misc::path::operator std::string | ( | ) | const |
| path misc::path::operator+ | ( | const std::string & | rhs | ) | const |
References append_dir(), and path_.
|
private |
"absolute" flag.
Referenced by absolute_get(), operator=(), and path().
|
private |
Represented path.
Referenced by append_dir(), empty(), operator+=(), operator=(), and operator==().