Mantid
Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | Private Attributes | List of all members
Mantid::Nexus::NexusAddress Class Reference

This simple class encapsulates some methods for working with paths inside a Nexus file. More...

#include <NexusAddress.h>

Public Member Functions

char const * c_str () const
 
NexusAddress fromRoot () const
 
bool isAbsolute () const
 
bool isRoot () const
 
 NexusAddress ()
 
 NexusAddress (char const *const p)
 
 NexusAddress (NexusAddress const &nd)=default
 
 NexusAddress (std::filesystem::path const &p)
 
 NexusAddress (std::string const &p)
 
 operator std::string () const
 
bool operator!= (char const *const s) const
 
bool operator!= (NexusAddress const &p) const
 
bool operator!= (std::string const &s) const
 
std::string operator+ (char const s[]) const
 
std::string operator+ (std::string const &s) const
 
NexusAddress operator/ (char const *const s) const
 
NexusAddress operator/ (NexusAddress const &p) const
 
NexusAddress operator/ (std::string const &s) const
 
NexusAddressoperator/= (char const *const s)
 
NexusAddressoperator/= (NexusAddress const &p)
 
NexusAddressoperator/= (std::string const &s)
 
NexusAddressoperator= (NexusAddress const &nd)=default
 
NexusAddressoperator= (std::string const &s)
 
bool operator== (char const *const s) const
 
bool operator== (NexusAddress const &p) const
 
bool operator== (std::string const &s) const
 
NexusAddress parent_path () const
 
std::vector< std::string > parts () const
 
NexusAddress stem () const
 
std::string const & string () const
 
 ~NexusAddress ()=default
 

Static Public Member Functions

static NexusAddress root ()
 

Private Attributes

std::filesystem::path m_path
 standard filesystem path
 
std::string m_resolved_path
 

Detailed Description

This simple class encapsulates some methods for working with paths inside a Nexus file.

The base is std::filesystem::path, but the root will always resolve to "/" regardless of OS. New paths are always cast to lexically normal during creation.

Definition at line 22 of file NexusAddress.h.

Constructor & Destructor Documentation

◆ NexusAddress() [1/5]

Mantid::Nexus::NexusAddress::NexusAddress ( std::filesystem::path const &  p)

Definition at line 34 of file NexusAddress.cpp.

◆ NexusAddress() [2/5]

Mantid::Nexus::NexusAddress::NexusAddress ( std::string const &  p)

Definition at line 37 of file NexusAddress.cpp.

◆ NexusAddress() [3/5]

Mantid::Nexus::NexusAddress::NexusAddress ( char const *const  p)

Definition at line 39 of file NexusAddress.cpp.

◆ NexusAddress() [4/5]

Mantid::Nexus::NexusAddress::NexusAddress ( )

◆ NexusAddress() [5/5]

Mantid::Nexus::NexusAddress::NexusAddress ( NexusAddress const &  nd)
default

◆ ~NexusAddress()

Mantid::Nexus::NexusAddress::~NexusAddress ( )
default

Member Function Documentation

◆ c_str()

char const * Mantid::Nexus::NexusAddress::c_str ( ) const
inline

Definition at line 95 of file NexusAddress.h.

◆ fromRoot()

NexusAddress Mantid::Nexus::NexusAddress::fromRoot ( ) const

Definition at line 85 of file NexusAddress.cpp.

References m_path, and NexusAddress().

◆ isAbsolute()

bool Mantid::Nexus::NexusAddress::isAbsolute ( ) const

Definition at line 79 of file NexusAddress.cpp.

References m_path.

◆ isRoot()

bool Mantid::Nexus::NexusAddress::isRoot ( ) const

Definition at line 81 of file NexusAddress.cpp.

References m_path.

◆ operator std::string()

Mantid::Nexus::NexusAddress::operator std::string ( ) const
inline

Definition at line 91 of file NexusAddress.h.

◆ operator!=() [1/3]

bool Mantid::Nexus::NexusAddress::operator!= ( char const *const  s) const

Definition at line 59 of file NexusAddress.cpp.

References m_resolved_path.

◆ operator!=() [2/3]

bool Mantid::Nexus::NexusAddress::operator!= ( NexusAddress const &  p) const

Definition at line 55 of file NexusAddress.cpp.

References m_path.

◆ operator!=() [3/3]

bool Mantid::Nexus::NexusAddress::operator!= ( std::string const &  s) const

Definition at line 57 of file NexusAddress.cpp.

References m_resolved_path.

◆ operator+() [1/2]

std::string Mantid::Nexus::NexusAddress::operator+ ( char const  s[]) const

Definition at line 93 of file NexusAddress.cpp.

References m_resolved_path.

◆ operator+() [2/2]

std::string Mantid::Nexus::NexusAddress::operator+ ( std::string const &  s) const

Definition at line 91 of file NexusAddress.cpp.

References m_resolved_path.

◆ operator/() [1/3]

NexusAddress Mantid::Nexus::NexusAddress::operator/ ( char const *const  s) const

Definition at line 63 of file NexusAddress.cpp.

References NexusAddress().

◆ operator/() [2/3]

NexusAddress Mantid::Nexus::NexusAddress::operator/ ( NexusAddress const &  p) const

Definition at line 65 of file NexusAddress.cpp.

References m_path, and NexusAddress().

◆ operator/() [3/3]

NexusAddress Mantid::Nexus::NexusAddress::operator/ ( std::string const &  s) const

Definition at line 61 of file NexusAddress.cpp.

References NexusAddress().

◆ operator/=() [1/3]

NexusAddress & Mantid::Nexus::NexusAddress::operator/= ( char const *const  s)

Definition at line 71 of file NexusAddress.cpp.

References NexusAddress().

◆ operator/=() [2/3]

NexusAddress & Mantid::Nexus::NexusAddress::operator/= ( NexusAddress const &  p)

Definition at line 73 of file NexusAddress.cpp.

References m_path, and m_resolved_path.

◆ operator/=() [3/3]

NexusAddress & Mantid::Nexus::NexusAddress::operator/= ( std::string const &  s)

Definition at line 69 of file NexusAddress.cpp.

References NexusAddress().

◆ operator=() [1/2]

NexusAddress & Mantid::Nexus::NexusAddress::operator= ( NexusAddress const &  nd)
default

◆ operator=() [2/2]

NexusAddress & Mantid::Nexus::NexusAddress::operator= ( std::string const &  s)

Definition at line 43 of file NexusAddress.cpp.

References m_path, and m_resolved_path.

◆ operator==() [1/3]

bool Mantid::Nexus::NexusAddress::operator== ( char const *const  s) const

Definition at line 53 of file NexusAddress.cpp.

References m_resolved_path.

◆ operator==() [2/3]

bool Mantid::Nexus::NexusAddress::operator== ( NexusAddress const &  p) const

Definition at line 49 of file NexusAddress.cpp.

References m_path.

◆ operator==() [3/3]

bool Mantid::Nexus::NexusAddress::operator== ( std::string const &  s) const

Definition at line 51 of file NexusAddress.cpp.

References m_resolved_path.

◆ parent_path()

NexusAddress Mantid::Nexus::NexusAddress::parent_path ( ) const

Definition at line 83 of file NexusAddress.cpp.

References m_path, and NexusAddress().

Referenced by Mantid::Nexus::NXDataSet::open().

◆ parts()

std::vector< std::string > Mantid::Nexus::NexusAddress::parts ( ) const

Definition at line 95 of file NexusAddress.cpp.

References m_path.

◆ root()

NexusAddress Mantid::Nexus::NexusAddress::root ( )
static

Definition at line 89 of file NexusAddress.cpp.

References NexusAddress().

Referenced by Mantid::Nexus::NXDataSet::open().

◆ stem()

NexusAddress Mantid::Nexus::NexusAddress::stem ( ) const

Definition at line 87 of file NexusAddress.cpp.

References m_path, and NexusAddress().

Referenced by Mantid::Nexus::NXObject::name().

◆ string()

std::string const & Mantid::Nexus::NexusAddress::string ( ) const
inline

Definition at line 93 of file NexusAddress.h.

Referenced by operator!=(), operator+(), operator+(), operator<<(), and operator==().

Member Data Documentation

◆ m_path

std::filesystem::path Mantid::Nexus::NexusAddress::m_path
private

standard filesystem path

Definition at line 99 of file NexusAddress.h.

Referenced by fromRoot(), isAbsolute(), isRoot(), operator!=(), operator/(), operator/=(), operator=(), operator==(), parent_path(), parts(), and stem().

◆ m_resolved_path

std::string Mantid::Nexus::NexusAddress::m_resolved_path
private

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