16#ifndef vtkXMLDataHeaderPrivate_DoNotInclude
17#error "do not include unless you know what you are doing"
20#ifndef vtkXMLDataHeaderPrivate_h
21#define vtkXMLDataHeaderPrivate_h
32 virtual void Resize(
size_t count) = 0;
33 virtual vtkTypeUInt64
Get(
size_t index)
const = 0;
34 virtual bool Set(
size_t index, vtkTypeUInt64 value) = 0;
37 virtual unsigned char*
Data() = 0;
46 std::vector<T> Header;
53 void Resize(
size_t count)
override { this->Header.resize(count, 0); }
54 vtkTypeUInt64
Get(
size_t index)
const override {
return this->Header[index]; }
55 bool Set(
size_t index, vtkTypeUInt64 value)
override
57 this->Header[index] = T(value);
58 return vtkTypeUInt64(this->Header[index]) == value;
60 size_t WordSize()
const override {
return sizeof(T); }
61 size_t WordCount()
const override {
return this->Header.size(); }
62 unsigned char*
Data()
override {
return reinterpret_cast<unsigned char*
>(&this->Header[0]); }