TrioCFD 1.9.9_beta
TrioCFD documentation
Loading...
Searching...
No Matches
Interprete.cpp
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#include <Interprete_bloc.h>
17#include <Interprete.h>
18
19Implemente_base(Interprete, "Interprete", Objet_U);
20// XD interprete objet_u interprete NO_BRACE Basic class for interpreting a data file. Interpretors allow some
21// XD_CONT operations to be carried out on objects.
22
23// XD fin interprete end INHERITS_BRACE Keyword which must complete the data file. The execution of the data file stops
24// XD_CONT when reaching this keyword.
25
27{
28 Cerr << "Error in Interprete::readOn" << finl;
29 exit();
30 return is;
31}
32
34{
35 Cerr << "Error in Interprete::printOn" << finl;
36 exit();
37 return os;
38}
39
40/*! @brief See Interprete_bloc::objet_global(). BM: the Interprete class is not the best place for this
41 *
42 * method, but we will address that later...
43 *
44 */
46{
48}
49
50/*! @brief Returns 1 if the object exists, 0 otherwise. See Interprete_bloc::objet_global_existant().
51 *
52 */
Class defining operators and methods for all reading operation in an input flow (file,...
Definition Entree.h:42
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...
static Objet_U & objet_global(const Nom &nom)
Searches for the requested object in the current Interprete_bloc (Interprete_bloc::interprete_courant...
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.
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
Base class for TRUST objects (Objet_U).
Definition Objet_U.h:68
virtual Entree & readOn(Entree &)
Reads an Objet_U from an input stream. Virtual method to override.
Definition Objet_U.cpp:289
Objet_U()
Default constructor: assigns a unique identifier to the object (object_id_) and registers the object ...
Definition Objet_U.cpp:54
virtual Sortie & printOn(Sortie &) const
Writes the object to an output stream. Virtual method to override.
Definition Objet_U.cpp:278
static void exit(int exit_code=-1)
Exit routine for TRUST within a Kokkos region.
Definition Process.cpp:466
Base class for output streams.
Definition Sortie.h:52