TrioCFD 1.9.9_beta
TrioCFD documentation
Loading...
Searching...
No Matches
Interprete_bloc.h
1/****************************************************************************
2* Copyright (c) 2024, 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_bloc_included
17#define Interprete_bloc_included
18
19#include <Interprete.h>
20#include <Liste_bloc.h>
21#include <TRUST_Ref.h>
22#include <Noms.h>
23
24/*! @brief Interprets a block of instructions in the data set.
25 *
26 * See Interprete_bloc::interpreter()
27 *
28 *
29 */
31{
32 Declare_instanciable(Interprete_bloc);
33public:
34 // Indicates whether the block ends with a brace, an EOF, or the keyword FIN
36
37 Entree& interpreter_bloc(Entree& is, Bloc_Type bloc_type, int verifier_sans_interpreter);
38 Objet_U& ajouter(const Nom& nom, DerObjU& object_to_add);
39 Objet_U& objet_local(const Nom& nom);
40 int objet_local_existant(const Nom& nom);
41
43 static Objet_U& objet_global(const Nom& nom);
44 static int objet_global_existant(const Nom& nom);
45 inline const Noms& les_noms() const { return les_noms_ ; }
46
47protected:
48 // Names of objects read in the block:
50 // Reference to the current interpreter before this one was created
52};
53
54
55
56#endif
Class defining operators and methods for all reading operation in an input flow (file,...
Definition Entree.h:42
Interprets a block of instructions in the data set.
OBS_PTR(Interprete_bloc) pere_
Objet_U & ajouter(const Nom &nom, DerObjU &object_to_add)
Adds object ob to the interpreter's object list and names it with nom.
Entree & interpreter_bloc(Entree &is, Bloc_Type bloc_type, int verifier_sans_interpreter)
Interprets a block of instructions read from input is.
static int objet_global_existant(const Nom &nom)
Returns a flag indicating whether an object with this name exists in interprete_courant() or one of i...
Objet_U & objet_local(const Nom &nom)
Returns the Objet_U corresponding to nom contained in this interprete_bloc. If the object does not ex...
static Interprete_bloc & interprete_courant()
Returns the Interprete_bloc currently being read from the data set.
const Noms & les_noms() const
int objet_local_existant(const Nom &nom)
Returns a flag indicating whether an object with this name is registered in this interpreter (does no...
static Objet_U & objet_global(const Nom &nom)
Searches for the requested object in the current Interprete_bloc (Interprete_bloc::interprete_courant...
class Nom: a character string for naming TRUST objects.
Definition Nom.h:31
An array of character strings (VECT(Nom)).
Definition Noms.h:26
Base class for TRUST objects (Objet_U).
Definition Objet_U.h:68