VTK  9.0.1
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 
34 class VTKCOMMONARCHIVE_EXPORT vtkPartitionedArchiver : public vtkArchiver
35 {
36 public:
37  static vtkPartitionedArchiver* New();
39  void PrintSelf(ostream& os, vtkIndent indent) override;
40 
42 
45  void OpenArchive() override;
47 
49 
52  void CloseArchive() override;
54 
56 
59  void InsertIntoArchive(
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 
105 protected:
107  ~vtkPartitionedArchiver() override;
108 
109  struct Internal;
110  Internal* Internals;
111 
112 private:
114  void operator=(const vtkPartitionedArchiver&) = delete;
115 };
116 
117 #endif
virtual void CloseArchive()
Close the arhive.
a simple class to control print indentation
Definition: vtkIndent.h:33
Writes an archive.
Definition: vtkArchiver.h:36
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 arhive 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.