Alien
1.3.0
Developer documentation
Loading...
Searching...
No Matches
UserFeatureMng.h
1
/*
2
* Copyright 2020 IFPEN-CEA
3
*
4
* Licensed under the Apache License, Version 2.0 (the "License");
5
* you may not use this file except in compliance with the License.
6
* You may obtain a copy of the License at
7
*
8
* http://www.apache.org/licenses/LICENSE-2.0
9
*
10
* Unless required by applicable law or agreed to in writing, software
11
* distributed under the License is distributed on an "AS IS" BASIS,
12
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
* See the License for the specific language governing permissions and
14
* limitations under the License.
15
*
16
* SPDX-License-Identifier: Apache-2.0
17
*/
18
19
#pragma once
20
21
#include <set>
22
23
#include <alien/utils/Precomp.h>
24
#include <arccore/base/String.h>
25
26
/*
27
* Outil à destination des développeurs de noyaux externes
28
*
29
* Outillage utilisé pour ajouter de l'information utilisateur
30
* à des objets Alien:
31
* Typiquement, IMatrixImpl et IMatrixImpl possède un tel gestionnaire
32
* Ainsi, si un utilisateur développant un noyau ou une api souhaite
33
* ajouter des informations spécifiques pour un traitement dans un
34
* solveur spécifique, c'est possible et Alien reste extensible
35
* sans toucher au coeur.
36
*
37
* Passage d'information de type String, ie faible robustesse, peu d'aide
38
* possible du noyau Alien
39
*
40
* !! Ne doit pas se substituer à la paramétrisation des solveurs d'Alien !!
41
*
42
* Si des features sont communes à plusieurs solveurs, il conviendra d'
43
* intégrer les features dans l'API pour amener la robustesse nécessaire
44
*
45
*/
46
47
/*---------------------------------------------------------------------------*/
48
/*---------------------------------------------------------------------------*/
49
50
namespace
Alien
51
{
52
53
/*---------------------------------------------------------------------------*/
54
/*---------------------------------------------------------------------------*/
55
56
class
UserFeatureMng
57
{
58
public
:
59
UserFeatureMng() {}
60
61
virtual
~UserFeatureMng() {}
62
63
bool
hasFeature(
const
String& feature)
const
64
{
65
return
m_features.find(feature) != m_features.end();
66
}
67
68
void
setFeature(
const
String& feature) { m_features.insert(feature); }
69
70
private
:
71
std::set<String> m_features;
72
};
73
74
/*---------------------------------------------------------------------------*/
75
/*---------------------------------------------------------------------------*/
76
77
}
// namespace Alien
78
79
/*---------------------------------------------------------------------------*/
80
/*---------------------------------------------------------------------------*/
Alien
-- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature --
Definition
BackEnd.h:17
core
alien
utils
UserFeatureMng.h
Generated on
for Alien by
1.16.1