TRUST 1.9.8
HPC thermohydraulic platform
Loading...
Searching...
No Matches
Champ_Generique_Predefini.h
1/****************************************************************************
2* Copyright (c) 2026, 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
17#ifndef Champ_Generique_Predefini_included
18#define Champ_Generique_Predefini_included
19
20#include <Champ_Gen_de_Champs_Gen.h>
21
22
23/*! @brief class Champ_Generique_Predefini
24 *
25 */
26
27// Champ destine a encapsuler un champ generique dont l'expression est predefinie
28// pour que les utilisateurs disposent de raccourci en terme de syntaxe
29//
30//// Syntaxe a respecter pour jdd
31//
32// "nom_champ" Predefini { Pb_champ "nom_pb" "nom_champ_a_creer" }
33//
34// "nom_champ" fixe par utilisateur sera le nom du champ generique construit (champ_)
35// "nom_champ_a_creer" type de champ generique a creer (ex : energie_cinetique)
36
37
39{
40
41 Declare_instanciable(Champ_Generique_Predefini);
42
43public:
44
45 void set_param(Param& param) const override;
46 int lire_motcle_non_standard(const Motcle&, Entree&) override;
47 void completer(const Postraitement_base& post) override;
48 const Champ_Generique_base& get_source(int i) const override;
49 const Noms get_property(const Motcle& query) const override;
50 const Champ_base& get_champ(OWN_PTR(Champ_base)& espace_stockage) const override;
51 const Champ_base& get_champ_without_evaluation(OWN_PTR(Champ_base)& espace_stockage) const override;
52 void nommer(const Nom&) override;
53 const Nom& get_nom_post() const override;
54 void nommer_source() override;
56
57protected:
58
59 Nom type_champ_; //Type de champ predefini a lire (ex : energie_cinetique)
61 OWN_PTR(Champ_Generique_base) champ_; //Le champ generique predefini par type_champ_
62
63};
64
65#endif
66
Classe de base des champs generiques ayant comme source d'autres champs generiques L'utilisation des ...
class Champ_Generique_Predefini
const Champ_base & get_champ(OWN_PTR(Champ_base)&espace_stockage) const override
void nommer(const Nom &) override
Donne un nom a l'Objet_U Methode virtuelle a surcharger.
OWN_PTR(Champ_Generique_base) champ_
const Nom & get_nom_post() const override
const Champ_base & get_champ_without_evaluation(OWN_PTR(Champ_base)&espace_stockage) const override
const Noms get_property(const Motcle &query) const override
Renvoie la propriete demandee.
int lire_motcle_non_standard(const Motcle &, Entree &) override
Lecture des parametres de type non simple d'un objet_U a partir d'un flot d'entree.
void completer(const Postraitement_base &post) override
const Champ_Generique_base & get_source(int i) const override
void set_param(Param &param) const override
class Champ_Generique_base
classe Champ_base Cette classe est la base de la hierarchie des champs.
Definition Champ_base.h:43
Une chaine de caractere (Nom) en majuscules.
Definition Motcle.h:26
class Nom Une chaine de caractere pour nommer les objets de TRUST
Definition Nom.h:31
Un tableau de chaine de caracteres (VECT(Nom)).
Definition Noms.h:26
friend class Entree
Definition Objet_U.h:76
Helper class to factorize the readOn method of Objet_U classes.
Definition Param.h:112
Classe de base pour l'ensemble des postraitements.