| Home | Libraries | People | FAQ | More

## Class content

boost::mpi::content — A proxy object that transfers the content of an object without its structure.

## Synopsis

    // In header: <boost/mpi/skeleton_and_content.hpp>

    class content {
    public:
      // construct/copy/destruct
      content();
      content(MPI_Datatype, bool = true);
      const content & operator=(MPI_Datatype);

      // public member functions
      MPI_Datatype get_mpi_datatype() const;
      void commit();
    };

## Description

The `content` class indicates that Boost.MPI should transmit or receive the content of an object, but without any information about the structure of the object. It is only meaningful to transmit the content of an object after the receiver has already received the skeleton for the same object.

Most users will not use `content` objects directly. Rather, they will invoke `send`, `recv`, or `broadcast` operations using `get_content()`.

### `content` public construct/copy/destruct

1.     content();

   Constructs an empty `content` object. This object will not be useful for any Boost.MPI operations until it is reassigned.

2.     content(MPI_Datatype d, bool committed = true);

   This routine initializes the `content` object with an MPI data type that refers to the content of an object without its structure.

   Parameters: |

   `committed` | `true` indicates that `MPI_Type_commit` has already been excuted for the data type `d`.
   `d` | the MPI data type referring to the content of the object.

3.     const content & operator=(MPI_Datatype d);

   Replace the MPI data type referencing the content of an object.

   Parameters: |

   `d` | the new MPI data type referring to the content of the object.

   Returns: | *this

### `content` public member functions

1.     MPI_Datatype get_mpi_datatype() const;

   Retrieve the MPI data type that refers to the content of the object.

   Returns: | the MPI data type, which should only be transmitted or received using `MPI_BOTTOM` as the address.

2.     void commit();

   Commit the MPI data type referring to the content of the object.