VTK  9.3.0
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 
25 VTK_ABI_NAMESPACE_BEGIN
26 class VTKCOMMONARCHIVE_EXPORT vtkPartitionedArchiver : public vtkArchiver
27 {
28 public:
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 
97 protected:
100 
101  struct Internal;
102  Internal* Internals;
103 
104 private:
106  void operator=(const vtkPartitionedArchiver&) = delete;
107 };
108 
109 VTK_ABI_NAMESPACE_END
110 #endif
Writes an archive.
Definition: vtkArchiver.h:29
a simple class to control print indentation
Definition: vtkIndent.h:38
Writes an archive to several buffers.
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.
static vtkPartitionedArchiver * New()
void OpenArchive() override
Open the archive for writing.
const char * GetBufferName(std::size_t i)
Get the name of buffer i.
~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 char * GetBuffer(const char *relativePath)
Access the buffer.
bool Contains(const std::string &relativePath) override
Checks if relativePath represents an entry in the archive.
const void * GetBufferAddress(const char *relativePath)
Access the address of the buffer.
void CloseArchive() override
Close the archive.
@ size
Definition: vtkX3D.h:253
@ data
Definition: vtkX3D.h:315
@ string
Definition: vtkX3D.h:490