Symphony Of Empires
Eng3D::StringRef Struct Reference

A reference to a string on the global string pool. More...

#include <string.hpp>

Public Member Functions

constexpr StringRef ()=default
 
 StringRef (const std::string_view str)
 
constexpr StringRef (size_t _id)
 
StringRefoperator= (const std::string &rhs)
 
const std::string_view get_string () const
 
constexpr bool operator== (const StringRef &) const noexcept=default
 
constexpr auto operator<=> (const StringRef &) const noexcept=default
 
const char * c_str () const
 
 operator std::string () const
 
size_t get_id () const
 

Public Attributes

size_t id = 0
 

Detailed Description

A reference to a string on the global string pool.

Definition at line 39 of file string.hpp.

Constructor & Destructor Documentation

◆ StringRef() [1/3]

constexpr Eng3D::StringRef::StringRef ( )
constexprdefault
Here is the caller graph for this function:

◆ StringRef() [2/3]

Eng3D::StringRef::StringRef ( const std::string_view  str)

Definition at line 34 of file string.cpp.

Here is the call graph for this function:

◆ StringRef() [3/3]

constexpr Eng3D::StringRef::StringRef ( size_t  _id)
inlineconstexpr

Definition at line 42 of file string.hpp.

Member Function Documentation

◆ c_str()

const char* Eng3D::StringRef::c_str ( ) const
inline

Definition at line 55 of file string.hpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ get_id()

size_t Eng3D::StringRef::get_id ( ) const
inline

Definition at line 63 of file string.hpp.

Here is the caller graph for this function:

◆ get_string()

const std::string_view Eng3D::StringRef::get_string ( ) const

Definition at line 38 of file string.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ operator std::string()

Eng3D::StringRef::operator std::string ( ) const
inline

Definition at line 59 of file string.hpp.

Here is the call graph for this function:

◆ operator<=>()

constexpr auto Eng3D::StringRef::operator<=> ( const StringRef ) const
constexprdefaultnoexcept

◆ operator=()

StringRef& Eng3D::StringRef::operator= ( const std::string &  rhs)
inline

Definition at line 47 of file string.hpp.

Here is the call graph for this function:

◆ operator==()

constexpr bool Eng3D::StringRef::operator== ( const StringRef ) const
constexprdefaultnoexcept

Member Data Documentation

◆ id

size_t Eng3D::StringRef::id = 0

Definition at line 64 of file string.hpp.


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