TRUST 1.9.8
HPC thermohydraulic platform
Loading...
Searching...
No Matches
Interprete.h
1/****************************************************************************
2* Copyright (c) 2025, CEA
3* All rights reserved.
4*
5* Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
6* 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
7* 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
8* 3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
9*
10* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
11* IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
12* OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
13*
14*****************************************************************************/
15
16#ifndef Interprete_included
17#define Interprete_included
18
19#include <Objet_U.h>
20
21class Interprete;
22
23/*! @brief Classe de base des objets "interprete".
24 *
25 * Ces objets definissent des actions a realiser lorsqu'on les
26 * rencontre dans le jeu de donnees. L'action est declenchee par
27 * un appel a la methode interpreter().
28 * L'interprete peut ensuite lire des parametres supplementaires
29 * dans l'entree pour realiser sa tache. En general, l'interprete
30 * agit sur d'autres objets declares dans le jeu de donnees. Il peut
31 * y acceder par les methodes objet() et objet_existant().
32 * Voir par exemple la classe Lire ou la classe Associer
33 *
34 * @sa Interprete_bloc qui lit une serie d'instructions
35 * a executer dans le jeu de donnees.
36 */
37class Interprete : public Objet_U
38{
39 Declare_base(Interprete);
40public:
41 virtual Entree& interpreter(Entree&) = 0 ;
42
43 static Objet_U& objet(const Nom&);
44 static int objet_existant(const Nom&);
45};
46#endif
Classe de base des objets "interprete".
Definition Interprete.h:38
static Objet_U & objet(const Nom &)
Voir Interprete_bloc::objet_global() BM: la classe Interprete n'est pas le meilleur endroit pour cett...
virtual Entree & interpreter(Entree &)=0
static int objet_existant(const Nom &)
Renvoie 1 si l'objet existe, 0 sinon voir Interprete_bloc::objet_global_existant().
class Nom Une chaine de caractere pour nommer les objets de TRUST
Definition Nom.h:31
friend class Entree
Definition Objet_U.h:76
Objet_U()
Constructeur par defaut : attribue un numero d'identifiant unique a l'objet (object_id_),...
Definition Objet_U.cpp:55