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

using String = std::wstring
 

Public Member Functions

 Path ()
 
 Path (const Path &p)
 
 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 = L'/'
 

Member Typedef Documentation

◆ String

using Path::String = std::wstring

Constructor & Destructor Documentation

◆ Path() [1/6]

Path::Path ( )
inline

◆ Path() [2/6]

Path::Path ( const Path p)
inline

◆ Path() [3/6]

Path::Path ( const char *  p)
inline

◆ Path() [4/6]

Path::Path ( const wchar_t *  p)
inline

◆ Path() [5/6]

Path::Path ( const std::string &  s)
inline

◆ Path() [6/6]

Path::Path ( const std::wstring &  s)
inline

Member Function Documentation

◆ Basename()

Path Path::Basename ( ) const
inline

◆ BeforeCommon()

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

◆ ChangeExtension()

Path Path::ChangeExtension ( Path  extension) const
inline

◆ DetectSeparator()

void Path::DetectSeparator ( )
inlineprivate

◆ empty()

bool Path::empty ( ) const
inline

◆ Extension()

Path Path::Extension ( ) const
inline

◆ Filename()

Path Path::Filename ( ) const
inline

◆ IsDirectory()

bool Path::IsDirectory ( ) const
inline

◆ operator!=()

bool Path::operator!= ( const Path rhs) const
inline

◆ operator/()

Path Path::operator/ ( Path  rhs) const
inline

◆ operator<()

bool Path::operator< ( const Path rhs) const
inline

◆ operator=()

Path& Path::operator= ( const Path rhs)
inline

◆ operator==()

bool Path::operator== ( const Path rhs) const
inline

◆ Parent()

Path Path::Parent ( ) const
inline

◆ PrintToDebugOutput()

void Path::PrintToDebugOutput ( ) const
inlineprivate

◆ string()

const String& Path::string ( ) const
inline

◆ string8()

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.

◆ Validate()

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

Member Data Documentation

◆ path

String Path::path
private

◆ separator

wchar_t Path::separator = L'/'
private

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