VTK  9.2.6
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=========================================================================*/
30#ifndef vtkArchiver_h
31#define vtkArchiver_h
32
33#include "vtkCommonCoreModule.h" // For export macro
34
35#include "vtkObject.h"
36
37#include <ios> // For std::streamsize
38
39class VTKCOMMONCORE_EXPORT vtkArchiver : public vtkObject
40{
41public:
42 static vtkArchiver* New();
43 vtkTypeMacro(vtkArchiver, vtkObject);
44 void PrintSelf(ostream& os, vtkIndent indent) override;
45
47
50 vtkGetStringMacro(ArchiveName);
51 vtkSetStringMacro(ArchiveName);
53
55
58 virtual void OpenArchive();
60
62
65 virtual void CloseArchive();
67
69
72 virtual void InsertIntoArchive(
73 const std::string& relativePath, const char* data, std::size_t size);
75
77
80 virtual bool Contains(const std::string& relativePath);
82
83protected:
85 ~vtkArchiver() override;
86
88
89private:
90 vtkArchiver(const vtkArchiver&) = delete;
91 void operator=(const vtkArchiver&) = delete;
92};
93
94#endif
Writes an archive.
Definition: vtkArchiver.h:40
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 archive.
~vtkArchiver() override
virtual void OpenArchive()
Open the archive for writing.
static vtkArchiver * New()
char * ArchiveName
Definition: vtkArchiver.h:87
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:40
abstract base class for most VTK objects
Definition: vtkObject.h:63