# HG changeset patch # User Sebastien Jodogne # Date 1780344855 -7200 # Node ID 55194a6e7d0770297a619358f8c32f6124c0c768 # Parent a6f84df80a28b75decd427b8c4a1f7264cb1083a defining ORTHANC_DEPRECATED_CLASS macro diff -r a6f84df80a28 -r 55194a6e7d07 OrthancFramework/Sources/Cache/ICachePageProvider.h --- a/OrthancFramework/Sources/Cache/ICachePageProvider.h Mon Jun 01 21:58:59 2026 +0200 +++ b/OrthancFramework/Sources/Cache/ICachePageProvider.h Mon Jun 01 22:14:15 2026 +0200 @@ -33,7 +33,7 @@ { namespace Deprecated { - class ORTHANC_DEPRECATED(ICachePageProvider) + class ORTHANC_DEPRECATED_CLASS(ICachePageProvider) { public: virtual ~ICachePageProvider() diff -r a6f84df80a28 -r 55194a6e7d07 OrthancFramework/Sources/Cache/ICacheable.h --- a/OrthancFramework/Sources/Cache/ICacheable.h Mon Jun 01 21:58:59 2026 +0200 +++ b/OrthancFramework/Sources/Cache/ICacheable.h Mon Jun 01 22:14:15 2026 +0200 @@ -30,7 +30,7 @@ namespace Orthanc { - class ORTHANC_DEPRECATED(ICacheable) : public boost::noncopyable + class ORTHANC_DEPRECATED_CLASS(ICacheable) : public boost::noncopyable { public: virtual ~ICacheable() diff -r a6f84df80a28 -r 55194a6e7d07 OrthancFramework/Sources/Cache/MemoryCache.h --- a/OrthancFramework/Sources/Cache/MemoryCache.h Mon Jun 01 21:58:59 2026 +0200 +++ b/OrthancFramework/Sources/Cache/MemoryCache.h Mon Jun 01 22:14:15 2026 +0200 @@ -37,7 +37,7 @@ /** * WARNING: This class is NOT thread-safe. **/ - class ORTHANC_PUBLIC ORTHANC_DEPRECATED(MemoryCache) : public boost::noncopyable + class ORTHANC_PUBLIC ORTHANC_DEPRECATED_CLASS(MemoryCache) : public boost::noncopyable { private: struct Page diff -r a6f84df80a28 -r 55194a6e7d07 OrthancFramework/Sources/Cache/MemoryObjectCache.h --- a/OrthancFramework/Sources/Cache/MemoryObjectCache.h Mon Jun 01 21:58:59 2026 +0200 +++ b/OrthancFramework/Sources/Cache/MemoryObjectCache.h Mon Jun 01 22:14:15 2026 +0200 @@ -42,7 +42,7 @@ /** * Note: this class is thread safe **/ - class ORTHANC_PUBLIC ORTHANC_DEPRECATED(MemoryObjectCache) : public boost::noncopyable + class ORTHANC_PUBLIC ORTHANC_DEPRECATED_CLASS(MemoryObjectCache) : public boost::noncopyable { private: class Item; diff -r a6f84df80a28 -r 55194a6e7d07 OrthancFramework/Sources/Cache/MemoryStringCache.h --- a/OrthancFramework/Sources/Cache/MemoryStringCache.h Mon Jun 01 21:58:59 2026 +0200 +++ b/OrthancFramework/Sources/Cache/MemoryStringCache.h Mon Jun 01 22:14:15 2026 +0200 @@ -46,7 +46,7 @@ * * Note: this class is thread safe **/ - class ORTHANC_PUBLIC ORTHANC_DEPRECATED(MemoryStringCache) : public boost::noncopyable + class ORTHANC_PUBLIC ORTHANC_DEPRECATED_CLASS(MemoryStringCache) : public boost::noncopyable { public: class ORTHANC_PUBLIC Accessor : public boost::noncopyable diff -r a6f84df80a28 -r 55194a6e7d07 OrthancFramework/Sources/Compatibility.h --- a/OrthancFramework/Sources/Compatibility.h Mon Jun 01 21:58:59 2026 +0200 +++ b/OrthancFramework/Sources/Compatibility.h Mon Jun 01 22:14:15 2026 +0200 @@ -47,6 +47,18 @@ #endif +// Macro "ORTHANC_DEPRECATED_CLASS" tags a class as having been deprecated +#if (__cplusplus >= 201402L) // C++14 +# define ORTHANC_DEPRECATED_CLASS(f) [[deprecated]] f +#elif defined(__GNUC__) || defined(__clang__) +# define ORTHANC_DEPRECATED_CLASS(f) __attribute__((deprecated)) f +#elif defined(_MSC_VER) +# define ORTHANC_DEPRECATED_CLASS(f) __declspec(deprecated) f +#else +# define ORTHANC_DEPRECATED +#endif + + // Macros "ORTHANC_OVERRIDE" and "ORTHANC_FINAL" wrap the "override" // and "final" keywords introduced in C++11, to do compile-time // checking of virtual methods diff -r a6f84df80a28 -r 55194a6e7d07 OrthancFramework/Sources/DicomParsing/ParsedDicomCache.h --- a/OrthancFramework/Sources/DicomParsing/ParsedDicomCache.h Mon Jun 01 21:58:59 2026 +0200 +++ b/OrthancFramework/Sources/DicomParsing/ParsedDicomCache.h Mon Jun 01 22:14:15 2026 +0200 @@ -29,7 +29,7 @@ namespace Orthanc { - class ORTHANC_PUBLIC ORTHANC_DEPRECATED(ParsedDicomCache) : public boost::noncopyable + class ORTHANC_PUBLIC ORTHANC_DEPRECATED_CLASS(ParsedDicomCache) : public boost::noncopyable { private: class Item;