25 #ifndef TASKOLIB_SEQUENCENAME_H_
26 #define TASKOLIB_SEQUENCENAME_H_
30 #include <gul14/optional.h>
31 #include <gul14/string_view.h>
67 static gul14::optional<SequenceName>
from_string(gul14::string_view str);
82 const std::string&
string() const noexcept {
return str_; }
The machine-readable name of a Sequence.
Definition: SequenceName.h:44
friend bool operator==(const SequenceName &a, const SequenceName &b)
Determine if two sequence names are equal.
Definition: SequenceName.h:70
friend bool operator!=(const SequenceName &a, const SequenceName &b)
Determine if two sequence names are different.
Definition: SequenceName.h:76
static gul14::optional< SequenceName > from_string(gul14::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:47
SequenceName()=default
Default-construct an empty sequence name.
static gul14::string_view check_validity(gul14::string_view)
Throw an exception if the given string violates the length or character constraints of a sequence nam...
Definition: SequenceName.cc:40
std::string str_
Definition: SequenceName.h:85
static const gul14::string_view valid_characters
A string containing all of the valid characters of a sequence name.
Definition: SequenceName.h:50
const std::string & string() const noexcept
Return the sequence name as a string.
Definition: SequenceName.h:82
Namespace task contains all Taskolib functions and classes.
Definition: CommChannel.h:33