A wrapper around a stream whose instances can be kept as data members of work functions. The wrapper allows work functions to access to the stream any location to which they may be sent via RMI invocation.
More...
|
| stream (char const *const name) |
| Construct the stream and attempt to associate it with the file specified. More...
|
|
| stream (char const *const name, std::ios_base::openmode mode) |
| Construct the stream and attempt to associate it with the file specified using the specified mode. More...
|
|
| stream (stream const &other) |
| Create a copy of the stream that does not take ownership of the underlying stream_wrapper_impl instance. More...
|
|
void | open (char const *const name) |
| Associate the stream with the named file. More...
|
|
void | open (char const *const name, std::ios_base::openmode mode) |
| Associate the stream with the named file. More...
|
|
void | close (void) |
| Close the file associated with the stream and disassociate the stream from it.
|
|
template<typename T > |
void | read (T &val) |
|
void | read (char_type *s, std::streamsize count) |
| Perform an unformatted read of count characters from the stream and store the characters in the buffer s .
|
|
void | getline (char_type *s, std::streamsize count, char_type delim=char_type('\n')) |
| Reads characters from the stream until the delimiter delim is encountered or count characters are read and store the results in the buffer s .
|
|
template<typename T > |
void | write (T &val) |
|
void | write (char_type *s, std::streamsize count) |
| Perform an unformatted write of count characters from the buffer s to the stream.
|
|
void | endl (void) |
| Method invoked when std::endl is written to the stream.
|
|
bool | is_open (void) const |
| Checks if the stream has an associated file.
|
|
|
typedef Stream::char_type | char_type |
|
template<typename Stream>
struct stapl::stream< Stream >
A wrapper around a stream whose instances can be kept as data members of work functions. The wrapper allows work functions to access to the stream any location to which they may be sent via RMI invocation.
Instances of this struct may be copied. All copies refer to the same underlying stream_wrapper_impl. Methods of this struct forward requests to the stream_wrapper_impl instance where they are processed.
◆ stream() [1/3]
template<typename Stream >
Construct the stream and attempt to associate it with the file specified.
- Parameters
-
name | file with which the stream should be associated. |
◆ stream() [2/3]
template<typename Stream >
Construct the stream and attempt to associate it with the file specified using the specified mode.
- Parameters
-
name | file with which the stream should be associated. |
mode | flags specifying the mode in which the file should be opened |
◆ stream() [3/3]
template<typename Stream >
Create a copy of the stream that does not take ownership of the underlying stream_wrapper_impl instance.
- Parameters
-
other | original stream instance to copy |
◆ open() [1/2]
template<typename Stream >
Associate the stream with the named file.
- Parameters
-
◆ open() [2/2]
template<typename Stream >
void stapl::stream< Stream >::open |
( |
char const *const |
name, |
|
|
std::ios_base::openmode |
mode |
|
) |
| |
Associate the stream with the named file.
- Parameters
-
name | file to be opened |
mode | flags specifying the mode in which the file should be opened |
The documentation for this struct was generated from the following file: