26 #ifndef TASKOLIB_VARIABLENAME_H_
27 #define TASKOLIB_VARIABLENAME_H_
31 #include <gul14/string_view.h>
73 return a.string() == b.string();
79 return a.string() != b.string();
85 return a.string() < b.string();
91 return a.string() > b.string();
100 return a.string() <= b.string();
109 return a.string() >= b.string();
129 return lhs.
string() + rhs;
135 return lhs + rhs.
string();
139 explicit operator const std::string&()
const {
return name_; }
158 struct hash<
task::VariableName>
162 return std::hash<std::string>{}(name.string());
A variable name is a string with limited functionality and some limitations on the allowed characters...
Definition: VariableName.h:44
friend bool operator==(const VariableName &a, const VariableName &b) noexcept
Determine if two variable names are identical.
Definition: VariableName.h:71
friend std::string operator+(gul14::string_view lhs, const VariableName &rhs)
Concatenate a string_view and a VariableName.
Definition: VariableName.h:133
friend std::string & operator+=(std::string &lhs, const VariableName &rhs)
Append a VariableName to a std::string.
Definition: VariableName.h:120
friend bool operator<(const VariableName &a, const VariableName &b) noexcept
Determine if the left variable name is lexicographically less than the right one.
Definition: VariableName.h:83
VariableName & operator+=(gul14::string_view suffix)
Append a suffix to a VariableName.
Definition: VariableName.cc:81
VariableName(const char *name)
Construct a variable name from a C string.
Definition: VariableName.cc:60
friend bool operator!=(const VariableName &a, const VariableName &b) noexcept
Determine if two variable names differ.
Definition: VariableName.h:77
const std::string & string() const noexcept
Return a const reference to the internal string member.
Definition: VariableName.h:145
SizeType length() const noexcept
Return the length of the variable name string.
Definition: VariableName.h:68
friend bool operator>(const VariableName &a, const VariableName &b) noexcept
Determine if the left variable name is lexicographically greater than the right one.
Definition: VariableName.h:89
std::string name_
Definition: VariableName.h:148
std::string::size_type SizeType
Definition: VariableName.h:46
friend bool operator<=(const VariableName &a, const VariableName &b) noexcept
Determine if the left variable name is lexicographically less than or equal to the right one.
Definition: VariableName.h:98
SizeType size() const noexcept
Return the length of the variable name string.
Definition: VariableName.h:142
friend std::string operator+(const VariableName &lhs, gul14::string_view rhs)
Concatenate a VariableName and a string_view.
Definition: VariableName.h:127
friend bool operator>=(const VariableName &a, const VariableName &b) noexcept
Determine if the left variable name is lexicographically greater than or equal to the right one.
Definition: VariableName.h:107
std::string::size_type size_type
Definition: VariableName.h:47
Definition: VariableName.h:154
Namespace task contains all Taskolib functions and classes.
Definition: CommChannel.h:33
std::size_t operator()(const task::VariableName &name) const noexcept
Definition: VariableName.h:160