VTK  9.1.20211018
vtkArchiver.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkArchiver.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 vtkArchiver_h
28 #define vtkArchiver_h
29 
30 #include "vtkCommonCoreModule.h" // For export macro
31 
32 #include "vtkObject.h"
33 
34 #include <ios> // For std::streamsize
35 
36 class VTKCOMMONCORE_EXPORT vtkArchiver : public vtkObject
37 {
38 public:
39  static vtkArchiver* New();
40  vtkTypeMacro(vtkArchiver, vtkObject);
41  void PrintSelf(ostream& os, vtkIndent indent) override;
42 
44 
47  vtkGetStringMacro(ArchiveName);
48  vtkSetStringMacro(ArchiveName);
50 
52 
55  virtual void OpenArchive();
57 
59 
62  virtual void CloseArchive();
64 
66 
69  virtual void InsertIntoArchive(
70  const std::string& relativePath, const char* data, std::size_t size);
72 
74 
77  virtual bool Contains(const std::string& relativePath);
79 
80 protected:
82  ~vtkArchiver() override;
83 
84  char* ArchiveName;
85 
86 private:
87  vtkArchiver(const vtkArchiver&) = delete;
88  void operator=(const vtkArchiver&) = delete;
89 };
90 
91 #endif
Writes an archive.
Definition: vtkArchiver.h:37
virtual void InsertIntoArchive(const std::string &relativePath, const char *data, std::size_t size)
Insert data of size size into the archive at relativePath.
virtual void CloseArchive()
Close the arhive.
~vtkArchiver() override
static vtkArchiver * New()
virtual void OpenArchive()
Open the arhive for writing.
char * ArchiveName
Definition: vtkArchiver.h:84
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.
a simple class to control print indentation
Definition: vtkIndent.h:113
abstract base class for most VTK objects
Definition: vtkObject.h:82
@ size
Definition: vtkX3D.h:259
@ data
Definition: vtkX3D.h:321
@ string
Definition: vtkX3D.h:496