TrioCFD 1.9.9_beta
TrioCFD documentation
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 Base class for "interpreter" objects.
24 *
25 * These objects define actions to be performed when they are
26 * encountered in the data set. The action is triggered by
27 * a call to the interpreter() method.
28 * The interpreter can then read additional parameters
29 * from the input to perform its task. In general, the interpreter
30 * acts on other objects declared in the data set. It can
31 * access them through the objet() and objet_existant() methods.
32 * See for example the Lire or Associer class.
33 *
34 * @sa Interprete_bloc which reads a series of instructions
35 * to execute in the data set.
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
Base class for "interpreter" objects.
Definition Interprete.h:38
static Objet_U & objet(const Nom &)
See Interprete_bloc::objet_global(). BM: the Interprete class is not the best place for this.
virtual Entree & interpreter(Entree &)=0
static int objet_existant(const Nom &)
Returns 1 if the object exists, 0 otherwise. See Interprete_bloc::objet_global_existant().
class Nom: a character string for naming TRUST objects.
Definition Nom.h:31
friend class Entree
Definition Objet_U.h:71
Objet_U()
Default constructor: assigns a unique identifier to the object (object_id_) and registers the object ...
Definition Objet_U.cpp:54