SpaIot Library
Loading...
Searching...
No Matches
serversettings.h
1/*
2 SpaIot Library (c) by epsilonrt - epsilonrt@epsilonrt.fr
3 This file is part of SpaIot library <https://github.com/epsilonrt/spaiot-lib>
4
5 SPDX-License-Identifier: BSD-3-Clause
6
7 SpaIot library is distributed in the hope that it will be useful,
8 but WITHOUT ANY WARRANTY;
9*/
10#pragma once
11
12#include "global.h"
13
14namespace SpaIot {
15
25
26 public:
33
41 ServerSettings (const String &model, unsigned long interval = 30000);
42
50 ServerSettings (const char *model, unsigned long interval = 30000);
51
55 virtual ~ServerSettings();
56
61
67
72
78
83 void clear();
84
88 bool isNull() const;
89
93 bool isEmpty() const;
94
103 bool operator== (const ServerSettings &other) const;
104
113 bool operator!= (const ServerSettings &other) const;
114
118 const String &spaModel() const;
119
123 unsigned long publishInterval() const;
124
128 void setPublishInterval (unsigned long interval);
129
133 void setSpaModel (const String &model);
134
135 protected:
136 class Private;
137 ServerSettings (Private &dd);
138 std::unique_ptr<Private> d_ptr;
139 private:
140 PIMPL_DECLARE_PRIVATE (ServerSettings)
141 };
142
143}
Server settings class.
Definition serversettings.h:24
bool isEmpty() const
Checks if all attributes are set to their default values (same as the default constructor)
void clear()
Clears the ServerSettings object After the call to this function, the ServerSettings object is the sa...
ServerSettings(const String &model, unsigned long interval=30000)
Construct a new Server Settings object.
const String & spaModel() const
Returns the spa model name.
bool operator!=(const ServerSettings &other) const
bool isNull() const
Returns true if the object is null (i.e. it has not been initialized, d_ptr is null)
void setSpaModel(const String &model)
Sets the publish interval.
bool operator==(const ServerSettings &other) const
ServerSettings & operator=(const ServerSettings &other)
Sets the ServerSettings object to be equal to other.
ServerSettings(ServerSettings &&other)
Move Constructor after the move, other is null, other.clear() must be called if it is to be used agai...
ServerSettings(const ServerSettings &other)
Copy Constructor.
unsigned long publishInterval() const
Returns the publish interval.
ServerSettings(const char *model, unsigned long interval=30000)
Construct a new Server Settings object.
virtual ~ServerSettings()
Destructor.
void setPublishInterval(unsigned long interval)
Sets the spa model name.
SpaIot name space.
Definition bussettings.h:15