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
bool setMappingFile (const std::string &mappingFile)
std::string getMappingFilename () const
bool setMapping (const nlohmann::json &json)
const std::shared_ptr< MqttMappergetMqttMapper () 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 85 of file ConfigApplication.h.

Constructor & Destructor Documentation

◆ ConfigMqttBroker()

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

Definition at line 113 of file ConfigApplication.cpp.

114 : ConfigApplication(parent, this)
115 , htmlRootOpt( //
116 addOption( //
117 "--html-root",
118 "HTML root directory",
119 "directory",
120 CLI::ExistingDirectory)) {
121 required(htmlRootOpt);
122 }
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 133 of file ConfigApplication.cpp.

133 {
134 std::string htmlRoot;
135
136 return htmlRootOpt->as<std::string>();
137 }

References htmlRootOpt.

◆ setHtmlRoot()

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

Definition at line 126 of file ConfigApplication.cpp.

126 {
127 setDefaultValue(htmlRootOpt, htmlRoot);
128 required(htmlRootOpt, false);
129
130 return *this;
131 }

References htmlRootOpt.

Member Data Documentation

◆ DESCRIPTION

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

Definition at line 88 of file ConfigApplication.h.

88{"Configuration for Application mqttbroker"};

◆ htmlRootOpt

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

Definition at line 98 of file ConfigApplication.h.

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

◆ NAME

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

Definition at line 87 of file ConfigApplication.h.

87{"broker"};

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