---
name: "sc_StateOutFile"
section: "3"
platform: "linux"
package: "libsc-doc"
version: "2.3.1-22"
release: "Debian 12 (Bookworm)"
platforms: ["linux"]
url: "https://new.carta.tech/sc_StateOutFile"
---

# sc\_StateOutFile(3)

Writes state information to files.

## NAME

sc::StateOutFile - Writes state information to files.

## SYNOPSIS

`#include <state_file.h>`

Inherits **sc::StateOut**.

Inherited by **sc::StateOutBin**, and **sc::StateOutText**.

### Public Member Functions

**StateOutFile** ()\
 State information will be written to **ExEnv::outn()**.  **StateOutFile** (std::ostream &s)\
 State information will be written to s.  **StateOutFile** (const char \*name)\
 State information will be written to name.  virtual int **open** (const char \*name)\
 State information will be written to name.  virtual void **flush** ()\
 Flush the output stream.  virtual void **close** ()\
 Close the output stream.

### Protected Attributes

int **opened\_**\
 std::streambuf \* **buf\_**\

### Additional Inherited Members

## Detailed Description

Writes state information to files.

## Member Function Documentation

### virtual void sc::StateOutFile::close ()` [virtual]`

Close the output stream.

Reimplemented in **sc::StateOutBin**.

### virtual void sc::StateOutFile::flush ()` [virtual]`

Flush the output stream.

Reimplemented from **sc::StateOut**.

### virtual int sc::StateOutFile::open (const char \* name)` [virtual]`

State information will be written to name.

Reimplemented in **sc::StateOutBin**.

## Author

Generated automatically by Doxygen for MPQC from the source code.
