VTK  9.1.0
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=========================================================================*/
27#ifndef vtkPartitionedArchiver_h
28#define vtkPartitionedArchiver_h
29
30#include "vtkCommonArchiveModule.h" // For export macro
31
32#include "vtkArchiver.h"
33
34class VTKCOMMONARCHIVE_EXPORT vtkPartitionedArchiver : public vtkArchiver
35{
36public:
39 void PrintSelf(ostream& os, vtkIndent indent) override;
40
42
45 void OpenArchive() override;
47
49
52 void CloseArchive() override;
54
56
60 const std::string& relativePath, const char* data, std::size_t size) override;
62
64
67 bool Contains(const std::string& relativePath) override;
69
71
74 const char* GetBuffer(const char* relativePath);
76
78
81 const void* GetBufferAddress(const char* relativePath);
83
85
88 std::size_t GetBufferSize(const char* relativePath);
90
92
95 std::size_t GetNumberOfBuffers();
97
99
102 const char* GetBufferName(std::size_t i);
104
105protected:
108
109 struct Internal;
110 Internal* Internals;
111
112private:
114 void operator=(const vtkPartitionedArchiver&) = delete;
115};
116
117#endif
Writes an archive.
Definition: vtkArchiver.h:37
a simple class to control print indentation
Definition: vtkIndent.h:113
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 arhive 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 arhive.
static vtkPartitionedArchiver * New()