File key.h¶
-
template<>
struct formatter<sym::Key> : public ostream_formatter¶ - #include <key.h>
Specialize fmt::formatter for Key
-
namespace sym
Functions
-
class Key¶
- #include <key.h>
Contains a letter plus an integral subscript and superscript. Can construct with a letter, a letter + sub, or a letter + sub + super, but not letter + super.
TODO(hayk): Consider an abstraction where Key contains a type enum.
Public Types
-
using letter_t = char¶
Public Functions
-
constexpr Key() = default¶
-
inline constexpr Key(const letter_t letter, const subscript_t sub = kInvalidSub, const superscript_t super = kInvalidSuper)¶
-
inline constexpr Key(const key_t &key)¶
-
inline subscript_t Sub() const noexcept¶
-
inline superscript_t Super() const noexcept¶
-
inline Key WithSub(const subscript_t sub) const¶
-
inline Key WithSuper(const superscript_t super) const¶
-
inline key_t GetLcmType() const noexcept¶
Public Static Functions
Public Static Attributes
-
static subscript_t kInvalidSub = std::numeric_limits<subscript_t>::min()¶
-
static superscript_t kInvalidSuper = std::numeric_limits<superscript_t>::min()¶
Protected Attributes
-
letter_t letter_ = {kInvalidLetter}¶
-
subscript_t sub_ = {kInvalidSub}¶
-
superscript_t super_ = {kInvalidSuper}¶
-
struct LexicalCompare¶
- #include <key.h>
Implementation of the Compare spec for use in containers
-
using letter_t = char¶
-
class Key¶