26 #ifndef TASKOLIB_VARIABLENAME_H_
27 #define TASKOLIB_VARIABLENAME_H_
31 #include <string_view>
33 #include <gul17/cat.h>
75 return a.string() == b.string();
81 return a.string() != b.string();
87 return a.string() < b.string();
93 return a.string() > b.string();
102 return a.string() <= b.string();
111 return a.string() >= b.string();
131 return gul17::cat(lhs.
string(), rhs);
137 return gul17::cat(lhs, rhs.
string());
141 explicit operator const std::string&()
const {
return name_; }
160 struct hash<
task::VariableName>
164 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:46
friend bool operator==(const VariableName &a, const VariableName &b) noexcept
Determine if two variable names are identical.
Definition: VariableName.h:73
friend std::string & operator+=(std::string &lhs, const VariableName &rhs)
Append a VariableName to a std::string.
Definition: VariableName.h:122
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:85
VariableName(const char *name)
Construct a variable name from a C string.
Definition: VariableName.cc:62
friend std::string operator+(const VariableName &lhs, std::string_view rhs)
Concatenate a VariableName and a string_view.
Definition: VariableName.h:129
friend bool operator!=(const VariableName &a, const VariableName &b) noexcept
Determine if two variable names differ.
Definition: VariableName.h:79
const std::string & string() const noexcept
Return a const reference to the internal string member.
Definition: VariableName.h:147
SizeType length() const noexcept
Return the length of the variable name string.
Definition: VariableName.h:70
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:91
std::string name_
Definition: VariableName.h:150
std::string::size_type SizeType
Definition: VariableName.h:48
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:100
VariableName & operator+=(std::string_view suffix)
Append a suffix to a VariableName.
Definition: VariableName.cc:83
SizeType size() const noexcept
Return the length of the variable name string.
Definition: VariableName.h:144
friend std::string operator+(std::string_view lhs, const VariableName &rhs)
Concatenate a string_view and a VariableName.
Definition: VariableName.h:135
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:109
std::string::size_type size_type
Definition: VariableName.h:49
Definition: VariableName.h:156
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:162