VTK  9.2.5
vtkPartitionedArchiver.h
Go to the documentation of this file.
1/*=========================================================================
2
3 Program: Visualization Toolkit
4 Module: vtkPartitionedArchiver.h
5
6 Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7 All rights reserved.
8 See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9
10 This software is distributed WITHOUT ANY WARRANTY; without even
11 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12 PURPOSE. See the above copyright notice for more information.
13
14=========================================================================*/
30#ifndef vtkPartitionedArchiver_h
31#define vtkPartitionedArchiver_h
32
33#include "vtkCommonArchiveModule.h" // For export macro
34
35#include "vtkArchiver.h"
36
37class VTKCOMMONARCHIVE_EXPORT vtkPartitionedArchiver : public vtkArchiver
38{
39public:
42 void PrintSelf(ostream& os, vtkIndent indent) override;
43
45
48 void OpenArchive() override;
50
52
55 void CloseArchive() override;
57
59
63 const std::string& relativePath, const char* data, std::size_t size) override;
65
67
70 bool Contains(const std::string& relativePath) override;
72
74
77 const char* GetBuffer(const char* relativePath);
79
81
84 const void* GetBufferAddress(const char* relativePath);
86
88
91 std::size_t GetBufferSize(const char* relativePath);
93
95
98 std::size_t GetNumberOfBuffers();
100
102
105 const char* GetBufferName(std::size_t i);
107
108protected:
111
112 struct Internal;
113 Internal* Internals;
114
115private:
117 void operator=(const vtkPartitionedArchiver&) = delete;
118};
119
120#endif
Writes an archive.
Definition: vtkArchiver.h:40
a simple class to control print indentation
Definition: vtkIndent.h:40
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()