LicenseSpring C++ SDK  7.31.0
Easily add Software Licensing to your application
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 {
19  {
20  public:
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
LicenseSpring::DeviceVariable::value
const std::string & value() const
Getter method for device variable value.
Definition: DeviceVariable.h:60
LicenseSpring::DeviceVariable
Class for storing key-value device variable.
Definition: DeviceVariable.h:18
LicenseSpring::DeviceVariable::name
const std::string & name() const
Getter method for device variable name.
Definition: DeviceVariable.h:52
LicenseSpring
Definition: BaseManager.h:15
LicenseSpring::DeviceVariable::setValue
void setValue(const std::string &value)
Setter method for device variable value.
Definition: DeviceVariable.h:64
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::setName
void setName(const std::string &name)
Setter method for device variable name.
Definition: DeviceVariable.h:56
LicenseSpring::DeviceVariable::id
int64_t id() const
Getter method for device variable id.
Definition: DeviceVariable.h:48