Arcane  4.1.12.0
User documentation
Loading...
Searching...
No Matches
OStringStream.h
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/* OStringStream.h (C) 2000-2018 */
9/* */
10/* Output stream into a character string. */
11/*---------------------------------------------------------------------------*/
12#ifndef ARCANE_UTILS_OSTRINGSTREAM_H
13#define ARCANE_UTILS_OSTRINGSTREAM_H
14/*---------------------------------------------------------------------------*/
15/*---------------------------------------------------------------------------*/
16
17#include "arcane/utils/String.h"
18
19/*---------------------------------------------------------------------------*/
20/*---------------------------------------------------------------------------*/
21
22namespace Arcane
23{
24
25/*---------------------------------------------------------------------------*/
26/*---------------------------------------------------------------------------*/
27
29
30/*!
31 * \brief Output stream linked to a String.
32 */
33class ARCANE_UTILS_EXPORT OStringStream
34{
35 public:
36
37 OStringStream();
38 explicit OStringStream(Integer bufsize);
39 ~OStringStream();
40
41 OStringStream(const OStringStream& rhs) = delete;
42 void operator=(const OStringStream& rhs) = delete;
43
44 public:
45
46 std::ostream& operator()();
47 std::ostream& stream();
48 String str();
49 void reset();
50
51 private:
52
53 OStringStreamPrivate* m_p; //!< Implementation
54};
55
56/*---------------------------------------------------------------------------*/
57/*---------------------------------------------------------------------------*/
58
59} // namespace Arcane
60
61/*---------------------------------------------------------------------------*/
62/*---------------------------------------------------------------------------*/
63
64#endif
-- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature --
Int32 Integer
Type representing an integer.