Teuchos Package Browser (Single Doxygen Collection)  Version of the Day
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
Teuchos::FILEstream Class Reference

Teuchos::FILEstream: Combined C FILE and C++ stream. More...

#include <Teuchos_FILEstream.hpp>

Inherits streambuf.

Public Member Functions

 FILEstream (std::FILE *file)
 Constructor. More...
 

Protected Member Functions

std::streambuf::int_type overflow (std::streambuf::int_type c)
 

Protected Attributes

FILE * self_file
 

Detailed Description

Teuchos::FILEstream: Combined C FILE and C++ stream.

Teuchos::FILEstream is a class that defines an object that is simultaneously a C FILE object and a C++ stream object. The utility of this class is in connecting existing C++ code that uses streams and C code that uses FILEs. An important example of this situation is the python wrappers for Trilinos packages. Trilinos is of course written primarily in C++, but the python wrappers must interface to the python C API. Wrappers for Trilinos methods or operators that expect a stream can be given a Teuchos::FILEstream, which then behaves as a FILE within the python C API. This is a low-level object that should not be needed at the user level.

Definition at line 35 of file Teuchos_FILEstream.hpp.

Constructor & Destructor Documentation

Teuchos::FILEstream::FILEstream ( std::FILE *  file)
inline

Constructor.

The only constructor for Teuchos:FILEstream, and it requires a pointer to a C FILE struct.

Definition at line 44 of file Teuchos_FILEstream.hpp.

Member Function Documentation

std::streambuf::int_type Teuchos::FILEstream::overflow ( std::streambuf::int_type  c)
inlineprotected

Definition at line 48 of file Teuchos_FILEstream.hpp.

Member Data Documentation

FILE* Teuchos::FILEstream::self_file
protected

Definition at line 53 of file Teuchos_FILEstream.hpp.


The documentation for this class was generated from the following file: