comparison Core/Enumerations.h @ 2924:22524fd06225

macros ORTHANC_OVERRIDE and ORTHANC_FINAL
author Sebastien Jodogne <s.jodogne@gmail.com>
date Fri, 09 Nov 2018 09:06:46 +0100
parents 9d277f8ad698
children cb5d75143da0
comparison
equal deleted inserted replaced
2923:87366b8aed4f 2924:22524fd06225
34 #pragma once 34 #pragma once
35 35
36 #include <string> 36 #include <string>
37 37
38 38
39 // Macro "ORTHANC_FORCE_INLINE" forces a function/method to be inlined
39 #if defined(_MSC_VER) 40 #if defined(_MSC_VER)
40 # define ORTHANC_FORCE_INLINE __forceinline 41 # define ORTHANC_FORCE_INLINE __forceinline
41 #elif defined(__GNUC__) || defined(__clang__) || defined(__EMSCRIPTEN__) 42 #elif defined(__GNUC__) || defined(__clang__) || defined(__EMSCRIPTEN__)
42 # define ORTHANC_FORCE_INLINE inline __attribute((always_inline)) 43 # define ORTHANC_FORCE_INLINE inline __attribute((always_inline))
43 #else 44 #else
44 # error Please support your compiler here 45 # error Please support your compiler here
45 #endif 46 #endif
46 47
47 48
49 // Macros "ORTHANC_OVERRIDE" and "ORTHANC_FINAL" wrap the "override"
50 // and "final" keywords introduced in C++11, to do compile-time
51 // checking of virtual methods
52 #if __cplusplus >= 201103L
53 // C++11 is enabled
54 # define ORTHANC_OVERRIDE override
55 # define ORTHANC_FINAL final
56 #else
57 // C++11 is disabled
58 # define ORTHANC_OVERRIDE
59 # define ORTHANC_FINAL
60 #endif
61
62
48 namespace Orthanc 63 namespace Orthanc
49 { 64 {
50 static const char* const URI_SCHEME_PREFIX_BINARY = "data:application/octet-stream;base64,"; 65 static const char* const URI_SCHEME_PREFIX_BINARY = "data:application/octet-stream;base64,";
51 66
52 static const char* const MIME_BINARY = "application/octet-stream"; 67 static const char* const MIME_BINARY = "application/octet-stream";
53 static const char* const MIME_DICOM = "application/dicom";
54 static const char* const MIME_JPEG = "image/jpeg"; 68 static const char* const MIME_JPEG = "image/jpeg";
55 static const char* const MIME_JPEG2000 = "image/jp2";
56 static const char* const MIME_JSON = "application/json"; 69 static const char* const MIME_JSON = "application/json";
57 static const char* const MIME_JSON_UTF8 = "application/json; charset=utf-8"; 70 static const char* const MIME_JSON_UTF8 = "application/json; charset=utf-8";
58 static const char* const MIME_XML_UTF8 = "application/xml; charset=utf-8";
59 static const char* const MIME_PDF = "application/pdf"; 71 static const char* const MIME_PDF = "application/pdf";
60 static const char* const MIME_PNG = "image/png"; 72 static const char* const MIME_PNG = "image/png";
61 static const char* const MIME_XML = "application/xml"; 73 static const char* const MIME_XML = "application/xml";
62 static const char* const MIME_XML_2 = "text/xml"; 74 static const char* const MIME_XML_UTF8 = "application/xml; charset=utf-8";
63 static const char* const MIME_HTML = "text/html";
64 static const char* const MIME_PLAIN_TEXT = "text/plain";
65 static const char* const MIME_GZIP = "application/gzip";
66 static const char* const MIME_JAVASCRIPT = "application/javascript";
67 static const char* const MIME_CSS = "text/css";
68 static const char* const MIME_GIF = "image/gif";
69 static const char* const MIME_WEB_ASSEMBLY = "application/wasm";
70 75
71 /** 76 /**
72 * "No Internet Media Type (aka MIME type, content type) for PBM has 77 * "No Internet Media Type (aka MIME type, content type) for PBM has
73 * been registered with IANA, but the unofficial value 78 * been registered with IANA, but the unofficial value
74 * image/x-portable-arbitrarymap is assigned by this specification, 79 * image/x-portable-arbitrarymap is assigned by this specification,