14#include "arcane/utils/ArcanePrecomp.h"
16#include "arcane/utils/List.h"
17#include "arcane/utils/VersionInfo.h"
18#include "arcane/utils/String.h"
19#include "arcane/utils/StringBuilder.h"
21#include "arcane/core/ServiceInfo.h"
23#include "arcane/core/StringDictionary.h"
24#include "arcane/core/IBase.h"
35class ServiceInfoPrivate
41 ~ServiceInfoPrivate();
48 m_factories.add(factory);
59 String m_case_options_file_name;
83: m_namespace_uri(arcaneNamespaceURI())
84, m_local_name(local_name)
86, m_valid_dimension(valid_dimension)
87, m_singleton_factory(nullptr)
89, m_factory_info(nullptr)
90, m_usage_type(ST_None)
92 m_default_tag_name = local_name.
clone();
93 m_default_tag_name = m_default_tag_name.
lower();
102 delete m_singleton_factory;
133 return m_p->m_namespace_uri;
142 return m_p->m_local_name;
151 return m_p->m_version;
160 if (n == 3 && (m_p->m_valid_dimension & Dim3))
162 if (n == 2 && (m_p->m_valid_dimension & Dim2))
164 if (n == 1 && (m_p->m_valid_dimension & Dim1))
175 if (m_p->m_implemented_interfaces.contains(name))
177 m_p->m_implemented_interfaces.add(name);
186 return m_p->m_implemented_interfaces;
195 return m_p->m_case_options_file_name;
202setCaseOptionsFileName(
const String& fn)
204 m_p->m_case_options_file_name = fn;
211addFactory(IServiceFactory2* factory)
213 m_p->addFactory(factory);
222 return m_p->factories();
231 return m_p->m_singleton_factory;
240 delete m_p->m_singleton_factory;
241 m_p->m_singleton_factory = f;
250 String v = m_p->m_tag_names.find(lang);
252 v = m_p->m_default_tag_name;
260setDefaultTagName(
const String& value)
262 m_p->m_default_tag_name = value;
271 m_p->m_tag_names.
add(lang, value);
280 return m_p->m_axl_version;
287setAxlVersion(
Real v)
const
289 m_p->m_axl_version = v;
298 return m_p->m_factory_info;
307 m_p->m_factory_info = sfi;
313 m_p->m_axl_content = file_content;
319 return m_p->m_axl_content;
328 return m_p->m_usage_type;
337 ARCANE_UNUSED(filename);
338 ARCANE_UNUSED(lineno);
345 si->setFactoryInfo(sfi);
347 si->m_p->m_usage_type = sp.
type();
355create(
const String& name,
int service_type)
358 return create(sp,
"none", 0);
This file contains the various service factories and macros for registering services.
Description and content of a file.
Information about a service factory.
Information about the manufacturing of a service or a module.
Information about a service.
ServiceInfo(const String &local_name, const VersionInfo &version, Integer valid_dimension)
Constructor.
const FileContent & axlContent() const override
Content of the AXL file associated with this service or module.
~ServiceInfo() override
Destructor.
String localName() const override
Local part of the service name.
String namespaceURI() const override
Service name namespace.
bool allowDimension(Integer n) const override
Indicates if the service is usable in dimension n.
VersionInfo version() const override
Service version.
StringCollection implementedInterfaces() const override
List of names of classes implemented by this service.
ServiceFactory2Collection factories() const override
List of service factories.
void addImplementedInterface(const String &name) override
Adds the name interface name to the interfaces implemented by this service.
ISingletonServiceFactory * singletonFactory() const override
Factory for singleton services (nullptr if not supported).
int usageType() const override
Indicates where the service can be used.
const String & caseOptionsFileName() const override
Name of the file containing the dataset (null if none).
IServiceFactoryInfo * factoryInfo() const override
Info on the factories available for this service.
Real axlVersion() const override
Version of the axl file describing this service.
String tagName(const String &lang) const override
Name of the service XML element for the language lang. If lang is null, returns the default name.
Implementation of a collection of elements in vector form.
Encapsulation of a pointer with a reference counter.
Service creation properties.
const char * name() const
Service name.
eServiceFactoryProperties properties() const
Service properties (combination of eServiceFactoryProperties).
int type() const
Service type (combination of eServiceType).
Unicode string dictionary.
void add(const String &key, const String &value)
Adds the (key, value) pair to the dictionary.
Unicode character string.
bool null() const
Returns true if the string is null.
String clone() const
Clones this string.
String lower() const
Transforms all characters in the string to lowercase.
const char * localstr() const
Returns the conversion of the instance into UTF-8 encoding.
1D data vector with value semantics (STL style).
Information about a version.
Internal types of Arcane.
Int32 Integer
Type representing an integer.
Collection< String > StringCollection
Collection of strings.
Collection< Internal::IServiceFactory2 * > ServiceFactory2Collection
Collection of service factories.
List< String > StringList
Unicode string list.
double Real
Type representing a real number.