![]() |
PUMA Library Reference Manual
|
#include <Puma/Filename.h>
Inheritance diagram for Puma::Filename:Abstraction of a filename using a smart pointer for automatic memory allocation / deallocation.
It encapsulates often needed operations like separating the path portion of the filename or the check whether the filename is absolute.
Public Member Functions | |
| Filename () | |
| Constructor. | |
| Filename (const char *filename) | |
| Constructor. | |
| Filename & | operator= (const char *filename) |
| Assign a new filename. | |
| bool | operator~ () const |
| Check if the filename is not NULL. | |
| bool | is_defined () const |
| Check if the filename is not NULL. | |
| void | name (const char *filename) |
| Set a new filename. | |
| const char * | name () const |
| Get the filename. | |
| const char * | path () |
| Get the path portion of the filename. | |
| const char * | root () |
| Get the root of an absolute filename, i.e. | |
| bool | is_absolute () const |
| Check whether the filename is absolute, i.e. | |
| bool | operator== (const Filename &filename) const |
| Check if this filename equals the given. | |
| bool | operator!= (const Filename &filename) const |
| Check if this filename not equals the given. | |
| virtual void | print (std::ostream &out) const |
| Print this filename on the given output stream. | |
Public Member Functions inherited from Puma::Printable | |
| virtual | ~Printable () |
| Destructor. | |
|
inline |
Constructor.
|
inline |
Constructor.
| filename | The filename. |
|
inline |
Check whether the filename is absolute, i.e.
starts at the root of the file system.
|
inline |
Check if the filename is not NULL.
|
inline |
Get the filename.
|
inline |
Set a new filename.
| filename | The new filename. |
|
inline |
Check if this filename not equals the given.
| filename | The other filename. |
|
inline |
Assign a new filename.
| filename | The filename. |
|
inline |
Check if this filename equals the given.
| filename | The other filename. |
|
inline |
Check if the filename is not NULL.
|
inline |
Get the path portion of the filename.
|
inlinevirtual |
Print this filename on the given output stream.
| out | The output stream. |
Implements Puma::Printable.
|
inline |
Get the root of an absolute filename, i.e.
everything up to the first path delimiter. This is for instance the drive portion of the filename on Windows (c:). On Unix systems this is simply a slash (/).