Spicy
Public Types | Public Member Functions | List of all members
hilti::ID Class Reference

#include <id.h>

Inheritance diagram for hilti::ID:
hilti::detail::IDBase< ID >

Public Types

using Base = detail::IDBase< ID >
 

Public Member Functions

 ID ()
 
 ID (const char *s)
 
 ID (std::string_view s)
 
 ID (std::string_view s, AlreadyNormalized n)
 
template<typename... T, typename enable = std::enable_if_t<(... && std::is_convertible_v<T, std::string_view>)>>
 ID (const T &... s)
 
 ID (std::initializer_list< std::string_view > x)
 
 ID (const Base &other)
 
 ID (Base &&other) noexcept
 
- Public Member Functions inherited from hilti::detail::IDBase< ID >
IDBaseoperator= (const IDBase &other)
 
IDBaseoperator= (IDBase &&other) noexcept
 
const std::string & str () const
 
ID local () const
 
ID namespace_ () const
 
bool empty () const
 
size_t length () const
 
bool isAbsolute () const
 
ID sub (int i) const
 
ID sub (int from, int to) const
 
ID relativeTo (const ID &root) const
 
ID makeAbsolute () const
 
IDoperator+= (const ID &other)
 
IDoperator+= (std::string_view other)
 
ID operator+ (std::string_view other) const
 
ID operator+ (const ID &other) const
 
bool operator== (const ID &other) const
 
bool operator!= (const ID &other) const
 
bool operator< (const ID &other) const
 
 operator bool () const
 
 operator std::string () const
 
 operator std::string_view () const
 

Detailed Description

Represents an identifier.

Constructor & Destructor Documentation

◆ ID() [1/5]

hilti::ID::ID ( )
inline

Creates an empty ID.

◆ ID() [2/5]

hilti::ID::ID ( const char *  s)
inline

Creates an ID from an (not normalized) string.

◆ ID() [3/5]

hilti::ID::ID ( std::string_view  s,
AlreadyNormalized  n 
)
inline

Creates an ID from a string that's already normalized. The assumption is that the input string is the output of a prior str() call on an existing ID object.

◆ ID() [4/5]

template<typename... T, typename enable = std::enable_if_t<(... && std::is_convertible_v<T, std::string_view>)>>
hilti::ID::ID ( const T &...  s)
inlineexplicit

Concatenates multiple strings into a single ID, separating them with ::.

◆ ID() [5/5]

hilti::ID::ID ( std::initializer_list< std::string_view >  x)
inline

Concatenates multiple strings into a single ID, separating them with ::.


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