From fc6e2304f630345c79c95291191f4b64880736a1 Mon Sep 17 00:00:00 2001 From: dcheng Date: Fri, 18 Sep 2015 11:29:06 -0700 Subject: Export various dbus::Property template specializations. BUG=409111 R=stevenjb@chromium.org Committed: https://chromium.googlesource.com/chromium/src/+/40855d43fa71c215829b53a1034b1b653b4b8557 Review URL: https://codereview.chromium.org/1339763003 Cr-Commit-Position: refs/heads/master@{#349717} --- dbus/property.h | 241 ++++++++++++++++++++++++++++++++++++-------------------- 1 file changed, 154 insertions(+), 87 deletions(-) (limited to 'dbus') diff --git a/dbus/property.h b/dbus/property.h index 5f36d69..b308c82 100644 --- a/dbus/property.h +++ b/dbus/property.h @@ -426,101 +426,168 @@ class CHROME_DBUS_EXPORT Property : public PropertyBase { T set_value_; }; -template <> Property::Property(); -template <> bool Property::PopValueFromReader(MessageReader* reader); -template <> void Property::AppendSetValueToWriter(MessageWriter* writer); -extern template class Property; - -template <> Property::Property(); -template <> bool Property::PopValueFromReader(MessageReader* reader); -template <> void Property::AppendSetValueToWriter(MessageWriter* writer); -extern template class Property; - -template <> Property::Property(); -template <> bool Property::PopValueFromReader(MessageReader* reader); -template <> void Property::AppendSetValueToWriter(MessageWriter* writer); -extern template class Property; - -template <> Property::Property(); -template <> bool Property::PopValueFromReader(MessageReader* reader); -template <> void Property::AppendSetValueToWriter( - MessageWriter* writer); -extern template class Property; - -template <> Property::Property(); -template <> bool Property::PopValueFromReader(MessageReader* reader); -template <> void Property::AppendSetValueToWriter(MessageWriter* writer); -extern template class Property; - -template <> Property::Property(); -template <> bool Property::PopValueFromReader(MessageReader* reader); -template <> void Property::AppendSetValueToWriter( - MessageWriter* writer); -extern template class Property; - -template <> Property::Property(); -template <> bool Property::PopValueFromReader(MessageReader* reader); -template <> void Property::AppendSetValueToWriter(MessageWriter* writer); -extern template class Property; - -template <> Property::Property(); -template <> bool Property::PopValueFromReader(MessageReader* reader); -template <> void Property::AppendSetValueToWriter( - MessageWriter* writer); -extern template class Property; - -template <> Property::Property(); -template <> bool Property::PopValueFromReader(MessageReader* reader); -template <> void Property::AppendSetValueToWriter( - MessageWriter* writer); -extern template class Property; - -template <> bool Property::PopValueFromReader( - MessageReader* reader); -template <> void Property::AppendSetValueToWriter( - MessageWriter* writer); -extern template class Property; - -template <> bool Property::PopValueFromReader( - MessageReader* reader); -template <> void Property::AppendSetValueToWriter( - MessageWriter* writer); -extern template class Property; - -template <> bool Property >::PopValueFromReader( - MessageReader* reader); -template <> void Property >::AppendSetValueToWriter( - MessageWriter* writer); -extern template class Property >; - -template <> bool Property >::PopValueFromReader( - MessageReader* reader); -template <> void Property >::AppendSetValueToWriter( - MessageWriter* writer); -extern template class Property >; - -template <> bool Property >::PopValueFromReader( - MessageReader* reader); -template <> void Property >::AppendSetValueToWriter( - MessageWriter* writer); -extern template class Property >; - -template <> -bool Property>::PopValueFromReader( +// Clang and GCC don't agree on how attributes should work for explicitly +// instantiated templates. GCC ignores attributes on explicit instantiations +// (and emits a warning) while Clang requires the visiblity attribute on the +// explicit instantiations for them to be visible to other compilation units. +// Hopefully clang and GCC agree one day, and this can be cleaned up: +// https://llvm.org/bugs/show_bug.cgi?id=24815 +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wattributes" + +template <> +CHROME_DBUS_EXPORT Property::Property(); +template <> +CHROME_DBUS_EXPORT bool Property::PopValueFromReader( + MessageReader* reader); +template <> +CHROME_DBUS_EXPORT void Property::AppendSetValueToWriter( + MessageWriter* writer); +extern template class CHROME_DBUS_EXPORT Property; + +template <> +CHROME_DBUS_EXPORT Property::Property(); +template <> +CHROME_DBUS_EXPORT bool Property::PopValueFromReader( + MessageReader* reader); +template <> +CHROME_DBUS_EXPORT void Property::AppendSetValueToWriter( + MessageWriter* writer); +extern template class CHROME_DBUS_EXPORT Property; + +template <> +CHROME_DBUS_EXPORT Property::Property(); +template <> +CHROME_DBUS_EXPORT bool Property::PopValueFromReader( + MessageReader* reader); +template <> +CHROME_DBUS_EXPORT void Property::AppendSetValueToWriter( + MessageWriter* writer); +extern template class CHROME_DBUS_EXPORT Property; + +template <> +CHROME_DBUS_EXPORT Property::Property(); +template <> +CHROME_DBUS_EXPORT bool Property::PopValueFromReader( + MessageReader* reader); +template <> +CHROME_DBUS_EXPORT void Property::AppendSetValueToWriter( + MessageWriter* writer); +extern template class CHROME_DBUS_EXPORT Property; + +template <> +CHROME_DBUS_EXPORT Property::Property(); +template <> +CHROME_DBUS_EXPORT bool Property::PopValueFromReader( + MessageReader* reader); +template <> +CHROME_DBUS_EXPORT void Property::AppendSetValueToWriter( + MessageWriter* writer); +extern template class CHROME_DBUS_EXPORT Property; + +template <> +CHROME_DBUS_EXPORT Property::Property(); +template <> +CHROME_DBUS_EXPORT bool Property::PopValueFromReader( + MessageReader* reader); +template <> +CHROME_DBUS_EXPORT void Property::AppendSetValueToWriter( + MessageWriter* writer); +extern template class CHROME_DBUS_EXPORT Property; + +template <> +CHROME_DBUS_EXPORT Property::Property(); +template <> +CHROME_DBUS_EXPORT bool Property::PopValueFromReader( + MessageReader* reader); +template <> +CHROME_DBUS_EXPORT void Property::AppendSetValueToWriter( + MessageWriter* writer); +extern template class CHROME_DBUS_EXPORT Property; + +template <> +CHROME_DBUS_EXPORT Property::Property(); +template <> +CHROME_DBUS_EXPORT bool Property::PopValueFromReader( + MessageReader* reader); +template <> +CHROME_DBUS_EXPORT void Property::AppendSetValueToWriter( + MessageWriter* writer); +extern template class CHROME_DBUS_EXPORT Property; + +template <> +CHROME_DBUS_EXPORT Property::Property(); +template <> +CHROME_DBUS_EXPORT bool Property::PopValueFromReader( + MessageReader* reader); +template <> +CHROME_DBUS_EXPORT void Property::AppendSetValueToWriter( + MessageWriter* writer); +extern template class CHROME_DBUS_EXPORT Property; + +template <> +CHROME_DBUS_EXPORT bool Property::PopValueFromReader( + MessageReader* reader); +template <> +CHROME_DBUS_EXPORT void Property::AppendSetValueToWriter( + MessageWriter* writer); +extern template class CHROME_DBUS_EXPORT Property; + +template <> +CHROME_DBUS_EXPORT bool Property::PopValueFromReader( + MessageReader* reader); +template <> +CHROME_DBUS_EXPORT void Property::AppendSetValueToWriter( + MessageWriter* writer); +extern template class CHROME_DBUS_EXPORT Property; + +template <> +CHROME_DBUS_EXPORT bool Property>::PopValueFromReader( + MessageReader* reader); +template <> +CHROME_DBUS_EXPORT void Property< + std::vector>::AppendSetValueToWriter(MessageWriter* writer); +extern template class CHROME_DBUS_EXPORT Property>; + +template <> +CHROME_DBUS_EXPORT bool Property>::PopValueFromReader( MessageReader* reader); template <> -void Property>::AppendSetValueToWriter( +CHROME_DBUS_EXPORT void Property< + std::vector>::AppendSetValueToWriter(MessageWriter* writer); +extern template class CHROME_DBUS_EXPORT Property>; + +template <> +CHROME_DBUS_EXPORT bool Property>::PopValueFromReader( + MessageReader* reader); +template <> +CHROME_DBUS_EXPORT void Property>::AppendSetValueToWriter( + MessageWriter* writer); +extern template class CHROME_DBUS_EXPORT Property>; + +template <> +CHROME_DBUS_EXPORT bool +Property>::PopValueFromReader( + MessageReader* reader); +template <> +CHROME_DBUS_EXPORT void +Property>::AppendSetValueToWriter( MessageWriter* writer); -extern template class Property>; +extern template class CHROME_DBUS_EXPORT + Property>; template <> -bool Property, uint16_t>>>:: +CHROME_DBUS_EXPORT bool +Property, uint16_t>>>:: PopValueFromReader(MessageReader* reader); template <> -void Property, uint16_t>>>:: +CHROME_DBUS_EXPORT void +Property, uint16_t>>>:: AppendSetValueToWriter(MessageWriter* writer); -extern template class Property< - std::vector, uint16_t>>>; +extern template class CHROME_DBUS_EXPORT + Property, uint16_t>>>; + +#pragma GCC diagnostic pop } // namespace dbus -- cgit v1.1