Teuchos - Trilinos Tools Package Version of the Day
Loading...
Searching...
No Matches
Teuchos_FileInputStream.hpp
Go to the documentation of this file.
1// @HEADER
2// *****************************************************************************
3// Teuchos: Common Tools Package
4//
5// Copyright 2004 NTESS and the Teuchos contributors.
6// SPDX-License-Identifier: BSD-3-Clause
7// *****************************************************************************
8// @HEADER
9
10#ifndef TEUCHOS_FILEINPUTSTREAM_H
11#define TEUCHOS_FILEINPUTSTREAM_H
12
16
19
20namespace Teuchos
21{
22 using std::string;
23
30 {
31 public:
33 FileInputStream(const std::string& filename);
34
36 virtual ~FileInputStream() { if( file_ ) { std::fclose(file_); } }
37
39 virtual unsigned int readBytes(unsigned char* const toFill,
40 const unsigned int maxToRead);
41
42 private:
43 std::FILE* file_;
44 };
45}
46#endif
47
Teuchos header file which uses auto-configuration information to include necessary C++ headers.
A base class for defining a XML input stream.
virtual ~FileInputStream()
Destructor.
virtual unsigned int readBytes(unsigned char *const toFill, const unsigned int maxToRead)
Read up to maxToRead bytes.
FileInputStream(const std::string &filename)
Construct with a filename.
The Teuchos namespace contains all of the classes, structs and enums used by Teuchos,...