Arcane  v3.14.10.0
Documentation développeur
Chargement...
Recherche...
Aucune correspondance
OStringStream.cc
1// -*- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature -*-
2//-----------------------------------------------------------------------------
3// Copyright 2000-2022 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/* OStringStream.cc (C) 2000-2018 */
9/* */
10/* Flux de sortie dans une chaîne de caractères. */
11/*---------------------------------------------------------------------------*/
12/*---------------------------------------------------------------------------*/
13
14#include "arcane/utils/ArcanePrecomp.h"
15
16#include "arcane/utils/OStringStream.h"
17#include "arcane/utils/Iostream.h"
18#include "arcane/utils/FatalErrorException.h"
19
20/*---------------------------------------------------------------------------*/
21/*---------------------------------------------------------------------------*/
22
23ARCANE_BEGIN_NAMESPACE
24
25/*---------------------------------------------------------------------------*/
26/*---------------------------------------------------------------------------*/
27
28/*---------------------------------------------------------------------------*/
29/*---------------------------------------------------------------------------*/
30
32{
33 public:
34 std::ostringstream m_stream;
35};
36
37/*---------------------------------------------------------------------------*/
38/*---------------------------------------------------------------------------*/
39
40OStringStream::
41OStringStream()
43{
44}
45
46/*---------------------------------------------------------------------------*/
47/*---------------------------------------------------------------------------*/
48
49OStringStream::
50OStringStream(Integer bufsize)
51: m_p(new OStringStreamPrivate)
52{
53 ARCANE_UNUSED(bufsize);
54}
55
56/*---------------------------------------------------------------------------*/
57/*---------------------------------------------------------------------------*/
58
59OStringStream::
60~OStringStream()
61{
62 delete m_p;
63}
64
65/*---------------------------------------------------------------------------*/
66/*---------------------------------------------------------------------------*/
67
68std::ostream& OStringStream::
69operator()()
70{
71 return m_p->m_stream;
72}
73
74std::ostream& OStringStream::
75stream()
76{
77 return m_p->m_stream;
78}
79
80String OStringStream::
81str()
82{
83 return String(m_p->m_stream.str());
84}
85
86void OStringStream::
87reset()
88{
89 m_p->m_stream.str(std::string());
90}
91
92/*---------------------------------------------------------------------------*/
93/*---------------------------------------------------------------------------*/
94
95ARCANE_END_NAMESPACE
96
97/*---------------------------------------------------------------------------*/
98/*---------------------------------------------------------------------------*/
Lecteur des fichiers de maillage via la bibliothèque LIMA.
Definition Lima.cc:120
OStringStreamPrivate * m_p
Implémentation.