本文主要是介绍orthanc,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!
bool StatelessDatabaseOperations::LookupAttachment(FileInfo& attachment,int64_t& revision,const std::string& instancePublicId,FileContentType contentType){class Operations : public ReadOnlyOperationsT5<bool&, FileInfo&, int64_t&, const std::string&, FileContentType>{public:virtual void ApplyTuple(ReadOnlyTransaction& transaction,const Tuple& tuple) ORTHANC_OVERRIDE{int64_t internalId;ResourceType type;if (!transaction.LookupResource(internalId, type, tuple.get<3>())){throw OrthancException(ErrorCode_UnknownResource);}else if (transaction.LookupAttachment(tuple.get<1>(), tuple.get<2>(), internalId, tuple.get<4>())){assert(tuple.get<1>().GetContentType() == tuple.get<4>());tuple.get<0>() = true;}else{tuple.get<0>() = false;}}};bool found;Operations operations;operations.Apply(*this, found, attachment, revision, instancePublicId, contentType);return found;}
这篇关于orthanc的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!