---
name: "ttystream"
section: "3cc"
platform: "linux"
package: "libcommoncpp2-dev"
version: "1.0.13-5"
release: "Debian 3.1 (Sarge)"
platforms: ["linux"]
url: "https://new.carta.tech/ttystream"
---

# ttystream(3cc)

A more natural C++ 'ttystream' class for use by non-threaded applications. C++ 'fstream' style ttystream class.

## NAME

ttystream - A more natural C++ 'ttystream' class for use by non-threaded applications. C++ 'fstream' style ttystream class.

## SYNOPSIS

`#include <serial.h>`

Inherits **TTYStream**.

### Public Methods

**ttystream** ()\
 *Construct an unopened 'ttystream' object.* **ttystream** (const char \*name)\
 *Construct and 'open' a tty stream object.* void **open** (const char \*name)\
 *Open method for a tty stream.* void **close** (void)\
 *Close method for a tty stream.* bool **operator!** ()\
 *Test to see if stream is opened.*

## DETAILED DESCRIPTION

A more natural C++ 'ttystream' class for use by non-threaded applications. C++ 'fstream' style ttystream class.

This class behaves a lot more like fstream and similar classes.

**Author:**  David Sugar \<dyfet@ostel.com\>

## CONSTRUCTOR & DESTRUCTOR DOCUMENTATION

### ttystream::ttystream ()

Construct an unopened 'ttystream' object.

### ttystream::ttystream (const char \* name)

Construct and 'open' a tty stream object.

A filename in the form 'device:options\[,options\]' may be used to pass device options as part of the open.

**Parameters:**

- *name*

  *of file and serial options.*

## MEMBER FUNCTION DOCUMENTATION

### void ttystream::close (void)

*Close method for a tty stream.*

*Reimplemented from* **Serial***.*

### void ttystream::open (const char \* name)

*Open method for a tty stream.*

**Parameters:**

- *name*

  *filename to open.*

*Reimplemented from* **Serial***.*

### bool ttystream::operator! (void)` [inline]`

*Test to see if stream is opened.*

## AUTHOR

*Generated automatically by Doxygen for CommonC++ from the source code.*
