LicenseSpring C++ SDK 7.31.0
Easily add Software Licensing to your application
LicenseType.h
Go to the documentation of this file.
1#ifndef LS_LICENSE_TYPE_H
2#define LS_LICENSE_TYPE_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 "APIDef.h"
12#include "PODTypes.h"
13
14namespace LicenseSpring
15{
19 {
20 public:
27 static LicenseType fromString( const std::string& str );
28
31
34 LicenseType( int type );
35
39
40 bool operator == ( LicenseType t ) const;
41 bool operator != ( LicenseType t ) const;
42 bool operator == ( LSLicenseType t ) const;
43 bool operator != ( LSLicenseType t ) const;
44 operator LSLicenseType() const;
45 operator int() const;
46
51 std::string toString() const;
52
55 std::string toFormattedString() const;
56
57 private:
58 LSLicenseType m_type;
59 };
60}
61
62#ifdef _MSC_VER
63#pragma warning( pop )
64#endif
65
66#endif // LS_LICENSE_TYPE_H
#define LS_API
Macros that expands to dllexport, dllimport or nothing on non Windows platforms or in case of static ...
Definition: APIDef.h:22
LSLicenseType
License type.
Definition: PODTypes.h:28
Class used for encapsulating the type of license, comparing types of licenses, and converting them to...
Definition: LicenseType.h:19
std::string toFormattedString() const
Converts a LicenseType to a string with first letter capitalized.
std::string toString() const
Converts a LicenseType to a string.
LicenseType(LSLicenseType type)
Constructs LicenseType with given type.
LicenseType(int type)
Constructs LicenseType given an int.
LicenseType()
Constructs LicenseType with type LicenseTypeUnknown.
static LicenseType fromString(const std::string &str)
Converts string to a LicenseType.