Pyrogenesis  trunk
Public Types | Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes | List of all members
Path Class Reference

#include <path.h>

Public Types

typedef std::wstring String
 

Public Member Functions

 Path ()
 
 Path (const char *p)
 
 Path (const wchar_t *p)
 
 Path (const std::string &s)
 
 Path (const std::wstring &s)
 
Pathoperator= (const Path &rhs)
 
bool empty () const
 
const Stringstring () const
 
std::string string8 () const
 Return a UTF-8 version of the path, in a human-readable but potentially lossy form. More...
 
bool operator< (const Path &rhs) const
 
bool operator== (const Path &rhs) const
 
bool operator!= (const Path &rhs) const
 
bool IsDirectory () const
 
Path Parent () const
 
Path Filename () const
 
Path Basename () const
 
Path Extension () const
 
Path ChangeExtension (Path extension) const
 
Path operator/ (Path rhs) const
 
Path BeforeCommon (Path other) const
 Return the path before the common part of both paths. More...
 

Static Public Member Functions

static Status Validate (String::value_type c)
 

Private Member Functions

void PrintToDebugOutput () const
 
void DetectSeparator ()
 

Private Attributes

String path
 
wchar_t separator
 

Member Typedef Documentation

typedef std::wstring Path::String

Constructor & Destructor Documentation

Path::Path ( )
inline
Path::Path ( const char *  p)
inline
Path::Path ( const wchar_t p)
inline
Path::Path ( const std::string &  s)
inline
Path::Path ( const std::wstring &  s)
inline

Member Function Documentation

Path Path::Basename ( ) const
inline
Path Path::BeforeCommon ( Path  other) const
inline

Return the path before the common part of both paths.

Parameters
otherIndicates the start of the path which should be removed
Note
other should be a VfsPath, while this should be an OsPath
Path Path::ChangeExtension ( Path  extension) const
inline
void Path::DetectSeparator ( )
inlineprivate
bool Path::empty ( ) const
inline
Path Path::Extension ( ) const
inline
Path Path::Filename ( ) const
inline
bool Path::IsDirectory ( ) const
inline
bool Path::operator!= ( const Path rhs) const
inline
Path Path::operator/ ( Path  rhs) const
inline
bool Path::operator< ( const Path rhs) const
inline
Path& Path::operator= ( const Path rhs)
inline
bool Path::operator== ( const Path rhs) const
inline
Path Path::Parent ( ) const
inline
void Path::PrintToDebugOutput ( ) const
inlineprivate
const String& Path::string ( ) const
inline
std::string Path::string8 ( ) const
inline

Return a UTF-8 version of the path, in a human-readable but potentially lossy form.

It is not safe to take this string and construct a new Path object from it (it may fail for some non-ASCII paths) - it should only be used for displaying paths to users.

Status Path::Validate ( String::value_type  c)
static

Member Data Documentation

String Path::path
private
wchar_t Path::separator
private

The documentation for this class was generated from the following files: