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

# sc\_StateOutText(3)

Writes out state information in an almost human readable format.

## NAME

sc::StateOutText - Writes out state information in an almost human readable format.

## SYNOPSIS

`#include <state_text.h>`

Inherits **sc::StateOutFile**.

### Public Member Functions

**StateOutText** (std::ostream &s)\
 **StateOutText** (const char \*)\
 int **putstring** (const char \*)\
 This is like put except the length of the char array is determined by interpreting the character array as a character string.  int **put\_array\_char** (const char \*, int)\
 Put arrays of data.  int **put\_array\_uint** (const unsigned int \*, int)\
 int **put\_array\_int** (const int \*, int)\
 int **put\_array\_float** (const float \*, int)\
 int **put\_array\_double** (const double \*, int)\
 int **put** (const **ClassDesc** \*)\
 Write out information about the given **ClassDesc**.  int **put** (char r)\
 Write the given datum.  int **put** (unsigned int r)\
 int **put** (int r)\
 int **put** (float r)\
 int **put** (double r)\
 int **put** (const char \*, int)\
 Write the given array data.  int **put** (const unsigned int \*, int)\
 int **put** (const int \*, int)\
 int **put** (const float \*, int)\
 int **put** (const double \*, int)\

### Protected Member Functions

void **no\_newline** ()\
 void **no\_array** ()\
 void **newline** ()\
 void **start\_array** ()\
 void **end\_array** ()\
 int **putobject** (const **Ref**\< **SavableState** \> &)\
 This will prepare **StateOut** to output a pointer to data.  int **putparents** (const **ClassDesc** \*)\

### Protected Attributes

int **no\_newline\_**\
 int **no\_array\_**\

## Detailed Description

Writes out state information in an almost human readable format.

**StateOutText** is intended for debugging only. The state information can read in again with **StateInText**.

## Member Function Documentation

### int sc::StateOutText::put (char r)` [virtual]`

Write the given datum.

Reimplemented from **sc::StateOut**.

### int sc::StateOutText::put (const char \*, int)` [virtual]`

Write the given array data. Size information is also saved. The data is allocated and read by the get(T\*&) routines.

Reimplemented from **sc::StateOut**.

### int sc::StateOutText::put (const ClassDesc \*)` [virtual]`

Write out information about the given **ClassDesc**.

Reimplemented from **sc::StateOut**.

### int sc::StateOutText::put (const double \*, int)` [virtual]`

Reimplemented from **sc::StateOut**.

### int sc::StateOutText::put (const float \*, int)` [virtual]`

Reimplemented from **sc::StateOut**.

### int sc::StateOutText::put (const int \*, int)` [virtual]`

Reimplemented from **sc::StateOut**.

### int sc::StateOutText::put (const unsigned int \*, int)` [virtual]`

Reimplemented from **sc::StateOut**.

### int sc::StateOutText::put (double r)` [virtual]`

Reimplemented from **sc::StateOut**.

### int sc::StateOutText::put (float r)` [virtual]`

Reimplemented from **sc::StateOut**.

### int sc::StateOutText::put (int r)` [virtual]`

Reimplemented from **sc::StateOut**.

### int sc::StateOutText::put (unsigned int r)` [virtual]`

Reimplemented from **sc::StateOut**.

### int sc::StateOutText::put\_array\_char (const char \* p, int size)` [virtual]`

Put arrays of data. No size information is stored. This data is read by the get\_array\_T routines.

Reimplemented from **sc::StateOut**.

### int sc::StateOutText::put\_array\_double (const double \*, int)` [virtual]`

Reimplemented from **sc::StateOut**.

### int sc::StateOutText::put\_array\_float (const float \*, int)` [virtual]`

Reimplemented from **sc::StateOut**.

### int sc::StateOutText::put\_array\_int (const int \*, int)` [virtual]`

Reimplemented from **sc::StateOut**.

### int sc::StateOutText::put\_array\_uint (const unsigned int \*, int)` [virtual]`

Reimplemented from **sc::StateOut**.

### int sc::StateOutText::putobject (const Ref\< SavableState \> &)` [protected]`, ` [virtual]`

This will prepare **StateOut** to output a pointer to data. It first checks to see if the data has already been saved. If it has, then a reference to this data is saved. Otherwise the object is written out.

Reimplemented from **sc::StateOut**.

### int sc::StateOutText::putparents (const ClassDesc \*)` [protected]`, ` [virtual]`

Reimplemented from **sc::StateOut**.

### int sc::StateOutText::putstring (const char \*)` [virtual]`

This is like put except the length of the char array is determined by interpreting the character array as a character string.

Reimplemented from **sc::StateOut**.

## Author

Generated automatically by Doxygen for MPQC from the source code.
