7 namespace manipulators {
22 this->parse_from_string(s);
27 return std::make_shared<dicom::RawValue>(this->str());
35 for (
size_t i = 0; i < this->size(); ++i) {
36 auto s = vega::to_string<T>((*this)[i]);
40 if (i < this->size()-1) {
64 size_t delimiters = 0;
66 for (
size_t i = 0; i < num_bytes; ++i) {
67 if (!reader->read_into(&c))
return false;
68 if (c ==
'\\') ++delimiters;
73 this->reserve(delimiters+1);
75 this->parse_from_string(ss.str());
81 std::string s = this->str();
82 return writer->write_from(s.begin(), s.end());
88 if (!other_ptr)
return false;
90 return this->str() == other_ptr->
str();
95 return !(*
this == other);
100 std::istringstream ss(s);
101 std::string element_string;
104 while(std::getline(ss, element_string,
'\\')) {
106 if (element_string.back() ==
' ') {
107 element_string = element_string.substr(0, element_string.size()-1);
109 this->push_back(vega::from_string<T>(element_string));
PaddedStringManipulator()
Definition: padded_string_manipulator_impl.h:9
Definition: value_manipulator.h:29
A manipulator class for VR that represent elements which are encoded in DICOM using strings...
Definition: padded_string_manipulator.h:89
std::string str() const override
Definition: padded_string_manipulator_impl.h:31