Arcane
4.1.12.0
Developer documentation
Loading...
Searching...
No Matches
ServiceBuildInfo.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
/* ServiceBuildInfo.cc (C) 2000-2020 */
9
/* */
10
/* Service information. */
11
/*---------------------------------------------------------------------------*/
12
/*---------------------------------------------------------------------------*/
13
14
#include "arcane/utils/ArcanePrecomp.h"
15
16
#include "arcane/core/ServiceBuildInfo.h"
17
#include "arcane/core/ISession.h"
18
#include "arcane/core/ISubDomain.h"
19
#include "arcane/core/IApplication.h"
20
#include "arcane/core/IMesh.h"
21
#include "arcane/core/ICaseOptions.h"
22
23
/*---------------------------------------------------------------------------*/
24
/*---------------------------------------------------------------------------*/
25
26
namespace
Arcane
27
{
28
29
/*---------------------------------------------------------------------------*/
30
/*---------------------------------------------------------------------------*/
31
32
ServiceBuildInfoBase::
33
ServiceBuildInfoBase
(
IApplication
* app)
34
: m_application(app)
35
, m_service_parent(app)
36
, m_creation_type(
ST_Application
)
37
{
38
}
39
40
/*---------------------------------------------------------------------------*/
41
/*---------------------------------------------------------------------------*/
42
43
ServiceBuildInfoBase::
44
ServiceBuildInfoBase
(
ISession
*
session
)
45
: m_session(
session
)
46
, m_service_parent(
session
)
47
, m_creation_type(
ST_Session
)
48
{
49
}
50
51
/*---------------------------------------------------------------------------*/
52
/*---------------------------------------------------------------------------*/
53
54
ServiceBuildInfoBase::
55
ServiceBuildInfoBase
(
IMesh
*
mesh
)
56
:
ServiceBuildInfoBase
(
mesh
->
subDomain
(),
mesh
->handle())
57
{
58
}
59
60
/*---------------------------------------------------------------------------*/
61
/*---------------------------------------------------------------------------*/
62
63
ServiceBuildInfoBase::
64
ServiceBuildInfoBase
(
ISubDomain
* sd,
IMesh
*
mesh
)
65
:
ServiceBuildInfoBase
(sd,
mesh
->handle())
66
{
67
}
68
69
/*---------------------------------------------------------------------------*/
70
/*---------------------------------------------------------------------------*/
71
72
ServiceBuildInfoBase::
73
ServiceBuildInfoBase
(
ISubDomain
* sd,
const
MeshHandle
& mesh_handle)
74
: m_sub_domain(sd)
75
, m_mesh_handle(mesh_handle)
76
, m_service_parent(m_sub_domain)
77
, m_creation_type(
ST_SubDomain
)
78
{
79
}
80
81
/*---------------------------------------------------------------------------*/
82
/*---------------------------------------------------------------------------*/
83
84
ServiceBuildInfoBase::
85
ServiceBuildInfoBase
(
const
MeshHandle
& mesh_handle)
86
:
ServiceBuildInfoBase
(mesh_handle.
subDomain
(), mesh_handle)
87
{
88
}
89
90
/*---------------------------------------------------------------------------*/
91
/*---------------------------------------------------------------------------*/
92
93
ServiceBuildInfoBase::
94
ServiceBuildInfoBase
(
ISubDomain
* sd)
95
: m_sub_domain(sd)
96
, m_mesh_handle(sd->defaultMeshHandle())
97
, m_service_parent(sd)
98
, m_creation_type(
ST_SubDomain
)
99
{
100
}
101
102
/*---------------------------------------------------------------------------*/
103
/*---------------------------------------------------------------------------*/
104
105
ServiceBuildInfoBase::
106
ServiceBuildInfoBase
(
ISubDomain
* sd,
ICaseOptions
* co)
107
: m_sub_domain(sd)
108
, m_mesh_handle(co->
meshHandle
())
109
, m_case_options(co)
110
, m_service_parent(m_sub_domain)
111
, m_creation_type(
ST_CaseOption
)
112
{
113
}
114
115
/*---------------------------------------------------------------------------*/
116
/*---------------------------------------------------------------------------*/
117
118
ServiceBuildInfoBase::
119
ServiceBuildInfoBase
(
ICaseOptions
* co)
120
:
ServiceBuildInfoBase
(co->
subDomain
(), co)
121
{
122
}
123
124
/*---------------------------------------------------------------------------*/
125
/*---------------------------------------------------------------------------*/
126
127
IMesh
*
ServiceBuildInfoBase::
128
mesh
()
const
129
{
130
return
m_mesh_handle.mesh();
131
}
132
133
/*---------------------------------------------------------------------------*/
134
/*---------------------------------------------------------------------------*/
135
136
/*---------------------------------------------------------------------------*/
137
/*---------------------------------------------------------------------------*/
138
139
ServiceBuildInfo::
140
ServiceBuildInfo(
IServiceInfo
* service_info,
const
ServiceBuildInfoBase
& sbib)
141
:
ServiceBuildInfoBase
(sbib)
142
, m_service_info(service_info)
143
{
144
}
145
146
/*---------------------------------------------------------------------------*/
147
/*---------------------------------------------------------------------------*/
148
149
}
// End namespace Arcane
150
151
/*---------------------------------------------------------------------------*/
152
/*---------------------------------------------------------------------------*/
Arcane::IApplication
Application interface.
Definition
IApplication.h:58
Arcane::ICaseOptions
Interface for a list of data set options.
Definition
ICaseOptions.h:36
Arcane::IMesh
Definition
IMesh.h:60
Arcane::IServiceInfo
Interface for service or module information.
Definition
IServiceInfo.h:33
Arcane::ISession
Interface for a case execution session.
Definition
ISession.h:38
Arcane::ISubDomain
Interface of the subdomain manager.
Definition
ISubDomain.h:75
Arcane::MeshHandle
Handle on a mesh.
Definition
MeshHandle.h:48
Arcane::ServiceBuildInfoBase
Information for creating a service.
Definition
ServiceBuildInfo.h:43
Arcane::ServiceBuildInfoBase::mesh
IMesh * mesh() const
Access to the associated IMesh.
Definition
ServiceBuildInfo.cc:128
Arcane::ServiceBuildInfoBase::ServiceBuildInfoBase
ServiceBuildInfoBase(IApplication *app)
Service associated with an application IApplication.
Definition
ServiceBuildInfo.cc:33
Arcane::ServiceBuildInfoBase::meshHandle
const MeshHandle & meshHandle() const
Access to the associated mesh handle MeshHandle.
Definition
ServiceBuildInfo.h:161
Arcane::ServiceBuildInfoBase::session
ISession * session() const
Access to the associated ISession.
Definition
ServiceBuildInfo.h:140
Arcane::ServiceBuildInfoBase::subDomain
ISubDomain * subDomain() const
Access to the associated ISubDomain.
Definition
ServiceBuildInfo.h:147
Arcane
-- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature --
Definition
arcane/src/arcane/accelerator/AcceleratorGlobal.h:37
Arcane::ST_Application
@ ST_Application
The service is used at the application level.
Definition
ServiceProperty.h:63
Arcane::ST_CaseOption
@ ST_CaseOption
The service is used at the dataset level.
Definition
ServiceProperty.h:69
Arcane::ST_Session
@ ST_Session
The service is used at the session level.
Definition
ServiceProperty.h:65
Arcane::ST_SubDomain
@ ST_SubDomain
The service is used at the subdomain level.
Definition
ServiceProperty.h:67
arcane
core
ServiceBuildInfo.cc
Generated on
for Arcane by
1.16.1