Castor3D 0.16.0
Multiplatform 3D engine
Public Member Functions | Static Public Attributes | List of all members
castor::Path Class Reference

#include <Path.hpp>

Inheritance diagram for castor::Path:
Inheritance graph
[legend]
Collaboration diagram for castor::Path:
Collaboration graph
[legend]

Public Member Functions

CU_API Path ()=default
 
CU_API ~Path ()=default
 
CU_API Path (char const *data)
 Constructor from a char array.
 
CU_API Path (wchar_t const *data)
 Constructor from a wchar_t array.
 
CU_API Path (String const &data)
 Constructor from a String.
 
CU_API Path (StringView data)
 Constructor from a String.
 
CU_API Path (Path const &data)
 Copy Constructor.
 
CU_API Path (Path &&data) noexcept
 Move Constructor.
 
CU_API Pathoperator= (Path const &data)
 Copy assignment operator.
 
CU_API Pathoperator= (Path &&data) noexcept
 Move assignment operator.
 
CU_API Pathoperator/= (Path const &path)
 Appends a path to the current path. adds the separator if needed.
 
CU_API Pathoperator/= (StringView string)
 adds a string to the current path. Adds the separator if needed
 
CU_API Pathoperator/= (char const *buffer)
 adds a MBCS C string to the current path. Adds the separator if needed
 
CU_API Pathoperator/= (wchar_t const *buffer)
 adds a Unicode C string to the current path. Adds the separator if needed
 
CU_API Pathoperator+= (Path const &path)
 Appends a path to the current path.
 
CU_API Pathoperator+= (StringView string)
 adds a string to the current path.
 
CU_API Pathoperator+= (char const *buffer)
 adds a MBCS C string to the current path.
 
CU_API Pathoperator+= (wchar_t const *buffer)
 adds a Unicode C string to the current path.
 
CU_API Path getPath () const
 Retrieves the parent path.
 
CU_API Path getFileName (bool withExtension=false) const
 Retrieves the leaf of this path (filename and extension for files).
 
CU_API Path getFullFileName () const
 Retrieves the full path and leaf.
 
CU_API String getExtension () const
 Retrieves the extension of the file name, if any.
 
CU_API String toGeneric () const
 

Static Public Attributes

static CU_API const xchar NativeSeparator
 
static CU_API const xchar GenericSeparator
 

Constructor & Destructor Documentation

◆ Path() [1/7]

CU_API castor::Path::Path ( )
default

◆ ~Path()

CU_API castor::Path::~Path ( )
default

◆ Path() [2/7]

CU_API castor::Path::Path ( char const * data)
explicit

Constructor from a char array.

Parameters
[in]dataThe char array

◆ Path() [3/7]

CU_API castor::Path::Path ( wchar_t const * data)
explicit

Constructor from a wchar_t array.

Parameters
[in]dataThe wchar_t array

◆ Path() [4/7]

CU_API castor::Path::Path ( String const & data)
explicit

Constructor from a String.

Parameters
[in]dataThe String

◆ Path() [5/7]

CU_API castor::Path::Path ( StringView data)
explicit

Constructor from a String.

Parameters
[in]dataThe String

◆ Path() [6/7]

CU_API castor::Path::Path ( Path const & data)

Copy Constructor.

Parameters
[in]dataThe Path object to copy

◆ Path() [7/7]

CU_API castor::Path::Path ( Path && data)
noexcept

Move Constructor.

Parameters
[in]dataThe Path object to move

Member Function Documentation

◆ getExtension()

CU_API String castor::Path::getExtension ( ) const

Retrieves the extension of the file name, if any.

Returns
The extension

◆ getFileName()

CU_API Path castor::Path::getFileName ( bool withExtension = false) const

Retrieves the leaf of this path (filename and extension for files).

Parameters
[in]withExtensionTells if we want extension or not, for files.
Returns
The leaf.

Referenced by castor3d::ImporterFile::getName().

Here is the caller graph for this function:

◆ getFullFileName()

CU_API Path castor::Path::getFullFileName ( ) const

Retrieves the full path and leaf.

Returns
The full path and leaf

Referenced by castor::File::getFileName().

Here is the caller graph for this function:

◆ getPath()

CU_API Path castor::Path::getPath ( ) const

Retrieves the parent path.

Returns
The parent path

Referenced by castor::File::getFilePath().

Here is the caller graph for this function:

◆ operator+=() [1/4]

CU_API Path & castor::Path::operator+= ( char const * buffer)

adds a MBCS C string to the current path.

Parameters
[in]bufferThe path to add

◆ operator+=() [2/4]

CU_API Path & castor::Path::operator+= ( Path const & path)

Appends a path to the current path.

Parameters
[in]pathThe path to add

◆ operator+=() [3/4]

CU_API Path & castor::Path::operator+= ( StringView string)

adds a string to the current path.

Parameters
[in]stringThe path to add

◆ operator+=() [4/4]

CU_API Path & castor::Path::operator+= ( wchar_t const * buffer)

adds a Unicode C string to the current path.

Parameters
[in]bufferThe path to add

◆ operator/=() [1/4]

CU_API Path & castor::Path::operator/= ( char const * buffer)

adds a MBCS C string to the current path. Adds the separator if needed

Parameters
[in]bufferThe path to add

◆ operator/=() [2/4]

CU_API Path & castor::Path::operator/= ( Path const & path)

Appends a path to the current path. adds the separator if needed.

Parameters
[in]pathThe path to add

◆ operator/=() [3/4]

CU_API Path & castor::Path::operator/= ( StringView string)

adds a string to the current path. Adds the separator if needed

Parameters
[in]stringThe path to add

◆ operator/=() [4/4]

CU_API Path & castor::Path::operator/= ( wchar_t const * buffer)

adds a Unicode C string to the current path. Adds the separator if needed

Parameters
[in]bufferThe path to add

◆ operator=() [1/2]

CU_API Path & castor::Path::operator= ( Path && data)
noexcept

Move assignment operator.

Parameters
[in]dataThe Path object to move
Returns
A reference to this Path object

◆ operator=() [2/2]

CU_API Path & castor::Path::operator= ( Path const & data)

Copy assignment operator.

Parameters
[in]dataThe Path object to copy
Returns
A reference to this Path object

◆ toGeneric()

CU_API String castor::Path::toGeneric ( ) const
Returns
The file path, with generic /.

Member Data Documentation

◆ GenericSeparator

CU_API const xchar castor::Path::GenericSeparator
static

Path separator (OS independant).

◆ NativeSeparator

CU_API const xchar castor::Path::NativeSeparator
static

Path separator (OS dependant).


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