17#ifndef DCM_TREE_VALUE_H
18#define DCM_TREE_VALUE_H
21 #pragma warning (push)
22 #pragma warning (disable : 4350)
30#include <boost/shared_array.hpp>
90 bool operator ==(const
Value &other) const;
95 bool operator !=(const
Value &other) const;
110 const
unsigned char *
data() const;
169 void allocate (const
unsigned int &
size);
171 boost::shared_array<
unsigned char> _data;
173 unsigned int _buffersize;
178 inline
std::ostream &operator << (
std::ostream &out,const
Value &v)
Class to store tag values.
void setData(const unsigned int &size, const unsigned char *data)
Sets data and capacity.
boost::shared_array< unsigned char > sharedData() const
Accesses data.
Value(const Value &other)
Makes a deep copy of other to this.
Value(Value &&) noexcept=default
void toStream(std::ostream &out) const
Copies this instance recursively into the given stream.
unsigned int size() const
Returns the size of the valid part of data.
Value(const unsigned int &size)
Creates a value with the given size in bytes.
Value(const unsigned int &size, const unsigned char *data)
Creates a value with the given size in bytes and memcpy data to it.
bool isNull() const
Checks whether size of this is 0.
void setSize(const unsigned int &size)
Sets the size or capacity of this.
const unsigned char * data() const
Accesses data.
void serializeX(DCMTree_Serialization::Sink &sink) const override
Writes data of this object to sink.
void fromStream(std::istream &in)
Extracts this instance from the given stream.
void purge()
Drops all data.
void deserializeX(DCMTree_Serialization::Source &source) override
Overwrites data of this object with data from source.
Interface that provides a method to deserialize an object.
Interface that provides a method to serialize an object.
std::istream & operator>>(std::istream &in, ml::Variant &variant)
Class to dump a DCMTree DICOM message into a human-readable file.
std::vector< Value > ValueVector
Forward declaration for the boost::mutex class.