Sygaldry
Loading...
Searching...
No Matches
sygaldry::text_message< name_str, desc, Tags > Struct Template Reference

A text string endpoint with occasional message semantics. More...

Inheritance diagram for sygaldry::text_message< name_str, desc, Tags >:
sygaldry::occasional< std::string > sygaldry::name_< name_str > sygaldry::description_< str > sygaldry::tagged_< Tags... >

Additional Inherited Members

- Public Types inherited from sygaldry::occasional< std::string >
using type = std::string
 The underlying type.
 
- Public Member Functions inherited from sygaldry::occasional< std::string >
constexpr occasional () noexcept
 Default constructor; state is default initialized and updated is false.
 
constexpr occasional (occasional< std::string > &&other)
 Move constructor from another occasional.
 
constexpr occasional (const occasional< std::string > &other)
 Copy constructor from another occasional.
 
constexpr occasional (std::string &&t) noexcept
 Move constructor from the underlying type.
 
constexpr occasional (const std::string &t) noexcept
 Copy constructor from the underlying type.
 
constexpr auto & operator= (occasional< std::string > &&other)
 Move assignment from another occasional.
 
constexpr auto & operator= (const occasional< std::string > &other)
 Copy assignment from another occasional.
 
constexpr auto & operator= (std::string &&t) noexcept
 Move assignment from the underlying type.
 
constexpr auto & operator= (const std::string &t) noexcept
 Copy assignment from the underlying type.
 
constexpr operator std::string & () noexcept
 Mutable value access.
 
constexpr operator const std::string & () const noexcept
 Immutable value access.
 
constexpr std::string & operator* () noexcept
 Mutable dereference operator; provides access to the underlying state.
 
constexpr const std::string & operator* () const noexcept
 Constant dereference operator; provides access to the underlying state.
 
constexpr std::string * operator-> () noexcept
 Mutable member access operator; provides access to the members of the underlying state.
 
constexpr const std::string * operator-> () const noexcept
 Constant member access operator; provides access to the members of the underlying state.
 
constexpr std::string & value () noexcept
 Mutable value access.
 
constexpr const std::string & value () const noexcept
 Immutable value access.
 
constexpr void reset () noexcept
 Clear the updated flag. This can also be achieved by assignment from empty braces, e.g. x = {};
 
- Static Public Member Functions inherited from sygaldry::name_< name_str >
static _consteval auto name ()
 
- Static Public Member Functions inherited from sygaldry::description_< str >
static _consteval auto description ()
 
- Public Attributes inherited from sygaldry::occasional< std::string >
std::string state
 The wrapped state.
 
bool updated
 Flag indicating if the state has been changed.
 

Detailed Description

template<string_literal name_str, string_literal desc = "", typename ... Tags>
struct sygaldry::text_message< name_str, desc, Tags >

A text string endpoint with occasional message semantics.

Example: text_message<"WiFi SSID", "Name of the WiFi network to connect to", tag_session_data> wifi_ssid;

Template Parameters
name_strThe name of the endpoint. Required.
descA description of the endpoint. Defaults to an empty string.
TagsTag helper classes to apply to the endpoint. None by default.

The documentation for this struct was generated from the following file: