Arcane  4.1.12.0
Developer documentation
Loading...
Searching...
No Matches
ServiceProperty.h
Go to the documentation of this file.
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/* ServiceProperty.h (C) 2000-2022 */
9/* */
10/* Properties of a service. */
11/*---------------------------------------------------------------------------*/
12#ifndef ARCANE_SERVICEPROPERTY_H
13#define ARCANE_SERVICEPROPERTY_H
14/*---------------------------------------------------------------------------*/
15/*---------------------------------------------------------------------------*/
16
18
19/*---------------------------------------------------------------------------*/
20/*---------------------------------------------------------------------------*/
21
22namespace Arcane
23{
24
25/*---------------------------------------------------------------------------*/
26/*---------------------------------------------------------------------------*/
27
42
43/*---------------------------------------------------------------------------*/
44/*---------------------------------------------------------------------------*/
45
60{
61 ST_None = 0,
70 // NOTE: This value is not yet used.
73};
74
75/*---------------------------------------------------------------------------*/
76/*---------------------------------------------------------------------------*/
77
97class ARCANE_CORE_EXPORT ServiceProperty
98{
99 public:
100
105 ServiceProperty(const char* aname, int atype, eServiceFactoryProperties aproperties) ARCANE_NOEXCEPT
106 : m_name(aname)
107 , m_type(atype)
108 , m_properties(aproperties)
109 {
110 }
111
113 ServiceProperty(const char* aname, int atype) ARCANE_NOEXCEPT
114 : m_name(aname)
115 , m_type(atype)
116 , m_properties(SFP_None)
117 {
118 }
119
121 ServiceProperty(const char* aname, eServiceType atype) ARCANE_NOEXCEPT
122 : m_name(aname)
123 , m_type((int)atype)
124 , m_properties(SFP_None)
125 {
126 }
127
128 public:
129
131 const char* name() const { return m_name; }
132
134 int type() const { return m_type; }
135
137 eServiceFactoryProperties properties() const { return m_properties; }
138
139 private:
140
141 const char* m_name;
142 int m_type;
143 eServiceFactoryProperties m_properties;
144};
145
146/*---------------------------------------------------------------------------*/
147/*---------------------------------------------------------------------------*/
148
149} // namespace Arcane
150
151/*---------------------------------------------------------------------------*/
152/*---------------------------------------------------------------------------*/
153
154#endif
Arcane configuration file.
const char * name() const
Service name.
ServiceProperty(const char *aname, int atype, eServiceFactoryProperties aproperties) ARCANE_NOEXCEPT
Constructs an instance for a service named aname and of type atype with properties properties.
eServiceFactoryProperties properties() const
Service properties (combination of eServiceFactoryProperties).
ServiceProperty(const char *aname, int atype) ARCANE_NOEXCEPT
Constructs an instance for a service named aname and of type atype.
ServiceProperty(const char *aname, eServiceType atype) ARCANE_NOEXCEPT
Constructs an instance for a service named aname and of type atype.
int type() const
Service type (combination of eServiceType).
-- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature --
eServiceFactoryProperties
Properties for service factories.
@ SFP_Autoload
Indicates that the service loads automatically.
@ SFP_None
No specific property.
@ SFP_Singleton
Indicates that the service is a singleton.
eServiceType
Service type.
@ ST_Application
The service is used at the application level.
@ ST_CaseOption
The service is used at the dataset level.
@ ST_Session
The service is used at the session level.
@ ST_Mesh
The service is used with an explicitly specified mesh.
@ ST_SubDomain
The service is used at the subdomain level.