Arcane  4.1.12.0
User documentation
Loading...
Searching...
No Matches
IMeshWriter.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/* IMeshWriter.h (C) 2000-2025 */
9/* */
10/* Interface of a mesh writing service. */
11/*---------------------------------------------------------------------------*/
12#ifndef ARCANE_CORE_IMESHWRITER_H
13#define ARCANE_CORE_IMESHWRITER_H
14/*---------------------------------------------------------------------------*/
15/*---------------------------------------------------------------------------*/
16
18
19/*---------------------------------------------------------------------------*/
20/*---------------------------------------------------------------------------*/
21
22namespace Arcane
23{
24
25/*---------------------------------------------------------------------------*/
26/*---------------------------------------------------------------------------*/
27
28class IMesh;
29
30/*---------------------------------------------------------------------------*/
31/*---------------------------------------------------------------------------*/
32
33/*!
34 * \ingroup StandardService
35 * \brief Interface of a mesh writing service.
36 */
38{
39 public:
40
41 virtual ~IMeshWriter() {} //<! Releases resources
42
43 public:
44
45 //! Constructs the instance
46 virtual void build() = 0;
47
48 public:
49
50 /*!
51 * \brief Writes a mesh to a file.
52 *
53 * The mesh file path must be writable and
54 * the directory must already exist.
55 *
56 * \param mesh mesh to save
57 * \param file_name name of the mesh file.
58 *
59 * \retval true in case of error
60 * \retval false if everything is ok.
61 */
62 virtual bool writeMeshToFile(IMesh* mesh, const String& file_name) = 0;
63};
64
65/*---------------------------------------------------------------------------*/
66/*---------------------------------------------------------------------------*/
67
68} // namespace Arcane
69
70/*---------------------------------------------------------------------------*/
71/*---------------------------------------------------------------------------*/
72
73#endif
Declarations of Arcane's general types.
Interface of a mesh writing service.
Definition IMeshWriter.h:38
virtual void build()=0
Constructs the instance.
virtual bool writeMeshToFile(IMesh *mesh, const String &file_name)=0
Writes a mesh to a file.
-- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature --