diff OrthancFramework/Resources/CheckOrthancFrameworkSymbols.py @ 4349:85237ae3a076

relax CheckOrthancFrameworkSymbols.py about one friend stream function
author Sebastien Jodogne <s.jodogne@gmail.com>
date Sun, 06 Dec 2020 12:47:54 +0100
parents 91554aecff9a
children d9473bd5ed43
line wrap: on
line diff
--- a/OrthancFramework/Resources/CheckOrthancFrameworkSymbols.py	Sun Dec 06 12:21:31 2020 +0100
+++ b/OrthancFramework/Resources/CheckOrthancFrameworkSymbols.py	Sun Dec 06 12:47:54 2020 +0100
@@ -251,6 +251,16 @@
         elif (i.kind == clang.cindex.CursorKind.TYPEDEF_DECL or  # Allow "typedef"
               i.kind == clang.cindex.CursorKind.ENUM_DECL):      # Allow enums
             pass
+
+        elif i.kind == clang.cindex.CursorKind.FRIEND_DECL:
+            children = list(i.get_children())
+            if (isPublic and
+                (len(children) != 1 or
+                 not children[0].displayname in [
+                     # This is supported for ABI compatibility with Orthanc <= 1.8.0
+                     'operator<<(std::ostream &, const Orthanc::DicomTag &)',
+                 ])):
+                raise Exception('Unsupported: %s, %s' % (i.kind, i.location))
             
         else:
             if isPublic: