Mercurial > hg > orthanc-databases
comparison Framework/Common/ResultFileValue.cpp @ 246:483af3f35a4b
turning ResultFileValue into a base class, and implement its primitives for PostgreSQL
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Wed, 14 Apr 2021 08:42:31 +0200 |
parents | 9d00e5e073e8 |
children | 16aac0287485 |
comparison
equal
deleted
inserted
replaced
245:9d00e5e073e8 | 246:483af3f35a4b |
---|---|
33 IValue* ResultFileValue::Convert(ValueType target) const | 33 IValue* ResultFileValue::Convert(ValueType target) const |
34 { | 34 { |
35 switch (target) | 35 switch (target) |
36 { | 36 { |
37 case ValueType_BinaryString: | 37 case ValueType_BinaryString: |
38 return new BinaryStringValue(content_); | 38 { |
39 std::string content; | |
40 ReadWhole(content); | |
41 return new BinaryStringValue(content); | |
42 } | |
39 | 43 |
40 default: | 44 default: |
41 throw Orthanc::OrthancException(Orthanc::ErrorCode_BadParameterType); | 45 throw Orthanc::OrthancException(Orthanc::ErrorCode_BadParameterType); |
42 } | 46 } |
43 } | 47 } |