14 #ifndef GDCMDATAELEMENT_H
15 #define GDCMDATAELEMENT_H
36 class SequenceOfItems;
37 class SequenceOfFragments;
74 const VL&
GetVL()
const {
return ValueLengthField; }
79 void SetVL(
const VL &vl) { ValueLengthField = vl; }
80 void SetVLToUndefined();
84 VR const &
GetVR()
const {
return VRField; }
103 bool IsEmpty()
const {
return ValueField == 0 || (GetByteValue() && GetByteValue()->IsEmpty()); }
106 void Empty() { ValueField = 0; ValueLengthField = 0; }
114 ValueLengthField = 0;
123 void SetByteValue(
const char *array,
VL length)
160 bool IsUndefinedLength()
const {
161 return ValueLengthField.IsUndefined();
174 return GetTag() < de.
GetTag();
213 template <
typename TDE>
215 return static_cast<const TDE*
>(
this)->GetLength();
218 template <
typename TDE,
typename TSwap>
219 std::istream &
Read(std::istream &is) {
220 return static_cast<TDE*
>(
this)->
template Read<TSwap>(is);
223 template <
typename TDE,
typename TSwap>
224 std::istream &
ReadOrSkip(std::istream &is, std::set<Tag>
const &skiptags) {
226 return static_cast<TDE*
>(
this)->
template Read<TSwap>(is);
229 template <
typename TDE,
typename TSwap>
230 std::istream &
ReadPreValue(std::istream &is, std::set<Tag>
const &skiptags) {
232 return static_cast<TDE*
>(
this)->
template ReadPreValue<TSwap>(is);
234 template <
typename TDE,
typename TSwap>
235 std::istream &
ReadValue(std::istream &is, std::set<Tag>
const &skiptags) {
237 return static_cast<TDE*
>(
this)->
template ReadValue<TSwap>(is);
240 template <
typename TDE,
typename TSwap>
242 return static_cast<TDE*
>(
this)->
template ReadWithLength<TSwap>(is,length);
245 template <
typename TDE,
typename TSwap>
246 const std::ostream &
Write(std::ostream &os)
const {
247 return static_cast<const TDE*
>(
this)->
template Write<TSwap>(os);
275 return ! ( lhs == rhs );
280 #endif //GDCMDATAELEMENT_H