25 #ifndef TASKOLIB_SEQUENCENAME_H_
26 #define TASKOLIB_SEQUENCENAME_H_
29 #include <string_view>
66 static std::optional<SequenceName>
from_string(std::string_view str);
81 const std::string&
string() const noexcept {
return str_; }
The machine-readable name of a Sequence.
Definition: SequenceName.h:43
friend bool operator==(const SequenceName &a, const SequenceName &b)
Determine if two sequence names are equal.
Definition: SequenceName.h:69
static const std::string_view valid_characters
A string containing all of the valid characters of a sequence name.
Definition: SequenceName.h:49
friend bool operator!=(const SequenceName &a, const SequenceName &b)
Determine if two sequence names are different.
Definition: SequenceName.h:75
static std::optional< SequenceName > from_string(std::string_view str)
Create a sequence name from the given string, returning an empty optional if the string violates the ...
Definition: SequenceName.cc:60
static constexpr std::size_t max_length
Maximum number of bytes of a sequence name.
Definition: SequenceName.h:46
static std::string_view check_validity(std::string_view)
Throw an exception if the given string violates the length or character constraints of a sequence nam...
Definition: SequenceName.cc:40
SequenceName()=default
Default-construct an empty sequence name.
std::string str_
Definition: SequenceName.h:84
const std::string & string() const noexcept
Return the sequence name as a string.
Definition: SequenceName.h:81
Namespace task contains all Taskolib functions and classes.
Definition: CommChannel.h:33