VTK  9.2.6
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 
37 class VTKCOMMONARCHIVE_EXPORT vtkPartitionedArchiver : public vtkArchiver
38 {
39 public:
40  static vtkPartitionedArchiver* New();
42  void PrintSelf(ostream& os, vtkIndent indent) override;
43 
45 
48  void OpenArchive() override;
50 
52 
55  void CloseArchive() override;
57 
59 
62  void InsertIntoArchive(
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 
108 protected:
110  ~vtkPartitionedArchiver() override;
111 
112  struct Internal;
113  Internal* Internals;
114 
115 private:
117  void operator=(const vtkPartitionedArchiver&) = delete;
118 };
119 
120 #endif
virtual void CloseArchive()
Close the archive.
a simple class to control print indentation
Definition: vtkIndent.h:39
Writes an archive.
Definition: vtkArchiver.h:39
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
virtual bool Contains(const std::string &relativePath)
Checks if relativePath represents an entry in the archive.
virtual void OpenArchive()
Open the archive for writing.
static vtkArchiver * New()
Writes an archive to several buffers.
virtual void InsertIntoArchive(const std::string &relativePath, const char *data, std::size_t size)
Insert data of size size into the archive at relativePath.