VTK  9.4.20250113
vtkPartitionedArchiver.h
Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2// SPDX-License-Identifier: BSD-3-Clause
18#ifndef vtkPartitionedArchiver_h
19#define vtkPartitionedArchiver_h
20
21#include "vtkCommonArchiveModule.h" // For export macro
22
23#include "vtkArchiver.h"
24
25VTK_ABI_NAMESPACE_BEGIN
26class VTKCOMMONARCHIVE_EXPORT vtkPartitionedArchiver : public vtkArchiver
27{
28public:
31 void PrintSelf(ostream& os, vtkIndent indent) override;
32
34
37 void OpenArchive() override;
39
41
44 void CloseArchive() override;
46
48
52 const std::string& relativePath, const char* data, std::size_t size) override;
54
56
59 bool Contains(const std::string& relativePath) override;
61
63
66 const char* GetBuffer(const char* relativePath);
68
70
73 const void* GetBufferAddress(const char* relativePath);
75
77
80 std::size_t GetBufferSize(const char* relativePath);
82
84
87 std::size_t GetNumberOfBuffers();
89
91
94 const char* GetBufferName(std::size_t i);
96
97protected:
100
101 struct Internal;
102 Internal* Internals;
103
104private:
106 void operator=(const vtkPartitionedArchiver&) = delete;
107};
108
109VTK_ABI_NAMESPACE_END
110#endif
Writes an archive.
Definition vtkArchiver.h:29
a simple class to control print indentation
Definition vtkIndent.h:108
Writes an archive to several buffers.
const char * GetBufferName(std::size_t i)
Get the name of buffer i.
std::size_t GetNumberOfBuffers()
Get the number of buffers in the archive.
std::size_t GetBufferSize(const char *relativePath)
Get the buffer used size.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
const char * GetBuffer(const char *relativePath)
Access the buffer.
void OpenArchive() override
Open the archive for writing.
~vtkPartitionedArchiver() override
void InsertIntoArchive(const std::string &relativePath, const char *data, std::size_t size) override
Insert data of size size into the archive at relativePath.
const void * GetBufferAddress(const char *relativePath)
Access the address of the buffer.
bool Contains(const std::string &relativePath) override
Checks if relativePath represents an entry in the archive.
void CloseArchive() override
Close the archive.
static vtkPartitionedArchiver * New()