VTK  9.4.20241118
vtkFileResourceStream.h
Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2// SPDX-License-Identifier: BSD-3-Clause
3#ifndef vtkFileResourceStream_h
4#define vtkFileResourceStream_h
5
6#include "vtkIOCoreModule.h" // For export macro
7#include "vtkResourceStream.h"
8
9#include <memory> // for std::unique_ptr
10
11VTK_ABI_NAMESPACE_BEGIN
12
16class VTKIOCORE_EXPORT vtkFileResourceStream : public vtkResourceStream
17{
18 struct vtkInternals;
19
20public:
23 void PrintSelf(ostream& os, vtkIndent indent) override;
24
37 bool Open(VTK_FILEPATH const char* path);
38
40
43 std::size_t Read(void* buffer, std::size_t bytes) override;
44 bool EndOfStream() override;
45 vtkTypeInt64 Seek(vtkTypeInt64 pos, SeekDirection dir) override;
46 vtkTypeInt64 Tell() override;
48
49protected:
54
55private:
56 std::unique_ptr<vtkInternals> Impl;
57};
58
59VTK_ABI_NAMESPACE_END
60
61#endif
vtkResourceStream implementation for file input
vtkTypeInt64 Tell() override
Override vtkResourceStream functions.
bool EndOfStream() override
Override vtkResourceStream functions.
bool Open(VTK_FILEPATH const char *path)
Open a file.
vtkFileResourceStream & operator=(const vtkFileResourceStream &)=delete
static vtkFileResourceStream * New()
vtkTypeInt64 Seek(vtkTypeInt64 pos, SeekDirection dir) override
Override vtkResourceStream functions.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkFileResourceStream(const vtkFileResourceStream &)=delete
std::size_t Read(void *buffer, std::size_t bytes) override
Override vtkResourceStream functions.
~vtkFileResourceStream() override
a simple class to control print indentation
Definition vtkIndent.h:108
Abstract class used for custom streams.
#define VTK_FILEPATH