Arcane  4.1.12.0
User documentation
Loading...
Searching...
No Matches
ISession.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/* ISession.h (C) 2000-2025 */
9/* */
10/* Interface of a session. */
11/*---------------------------------------------------------------------------*/
12#ifndef ARCANE_CORE_ISESSION_H
13#define ARCANE_CORE_ISESSION_H
14/*---------------------------------------------------------------------------*/
15/*---------------------------------------------------------------------------*/
16
18#include "arcane/core/IBase.h"
19
20/*---------------------------------------------------------------------------*/
21/*---------------------------------------------------------------------------*/
22
23namespace Arcane
24{
25
26/*---------------------------------------------------------------------------*/
27/*---------------------------------------------------------------------------*/
28
29/*!
30 * \brief Interface for a case execution session.
31 *
32 * A session manages the execution of a case in a process.
33 *
34 * This execution can be distributed across multiple sub-domains using multi-threading.
35 */
36class ARCANE_CORE_EXPORT ISession
37: public IBase
38{
39 public:
40
41 virtual ~ISession() = default; //!< Frees resources
42
43 public:
44
45 //! Application
46 virtual IApplication* application() const = 0;
47
48 /*!
49 \brief Creates a sub-domain with the parameters contained in \a sdbi.
50
51 The created sub-domain is added to the list of sub-domains of
52 the session. The document containing the dataset is opened
53 and its XML validity is checked, but the options of the services
54 and modules are not read.
55 */
57
58 //! Ends the session with the return code ret_val
59 virtual void endSession(int ret_val) = 0;
60
61 //! List of sub-domains of the session
63
64 //! Performs an abort
65 virtual void doAbort() = 0;
66
67 /*!
68 * \brief Checks if the dataset version \a version is valid.
69 *
70 * \retval true if the version is valid
71 * \retval false otherwise
72 */
73 virtual bool checkIsValidCaseVersion(const String& version) = 0;
74
75 //! Writes the execution information file
76 virtual void writeExecInfoFile() = 0;
77};
78
79/*---------------------------------------------------------------------------*/
80/*---------------------------------------------------------------------------*/
81
82} // namespace Arcane
83
84/*---------------------------------------------------------------------------*/
85/*---------------------------------------------------------------------------*/
86
87#endif
Declarations of Arcane's general types.
Application interface.
Interface of the base class for main arcane objects.
Definition IBase.h:32
Interface for a case execution session.
Definition ISession.h:38
virtual void writeExecInfoFile()=0
Writes the execution information file.
virtual bool checkIsValidCaseVersion(const String &version)=0
Checks if the dataset version version is valid.
virtual ISubDomain * createSubDomain(const SubDomainBuildInfo &sdbi)=0
Creates a sub-domain with the parameters contained in sdbi.
virtual ~ISession()=default
Frees resources.
virtual void doAbort()=0
Performs an abort.
virtual IApplication * application() const =0
Application.
virtual void endSession(int ret_val)=0
Ends the session with the return code ret_val.
virtual SubDomainCollection subDomains()=0
List of sub-domains of the session.
Interface of the subdomain manager.
Definition ISubDomain.h:75
Parameters necessary for building a subdomain.
-- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature --
Collection< ISubDomain * > SubDomainCollection
Collection of subdomains.