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

Loading...
Searching...
No Matches
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
14 namespace LicenseSpring
15{
18 class LS_API LicenseType
19 {
20 public:
27 static LicenseType fromString( const std::string& str );
28
30 LicenseType();
31
34 LicenseType( int type );
35
38 LicenseType( LSLicenseType type );
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
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
PODTypes.h
LSLicenseType
LSLicenseType
License type.
Definition PODTypes.h:28
LicenseSpring::LicenseType
Class used for encapsulating the type of license, comparing types of licenses, and converting them to...
Definition LicenseType.h:19
LicenseSpring::LicenseType::toFormattedString
std::string toFormattedString() const
Converts a LicenseType to a string with first letter capitalized.
LicenseSpring::LicenseType::toString
std::string toString() const
Converts a LicenseType to a string.
LicenseSpring::LicenseType::LicenseType
LicenseType(LSLicenseType type)
Constructs LicenseType with given type.
LicenseSpring::LicenseType::LicenseType
LicenseType(int type)
Constructs LicenseType given an int.
LicenseSpring::LicenseType::LicenseType
LicenseType()
Constructs LicenseType with type LicenseTypeUnknown.
LicenseSpring::LicenseType::fromString
static LicenseType fromString(const std::string &str)
Converts string to a LicenseType.
LicenseSpring
Definition BaseManager.h:16