comparison Framework/Common/Utf8StringValue.h @ 243:f5dc59c56e65

simplification
author Sebastien Jodogne <s.jodogne@gmail.com>
date Tue, 13 Apr 2021 17:53:53 +0200
parents 3236894320d6
children 16aac0287485
comparison
equal deleted inserted replaced
242:b97a537f4613 243:f5dc59c56e65
32 { 32 {
33 private: 33 private:
34 std::string utf8_; 34 std::string utf8_;
35 35
36 public: 36 public:
37 explicit Utf8StringValue()
38 {
39 }
40
41 explicit Utf8StringValue(const std::string& utf8) : 37 explicit Utf8StringValue(const std::string& utf8) :
42 utf8_(utf8)
43 {
44 }
45
46 explicit Utf8StringValue(const char* utf8) :
47 utf8_(utf8) 38 utf8_(utf8)
48 { 39 {
49 } 40 }
50 41
51 const std::string& GetContent() const 42 const std::string& GetContent() const
57 { 48 {
58 return ValueType_Utf8String; 49 return ValueType_Utf8String;
59 } 50 }
60 51
61 virtual IValue* Convert(ValueType target) const ORTHANC_OVERRIDE; 52 virtual IValue* Convert(ValueType target) const ORTHANC_OVERRIDE;
62
63 virtual std::string Format() const ORTHANC_OVERRIDE
64 {
65 return "[" + utf8_ + "]";
66 }
67 }; 53 };
68 } 54 }