| LicenseSpring C++ SDK 7.32.0 Easily add Software Licensing to your application

Loading...
Searching...
No Matches
DeviceVariable.h
Go to the documentation of this file.
1#ifndef LS_DEVICE_VARIABLE_H
2#define LS_DEVICE_VARIABLE_H
3
4#ifdef _MSC_VER
5#pragma once
6#pragma warning( push )
7#pragma warning( disable : 4251 )
8#endif
9
10#include <string>
11#include <ctime>
12#include "APIDef.h"
13
14 namespace LicenseSpring
15{
18 class LS_API DeviceVariable
19 {
20 public:
22 DeviceVariable();
23
29 DeviceVariable( const std::string& name, const std::string& value );
30
38 DeviceVariable( int64_t id, const std::string& name, const std::string& value,
39 const std::string& dateTimeUpdated );
40
43 bool isEmpty() const;
44
48 int64_t id() const { return m_id; }
49
52 const std::string& name() const { return m_name; }
53
56 void setName( const std::string& name ) { m_name = name; }
57
60 const std::string& value() const { return m_value; }
61
64 void setValue( const std::string& value ) { m_value = value; }
65
69 tm dateTimeUpdated() const;
70
74 tm dateTimeUpdatedUtc() const;
75
76 private:
77 int64_t m_id;
78 std::string m_name;
79 std::string m_value;
80 std::string m_dateTimeUpdated;
81 };
82}
83
84#ifdef _MSC_VER
85#pragma warning( pop )
86#endif
87
88#endif // LS_DEVICE_VARIABLE_H
APIDef.h
LS_API
#define LS_API
Macros that expands to dllexport, dllimport or nothing on non Windows platforms or in case of static ...
Definition APIDef.h:22
LicenseSpring::DeviceVariable
Class for storing key-value device variable.
Definition DeviceVariable.h:19
LicenseSpring::DeviceVariable::id
int64_t id() const
Getter method for device variable id.
Definition DeviceVariable.h:48
LicenseSpring::DeviceVariable::setName
void setName(const std::string &name)
Setter method for device variable name.
Definition DeviceVariable.h:56
LicenseSpring::DeviceVariable::DeviceVariable
DeviceVariable(const std::string &name, const std::string &value)
Constructs device variable with given name (key) and value.
LicenseSpring::DeviceVariable::isEmpty
bool isEmpty() const
Check if variable is considered empty.
LicenseSpring::DeviceVariable::value
const std::string & value() const
Getter method for device variable value.
Definition DeviceVariable.h:60
LicenseSpring::DeviceVariable::DeviceVariable
DeviceVariable()
Default constructor, creates empty device variable.
LicenseSpring::DeviceVariable::name
const std::string & name() const
Getter method for device variable name.
Definition DeviceVariable.h:52
LicenseSpring::DeviceVariable::dateTimeUpdatedUtc
tm dateTimeUpdatedUtc() const
Getter method for device variable date time in UTC when it was updated on the backend.
LicenseSpring::DeviceVariable::dateTimeUpdated
tm dateTimeUpdated() const
Getter method for device variable date time when it was updated on the backend.
LicenseSpring::DeviceVariable::DeviceVariable
DeviceVariable(int64_t id, const std::string &name, const std::string &value, const std::string &dateTimeUpdated)
Constructs device variable with given data.
LicenseSpring::DeviceVariable::setValue
void setValue(const std::string &value)
Setter method for device variable value.
Definition DeviceVariable.h:64
LicenseSpring
Definition BaseManager.h:16