azure-core
Loading...
Searching...
No Matches
extendable_enumeration.hpp
Go to the documentation of this file.
1// Copyright (c) Microsoft Corporation.
2// Licensed under the MIT License.
3#pragma once
4
10#pragma once
11
12#include <string>
13
14namespace Azure { namespace Core { namespace _internal {
38 template <class T> class ExtendableEnumeration {
39 private:
40 std::string m_enumerationValue;
41
42 protected:
43 ~ExtendableEnumeration() = default;
44
45 public:
51 explicit ExtendableEnumeration(std::string enumerationValue)
52 : m_enumerationValue(std::move(enumerationValue))
53 {
54 }
55
59 ExtendableEnumeration() = default;
60
66 bool operator==(ExtendableEnumeration<T> const& other) const noexcept
67 {
68 return m_enumerationValue == other.m_enumerationValue;
69 }
70
76 bool operator!=(ExtendableEnumeration<T> const& other) const noexcept
77 {
78 return !operator==(other);
79 }
80
85 std::string const& ToString() const { return m_enumerationValue; }
86 };
87}}} // namespace Azure::Core::_internal
Compute the hash value for the input binary data, using SHA256, SHA384 and SHA512.
Definition azure_assert.hpp:57
bool operator!=(DateTime const &dt, std::chrono::system_clock::time_point const &tp)
Compare a DateTime object with a std::chrono::system_clock::time_point object.
Definition datetime.hpp:230
bool operator==(DateTime const &dt, std::chrono::system_clock::time_point const &tp)
Compare a DateTime object with a std::chrono::system_clock::time_point object.
Definition datetime.hpp:212