MQTTSuite
Loading...
Searching...
No Matches
mqtt::lib::ConfigMqttBroker Class Reference

#include <ConfigApplication.h>

Inheritance diagram for mqtt::lib::ConfigMqttBroker:
Collaboration diagram for mqtt::lib::ConfigMqttBroker:

Public Member Functions

 ConfigMqttBroker (utils::SubCommand *parent)
 ~ConfigMqttBroker () override
ConfigMqttBrokersetHtmlRoot (const std::string &htmlRoot)
std::string getHtmlRoot ()
Public Member Functions inherited from mqtt::lib::ConfigApplication
template<typename ConcretConfigApplicationT>
 ConfigApplication (utils::SubCommand *parent, ConcretConfigApplicationT *concretConfigApplication)
 ~ConfigApplication () override
ConfigApplicationsetSessionStore (const std::string &sessionStore)
std::string getSessionStore () const
const std::shared_ptr< MqttMappergetMqttMapper () const
bool setMappingFile (const std::string &mapFilename)
std::string getMappingFilename () const
bool setMapping (const std::string &mapping) const
std::string getMapping (int indent=2) const
bool persistMapping () const
template<typename ConcretConfigApplication>
 ConfigApplication (utils::SubCommand *parent, ConcretConfigApplication *concretConfigApplication)

Static Public Attributes

static constexpr std::string_view NAME {"broker"}
static constexpr std::string_view DESCRIPTION {"Configuration for Application mqttbroker"}

Private Attributes

CLI::Option * htmlRootOpt

Additional Inherited Members

Protected Attributes inherited from mqtt::lib::ConfigApplication
std::shared_ptr< MqttMappermqttMapper
CLI::Option * mappingFileOpt
CLI::Option * sessionStoreOpt

Detailed Description

Definition at line 91 of file ConfigApplication.h.

Constructor & Destructor Documentation

◆ ConfigMqttBroker()

mqtt::lib::ConfigMqttBroker::ConfigMqttBroker ( utils::SubCommand * parent)

Definition at line 185 of file ConfigApplication.cpp.

186 : ConfigApplication(parent, this)
187 , htmlRootOpt( //
188 addOption( //
189 "--html-root",
190 "HTML root directory",
191 "directory",
192 CLI::ExistingDirectory)) {
193 required(htmlRootOpt);
194 }
ConfigApplication(utils::SubCommand *parent, ConcretConfigApplicationT *concretConfigApplication)

References mqtt::lib::ConfigApplication::ConfigApplication(), and htmlRootOpt.

Here is the call graph for this function:

◆ ~ConfigMqttBroker()

mqtt::lib::ConfigMqttBroker::~ConfigMqttBroker ( )
overridedefault

Member Function Documentation

◆ getHtmlRoot()

std::string mqtt::lib::ConfigMqttBroker::getHtmlRoot ( )

Definition at line 205 of file ConfigApplication.cpp.

205 {
206 std::string htmlRoot;
207
208 return htmlRootOpt->as<std::string>();
209 }

References htmlRootOpt.

◆ setHtmlRoot()

ConfigMqttBroker & mqtt::lib::ConfigMqttBroker::setHtmlRoot ( const std::string & htmlRoot)

Definition at line 198 of file ConfigApplication.cpp.

198 {
199 setDefaultValue(htmlRootOpt, htmlRoot);
200 required(htmlRootOpt, false);
201
202 return *this;
203 }

References htmlRootOpt.

Member Data Documentation

◆ DESCRIPTION

std::string_view mqtt::lib::ConfigMqttBroker::DESCRIPTION {"Configuration for Application mqttbroker"}
staticconstexpr

Definition at line 94 of file ConfigApplication.h.

94{"Configuration for Application mqttbroker"};

◆ htmlRootOpt

CLI::Option* mqtt::lib::ConfigMqttBroker::htmlRootOpt
private

Definition at line 104 of file ConfigApplication.h.

Referenced by ConfigMqttBroker(), getHtmlRoot(), and setHtmlRoot().

◆ NAME

std::string_view mqtt::lib::ConfigMqttBroker::NAME {"broker"}
staticconstexpr

Definition at line 93 of file ConfigApplication.h.

93{"broker"};

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