From 7c8422653051baead5ed17ffc055b4d9e23a2e72 Mon Sep 17 00:00:00 2001 From: Christian Mollekopf Date: Tue, 3 Jan 2017 10:07:52 +0100 Subject: Comparison operator for ApplicationDomainType --- common/domain/applicationdomaintype.h | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'common') 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: ApplicationDomainType(const ApplicationDomainType &other); ApplicationDomainType& operator=(const ApplicationDomainType &other); + inline bool operator==(const ApplicationDomainType &other) + { + return other.identifier() == identifier(); + } + + inline bool operator!=(const ApplicationDomainType &other) + { + return !(*this == other); + } + template DomainType cast() { static_assert(std::is_base_of::value, "You can only cast to base classes of ApplicationDomainType."); -- cgit v1.2.3