diff options
-rw-r--r-- | common/domain/applicationdomaintype.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/common/domain/applicationdomaintype.h b/common/domain/applicationdomaintype.h index b4d6f8a..157415f 100644 --- a/common/domain/applicationdomaintype.h +++ b/common/domain/applicationdomaintype.h | |||
@@ -149,6 +149,16 @@ public: | |||
149 | ApplicationDomainType(const ApplicationDomainType &other); | 149 | ApplicationDomainType(const ApplicationDomainType &other); |
150 | ApplicationDomainType& operator=(const ApplicationDomainType &other); | 150 | ApplicationDomainType& operator=(const ApplicationDomainType &other); |
151 | 151 | ||
152 | inline bool operator==(const ApplicationDomainType &other) | ||
153 | { | ||
154 | return other.identifier() == identifier(); | ||
155 | } | ||
156 | |||
157 | inline bool operator!=(const ApplicationDomainType &other) | ||
158 | { | ||
159 | return !(*this == other); | ||
160 | } | ||
161 | |||
152 | template <typename DomainType> | 162 | template <typename DomainType> |
153 | DomainType cast() { | 163 | DomainType cast() { |
154 | static_assert(std::is_base_of<ApplicationDomainType, DomainType>::value, "You can only cast to base classes of ApplicationDomainType."); | 164 | static_assert(std::is_base_of<ApplicationDomainType, DomainType>::value, "You can only cast to base classes of ApplicationDomainType."); |