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

# sc\_MsgStateSend(3)

The MsgStateSend is an abstract base class that sends objects to nodes in a MessageGrp.

## NAME

sc::MsgStateSend - The **MsgStateSend** is an abstract base class that sends objects to nodes in a **MessageGrp**.

## SYNOPSIS

`#include <mstate.h>`

Inherits **sc::StateOut**.

Inherited by **sc::BcastStateSend**, and **sc::StateSend**.

### Public Member Functions

**MsgStateSend** (const **Ref**\< **MessageGrp** \> &)\
 virtual void **flush** ()=0\
 Specializations must implement **flush()**.  void **set\_buffer\_size** (int)\
 The buffer size of statein and stateout objects that communicate with each other must match.  int **put** (const **ClassDesc** \*)\
 I only need to override **put(const ClassDesc\*)** but C++ will hide all of the other put's so I must override everything.  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 int \*, int)\
 int **put** (const unsigned int \*, int)\
 int **put** (const float \*, int)\
 int **put** (const double \*, int)\

### Protected Member Functions

int **put\_array\_void** (const void \*, int)\

### Protected Attributes

**Ref**\< **MessageGrp** \> **grp**\
 int **nbuf**\
 int **bufsize**\
 char \* **buffer**\
 char \* **send\_buffer**\
 int **nheader**\
 int \* **nbuf\_buffer**\

## Detailed Description

The **MsgStateSend** is an abstract base class that sends objects to nodes in a **MessageGrp**.

## Member Function Documentation

### virtual void sc::MsgStateSend::flush ()` [pure virtual]`

Specializations must implement **flush()**.

Reimplemented from **sc::StateOut**.

Implemented in **sc::StateSend**, and **sc::BcastStateSend**.

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

Write the given datum.

Reimplemented from **sc::StateOut**.

### int sc::MsgStateSend::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::MsgStateSend::put (const ClassDesc \*)` [virtual]`

I only need to override **put(const ClassDesc\*)** but C++ will hide all of the other put's so I must override everything.

Reimplemented from **sc::StateOut**.

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

Reimplemented from **sc::StateOut**.

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

Reimplemented from **sc::StateOut**.

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

Reimplemented from **sc::StateOut**.

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

Reimplemented from **sc::StateOut**.

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

Reimplemented from **sc::StateOut**.

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

Reimplemented from **sc::StateOut**.

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

Reimplemented from **sc::StateOut**.

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

Reimplemented from **sc::StateOut**.

### int sc::MsgStateSend::put\_array\_void (const void \*, int)` [protected]`, ` [virtual]`

Reimplemented from **sc::StateOut**.

## Author

Generated automatically by Doxygen for MPQC from the source code.
