Mercurial > hg > orthanc
comparison OrthancServer/ServerContext.h @ 526:e318e9d49815 dicom-rt
rt-struct
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Thu, 29 Aug 2013 17:33:33 +0200 |
parents | 2d269089078f |
children | 8cfc6119a5bd |
comparison
equal
deleted
inserted
replaced
523:68451838fb2c | 526:e318e9d49815 |
---|---|
38 #include "../Core/RestApi/RestApiOutput.h" | 38 #include "../Core/RestApi/RestApiOutput.h" |
39 #include "../Core/Lua/LuaContext.h" | 39 #include "../Core/Lua/LuaContext.h" |
40 #include "ServerIndex.h" | 40 #include "ServerIndex.h" |
41 #include "FromDcmtkBridge.h" | 41 #include "FromDcmtkBridge.h" |
42 | 42 |
43 #include <boost/thread.hpp> | |
44 | |
43 namespace Orthanc | 45 namespace Orthanc |
44 { | 46 { |
45 /** | 47 /** |
46 * This class is responsible for maintaining the storage area on the | 48 * This class is responsible for maintaining the storage area on the |
47 * filesystem (including compression), as well as the index of the | 49 * filesystem (including compression), as well as the index of the |
60 { | 62 { |
61 } | 63 } |
62 | 64 |
63 virtual IDynamicObject* Provide(const std::string& id); | 65 virtual IDynamicObject* Provide(const std::string& id); |
64 }; | 66 }; |
67 | |
68 boost::mutex cacheMutex_; | |
65 | 69 |
66 FileStorage storage_; | 70 FileStorage storage_; |
67 ServerIndex index_; | 71 ServerIndex index_; |
68 CompressedFileStorageAccessor accessor_; | 72 CompressedFileStorageAccessor accessor_; |
69 bool compressionEnabled_; | 73 bool compressionEnabled_; |
131 FileContentType content); | 135 FileContentType content); |
132 | 136 |
133 // TODO IMPLEMENT MULTITHREADING FOR THIS METHOD | 137 // TODO IMPLEMENT MULTITHREADING FOR THIS METHOD |
134 ParsedDicomFile& GetDicomFile(const std::string& instancePublicId); | 138 ParsedDicomFile& GetDicomFile(const std::string& instancePublicId); |
135 | 139 |
140 boost::mutex& GetDicomFileMutex() | |
141 { | |
142 // TODO IMPROVE MULTITHREADING | |
143 // Every call to "ParsedDicomFile" must lock this mutex!!! | |
144 return cacheMutex_; | |
145 } | |
146 | |
136 LuaContext& GetLuaContext() | 147 LuaContext& GetLuaContext() |
137 { | 148 { |
138 return lua_; | 149 return lua_; |
139 } | 150 } |
140 }; | 151 }; |