MQTTSuite
Loading...
Searching...
No Matches
mqtt::mqttstore::lib::ConfigStorage Class Reference

#include <ConfigSections.h>

Inheritance diagram for mqtt::mqttstore::lib::ConfigStorage:
Collaboration diagram for mqtt::mqttstore::lib::ConfigStorage:

Public Member Functions

 ConfigStorage (utils::SubCommand *parent)
 ~ConfigStorage () override
std::string getRawTable () const
bool getAutoCreateRawTable () const
std::string getProjectionFile () const

Static Public Attributes

static constexpr std::string_view NAME {"storage"}
static constexpr std::string_view DESCRIPTION {"Generic MQTT persistence behavior"}

Private Attributes

CLI::Option * rawTableOpt
CLI::Option * autoCreateRawTableOpt
CLI::Option * projectionFileOpt

Detailed Description

Definition at line 101 of file ConfigSections.h.

Constructor & Destructor Documentation

◆ ConfigStorage()

mqtt::mqttstore::lib::ConfigStorage::ConfigStorage ( utils::SubCommand * parent)

Definition at line 158 of file ConfigSections.cpp.

159 : utils::SubCommand(parent, this, "Storage behavior")
160 , rawTableOpt(setConfigurable(
161 addOption("--raw-table", "Raw MQTT envelope table", "identifier", "mqtt_messages", CLI::TypeValidator<std::string>()), true))
162 , autoCreateRawTableOpt(setConfigurable(addFlag("--auto-create-raw-table{true}",
163 "Create the raw MQTT envelope table automatically",
164 "bool",
165 "true",
166 CLI::IsMember({"true", "false"})),
167 true))
168 , projectionFileOpt(setConfigurable(
169 addOption("--projection-file", "Optional JSON file describing typed projections", "filename", CLI::ExistingFile), true)) {
170 }

References autoCreateRawTableOpt, and rawTableOpt.

◆ ~ConfigStorage()

mqtt::mqttstore::lib::ConfigStorage::~ConfigStorage ( )
overridedefault

Member Function Documentation

◆ getAutoCreateRawTable()

bool mqtt::mqttstore::lib::ConfigStorage::getAutoCreateRawTable ( ) const
nodiscard

Definition at line 178 of file ConfigSections.cpp.

178 {
179 return autoCreateRawTableOpt->as<bool>();
180 }

References autoCreateRawTableOpt.

Referenced by anonymous_namespace{SocketContextFactory.cpp}::getStorageOptions(), and anonymous_namespace{SubProtocolFactory.cpp}::getStorageOptions().

Here is the caller graph for this function:

◆ getProjectionFile()

std::string mqtt::mqttstore::lib::ConfigStorage::getProjectionFile ( ) const
nodiscard

Definition at line 182 of file ConfigSections.cpp.

182 {
183 return projectionFileOpt->as<std::string>();
184 }

References projectionFileOpt.

Referenced by anonymous_namespace{SocketContextFactory.cpp}::getStorageOptions(), and anonymous_namespace{SubProtocolFactory.cpp}::getStorageOptions().

Here is the caller graph for this function:

◆ getRawTable()

std::string mqtt::mqttstore::lib::ConfigStorage::getRawTable ( ) const
nodiscard

Definition at line 174 of file ConfigSections.cpp.

174 {
175 return rawTableOpt->as<std::string>();
176 }

References rawTableOpt.

Referenced by anonymous_namespace{SocketContextFactory.cpp}::getStorageOptions(), and anonymous_namespace{SubProtocolFactory.cpp}::getStorageOptions().

Here is the caller graph for this function:

Member Data Documentation

◆ autoCreateRawTableOpt

CLI::Option* mqtt::mqttstore::lib::ConfigStorage::autoCreateRawTableOpt
private

Definition at line 115 of file ConfigSections.h.

Referenced by ConfigStorage(), and getAutoCreateRawTable().

◆ DESCRIPTION

std::string_view mqtt::mqttstore::lib::ConfigStorage::DESCRIPTION {"Generic MQTT persistence behavior"}
staticconstexpr

Definition at line 104 of file ConfigSections.h.

104{"Generic MQTT persistence behavior"};

◆ NAME

std::string_view mqtt::mqttstore::lib::ConfigStorage::NAME {"storage"}
staticconstexpr

Definition at line 103 of file ConfigSections.h.

103{"storage"};

◆ projectionFileOpt

CLI::Option* mqtt::mqttstore::lib::ConfigStorage::projectionFileOpt
private

Definition at line 116 of file ConfigSections.h.

Referenced by getProjectionFile().

◆ rawTableOpt

CLI::Option* mqtt::mqttstore::lib::ConfigStorage::rawTableOpt
private

Definition at line 114 of file ConfigSections.h.

Referenced by ConfigStorage(), and getRawTable().


The documentation for this class was generated from the following files: