The Sparta Modeling Framework
Loading...
Searching...
No Matches
FILEOstream Class Reference

#include <FILEStream.hpp>

Public Member Functions

 FILEOstream (FILE *fd)
 
std::ostream & getStream ()
 

Detailed Description

A class for creating an ostream from a C file stream.

Create one of these on the stack, then use the getStream method to get a reference to its std::ostream.

This class basically holds the appropriate custom streambuf instance and the ostream instance. The caller will still be responsible for creating and closing the C file stream.

Definition at line 21 of file FILEStream.hpp.

Constructor & Destructor Documentation

◆ FILEOstream()

FILEOstream::FILEOstream ( FILE *  fd)
inline

Constructor.

Parameters
fdPointer to the underlying file stream.

Definition at line 138 of file FILEStream.hpp.

Member Function Documentation

◆ getStream()

std::ostream & FILEOstream::getStream ( )
inline

Get a reference to the internal ostream.

Returns
A reference to the internal ostream.
Note
Don't use it after 'this' goes is out of scope

Definition at line 148 of file FILEStream.hpp.


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