![]() |
Spicy
|
#include <attribute.h>
Public Member Functions | |
| Kind (std::string name) | |
| Kind (const Kind &other)=default | |
| Kind (Kind &&other)=default | |
| operator std::string () const | |
| Kind & | operator= (const Kind &other)=default |
| Kind & | operator= (Kind &&other)=default |
| bool | operator== (const Kind &other) const |
| bool | operator!= (const Kind &other) const |
Static Public Member Functions | |
| static Kind | fromString (const std::string_view &s) |
Represents a specific attribute. While we generally identify attributes by their names (&...), we wrap those strings into Kind instances so that we can (1) define global constants for all valid attribute names, and (2) retain a list of all known attributes for error checking.
Note that generally, one should only use the global, pre-defined constants when referring to a specific attribute. Avoid creating new instances on the fly.