diff options
Diffstat (limited to 'common/domain/applicationdomaintype.cpp')
-rw-r--r-- | common/domain/applicationdomaintype.cpp | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/common/domain/applicationdomaintype.cpp b/common/domain/applicationdomaintype.cpp index 530056d..fd88570 100644 --- a/common/domain/applicationdomaintype.cpp +++ b/common/domain/applicationdomaintype.cpp | |||
@@ -27,6 +27,38 @@ | |||
27 | 27 | ||
28 | SINK_DEBUG_AREA("applicationdomaintype"); | 28 | SINK_DEBUG_AREA("applicationdomaintype"); |
29 | 29 | ||
30 | QDebug Sink::ApplicationDomain::operator<< (QDebug d, const Sink::ApplicationDomain::Mail::Contact &c) | ||
31 | { | ||
32 | d << "Contact(" << c.name << ", " << c.emailAddress << ")"; | ||
33 | return d; | ||
34 | } | ||
35 | |||
36 | QDebug Sink::ApplicationDomain::operator<< (QDebug d, const Sink::ApplicationDomain::ApplicationDomainType &type) | ||
37 | { | ||
38 | d << "ApplicationDomainType(\n"; | ||
39 | auto properties = type.mAdaptor->availableProperties(); | ||
40 | std::sort(properties.begin(), properties.end()); | ||
41 | d << " " << "Id: " << "\t" << type.identifier() << "\n"; | ||
42 | d << " " << "Resource: " << "\t" << type.resourceInstanceIdentifier() << "\n"; | ||
43 | for (const auto &property : properties) { | ||
44 | d << " " << property << "\t" << type.getProperty(property) << "\n"; | ||
45 | } | ||
46 | d << ")"; | ||
47 | return d; | ||
48 | } | ||
49 | |||
50 | QDebug Sink::ApplicationDomain::operator<< (QDebug d, const Sink::ApplicationDomain::Reference &ref) | ||
51 | { | ||
52 | d << ref.value; | ||
53 | return d; | ||
54 | } | ||
55 | |||
56 | QDebug Sink::ApplicationDomain::operator<< (QDebug d, const Sink::ApplicationDomain::BLOB &blob) | ||
57 | { | ||
58 | d << blob.value << "external:" << blob.isExternal ; | ||
59 | return d; | ||
60 | } | ||
61 | |||
30 | template <typename DomainType, typename Property> | 62 | template <typename DomainType, typename Property> |
31 | int registerProperty() { | 63 | int registerProperty() { |
32 | Sink::Private::PropertyRegistry::instance().registerProperty<Property>(Sink::ApplicationDomain::getTypeName<DomainType>()); | 64 | Sink::Private::PropertyRegistry::instance().registerProperty<Property>(Sink::ApplicationDomain::getTypeName<DomainType>()); |