Safeheron-SGX-Native-Development-Framework v1.2.0
Loading...
Searching...
No Matches
ssgx::filesystem_t::Path Class Reference

A class for storing path. More...

#include <ssgx_filesystem_t.h>

Public Member Functions

 Path () noexcept
 Construct a Path and initialize it.
 
 Path (const Path &p)
 Construct a Path and initialize it.
 
 Path (Path &&p) noexcept
 A move constructor.
 
 Path (string_type &&source)
 A move constructor.
 
 ~Path ()=default
 Destruction.
 
Pathoperator= (const Path &p)
 A copy assignment operator.
 
Pathoperator= (Path &&p) noexcept
 A move assignment operator.
 
Pathoperator= (string_type &&source) noexcept
 A move assignment operator.
 
Pathassign (string_type &&source) noexcept
 A move assignment operator.
 
Pathoperator+= (const Path &x)
 Appends operator.
 
Pathoperator+= (const string_type &x)
 Appends operator.
 
Pathoperator/= (const Path &p)
 Appends operator.
 
bool IsAbsolute () const noexcept
 Check if the path is absolute.
 
bool HasFilename () const noexcept
 Check if the path has a file name.
 
bool Empty () const noexcept
 Check if the path is empty.
 
const char * c_str () const noexcept
 Return the string of Path.
 
std::string String () const
 Return the string of Path.
 
void Clear () noexcept
 Clear the Path object.
 

Friends

bool operator== (const Path &lhs, const Path &rhs) noexcept
 Compare whether the Paths are the same.
 
bool operator!= (const Path &lhs, const Path &rhs) noexcept
 Compare whether the Paths are different.
 
Path operator/ (const Path &lhs, const Path &rhs)
 Appends operator.
 

Detailed Description

A class for storing path.

Constructor & Destructor Documentation

◆ Path() [1/4]

ssgx::filesystem_t::Path::Path ( )
inlinenoexcept

Construct a Path and initialize it.

◆ Path() [2/4]

ssgx::filesystem_t::Path::Path ( const Path & p)
inline

Construct a Path and initialize it.

◆ Path() [3/4]

ssgx::filesystem_t::Path::Path ( Path && p)
inlinenoexcept

A move constructor.

◆ Path() [4/4]

ssgx::filesystem_t::Path::Path ( string_type && source)
inline

A move constructor.

◆ ~Path()

ssgx::filesystem_t::Path::~Path ( )
default

Destruction.

Member Function Documentation

◆ assign()

Path & ssgx::filesystem_t::Path::assign ( string_type && source)
inlinenoexcept

A move assignment operator.

Returns
A Path object moved from another Path object

◆ c_str()

const char * ssgx::filesystem_t::Path::c_str ( ) const
inlinenoexcept

Return the string of Path.

Returns
The string of Path

◆ Clear()

void ssgx::filesystem_t::Path::Clear ( )
inlinenoexcept

Clear the Path object.

◆ Empty()

bool ssgx::filesystem_t::Path::Empty ( ) const
inlinenoexcept

Check if the path is empty.

Returns
Return true if it is empty; otherwise return false

◆ HasFilename()

bool ssgx::filesystem_t::Path::HasFilename ( ) const
inlinenoexcept

Check if the path has a file name.

Returns
Return true if it has filename; otherwise, return false

◆ IsAbsolute()

bool ssgx::filesystem_t::Path::IsAbsolute ( ) const
inlinenoexcept

Check if the path is absolute.

Returns
Return true if the path is absolute; otherwise, return false

◆ operator+=() [1/2]

Path & ssgx::filesystem_t::Path::operator+= ( const Path & x)
inline

Appends operator.

Parameters
[in]xPath
Returns
The concatenated path

◆ operator+=() [2/2]

Path & ssgx::filesystem_t::Path::operator+= ( const string_type & x)
inline

Appends operator.

Parameters
[in]xPath of string type
Returns
The concatenated path

◆ operator/=()

Path & ssgx::filesystem_t::Path::operator/= ( const Path & p)
inline

Appends operator.

  1. If right Path is an absolute path, then left Path = right Path
  2. If left Path has filename, then left Path = left Path + '/' + right Path
  3. Otherwise left Path = left Path + right Path
Parameters
[in]pPath
Returns
A Path object

◆ operator=() [1/3]

Path & ssgx::filesystem_t::Path::operator= ( const Path & p)
inline

A copy assignment operator.

Returns
A Path object copied from another Path object

◆ operator=() [2/3]

Path & ssgx::filesystem_t::Path::operator= ( Path && p)
inlinenoexcept

A move assignment operator.

Returns
A Path object moved from another Path object

◆ operator=() [3/3]

Path & ssgx::filesystem_t::Path::operator= ( string_type && source)
inlinenoexcept

A move assignment operator.

Returns
A Path object moved from another Path object

◆ String()

std::string ssgx::filesystem_t::Path::String ( ) const
inline

Return the string of Path.

Returns
The string of Path

Friends And Related Symbol Documentation

◆ operator!=

bool operator!= ( const Path & lhs,
const Path & rhs )
friend

Compare whether the Paths are different.

Parameters
[in]lhsLeft Path
[in]rhsRight Path
Returns
Return true if they are different; otherwise, return false

◆ operator/

Path operator/ ( const Path & lhs,
const Path & rhs )
friend

Appends operator.

  1. If right Path is an absolute path, then left Path = right Path
  2. If left Path has filename, then left Path = left Path + '/' + right Path
  3. Otherwise left Path = left Path + right Path
Parameters
[in]lhsLeft Path
[in]rhsRight Path
Returns
A Path object

◆ operator==

bool operator== ( const Path & lhs,
const Path & rhs )
friend

Compare whether the Paths are the same.

Parameters
[in]lhsLeft Path
[in]rhsRight Path
Returns
Return true if they are the same; otherwise, return false

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