Arcane  4.1.12.0
Developer documentation
Loading...
Searching...
No Matches
Communicator.cc
1// -*- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature -*-
2//-----------------------------------------------------------------------------
3// Copyright 2000-2026 CEA (www.cea.fr) IFPEN (www.ifpenergiesnouvelles.com)
4// See the top-level COPYRIGHT file for details.
5// SPDX-License-Identifier: Apache-2.0
6//-----------------------------------------------------------------------------
7/*---------------------------------------------------------------------------*/
8/* Communicator.cc (C) 2000-2025 */
9/* */
10/* Communicator for message exchange. */
11/*---------------------------------------------------------------------------*/
12/*---------------------------------------------------------------------------*/
13
14#include "arccore/message_passing/Communicator.h"
15
16#include <iostream>
17
18/*---------------------------------------------------------------------------*/
19/*---------------------------------------------------------------------------*/
20
22{
23
24/*---------------------------------------------------------------------------*/
25/*---------------------------------------------------------------------------*/
26
27Communicator::_Communicator Communicator::null_communicator;
28int Communicator::null_communicator_type = Communicator::T_Null;
29
30/*---------------------------------------------------------------------------*/
31/*---------------------------------------------------------------------------*/
32
33void Communicator::
34print(std::ostream& o) const
35{
36 if (m_type == T_Null)
37 o << "(null)";
38 else if (m_type == T_Int)
39 o << m_communicator.i;
40 else if (m_type == T_Long)
41 o << m_communicator.l;
42 else
43 o << m_communicator.cv;
44}
45
46/*---------------------------------------------------------------------------*/
47/*---------------------------------------------------------------------------*/
48
49} // namespace Arcane::MessagePassing
50
51/*---------------------------------------------------------------------------*/
52/*---------------------------------------------------------------------------*/
Declarations of types and methods used by message exchange mechanisms.