TRUST 1.9.8
HPC thermohydraulic platform
Loading...
Searching...
No Matches
Sortie_Nulle.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#ifndef Sortie_Nulle_included
17#define Sortie_Nulle_included
18
19#include <Sortie.h>
20
21/*! @brief Classe derivee de Sortie qui ne sort les donnees nulle part (c'est une poubelle) Classe utilisee dans le Journal() si celui-ci est desactive.
22 *
23 * Le pointeur ostream_ est nul.
24 *
25 */
26class Sortie_Nulle : public Sortie
27{
28public:
29 Sortie& flush() override { return *this; }
30 void setf(IOS_FORMAT) override { }
31 void precision(int) override { }
32
33 Sortie& operator <<(const Separateur& ob) override { return *this; }
34 Sortie& operator <<(const Objet_U& ob) override { return *this; }
35 Sortie& operator <<(const std::string& str) override { return *this; }
36 Sortie& operator <<(const int ob) override { return *this; }
37 Sortie& operator <<(const unsigned ob) override { return *this; };
38 Sortie& operator <<(const float ob) override { return *this; }
39 Sortie& operator <<(const double ob) override { return *this; }
40 Sortie& operator <<(const char* ob) override { return *this; }
41 Sortie& operator <<(const long ob) override { return *this; }
42 Sortie& operator <<(const long long ob) override { return *this; }
43 Sortie& operator <<(const unsigned long ob) override { return *this; }
44
45 int put(const unsigned* ob, std::streamsize n, std::streamsize pas=1) override { return 1; }
46 int put(const int* ob, std::streamsize n, std::streamsize pas=1) override { return 1; }
47 int put(const long* ob, std::streamsize n, std::streamsize pas=1) override { return 1; }
48 int put(const long long* ob, std::streamsize n, std::streamsize pas=1) override { return 1; }
49 int put(const float* ob, std::streamsize n, std::streamsize pas=1) override { return 1; }
50 int put(const double* ob, std::streamsize n, std::streamsize pas=1) override { return 1; }
51};
52
53#endif /* Sortie_Nulle_included */
classe Objet_U Cette classe est la classe de base des Objets de TRUST
Definition Objet_U.h:73
Separateur pour les fichiers.
Definition Separateur.h:30
Classe derivee de Sortie qui ne sort les donnees nulle part (c'est une poubelle) Classe utilisee dans...
int put(const double *ob, std::streamsize n, std::streamsize pas=1) override
void setf(IOS_FORMAT) override
void precision(int) override
int put(const unsigned *ob, std::streamsize n, std::streamsize pas=1) override
int put(const float *ob, std::streamsize n, std::streamsize pas=1) override
int put(const long long *ob, std::streamsize n, std::streamsize pas=1) override
Sortie & operator<<(const Separateur &ob) override
int put(const int *ob, std::streamsize n, std::streamsize pas=1) override
Sortie & flush() override
int put(const long *ob, std::streamsize n, std::streamsize pas=1) override
Sortie()
Definition Sortie.cpp:26