Arcane  v3.14.10.0
Documentation développeur
Chargement...
Recherche...
Aucune correspondance
VariableComputeFunction.h
1// -*- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature -*-
2//-----------------------------------------------------------------------------
3// Copyright 2000-2022 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/* VariableComputeFunction.h (C) 2000-2013 */
9/* */
10/* Classe fonctor de recalcul d'une variable. */
11/*---------------------------------------------------------------------------*/
12#ifndef ARCANE_VARIABLECOMPUTEFUNCTION_H
13#define ARCANE_VARIABLECOMPUTEFUNCTION_H
14/*---------------------------------------------------------------------------*/
15/*---------------------------------------------------------------------------*/
16
17#include "arcane/utils/Functor.h"
18#include "arcane/utils/TraceInfo.h"
19
20#include "arcane/IVariableComputeFunction.h"
21
22/*---------------------------------------------------------------------------*/
23/*---------------------------------------------------------------------------*/
24
25ARCANE_BEGIN_NAMESPACE
26
27/*---------------------------------------------------------------------------*/
28/*---------------------------------------------------------------------------*/
29
30/*---------------------------------------------------------------------------*/
31/*---------------------------------------------------------------------------*/
32
33/*---------------------------------------------------------------------------*/
34/*---------------------------------------------------------------------------*/
40{
41 public:
42
43 template<typename ClassType>
45 : m_functor(new FunctorT<ClassType>(instance,func))
46 {
47 }
48 template<typename ClassType>
50 : m_functor(new FunctorT<ClassType>(instance,func)), m_trace_info(tinfo)
51 {
52 }
53
56 {
57 delete m_functor;
58 }
59
60 public:
61
63 virtual void execute()
64 {
65 m_functor->executeFunctor();
66 }
67
68 virtual const TraceInfo& traceInfo() const
69 {
70 return m_trace_info;
71 }
72
73 private:
74
75 IFunctor* m_functor;
76 TraceInfo m_trace_info;
77};
78
79/*---------------------------------------------------------------------------*/
80/*---------------------------------------------------------------------------*/
81
82ARCANE_END_NAMESPACE
83
84/*---------------------------------------------------------------------------*/
85/*---------------------------------------------------------------------------*/
86
87#endif
88
Interface de la classe fonctor de recalcul d'une variable.
Lecteur des fichiers de maillage via la bibliothèque LIMA.
Definition Lima.cc:120
Interface de la classe fonctor de recalcul d'une variable.
virtual const TraceInfo & traceInfo() const
Informations de trace de la définition de la fonction de calcul.
virtual void execute()
Exécute la fonction de calcul.
virtual ~VariableComputeFunction()
Libère les ressources.