|
TrioCFD 1.9.8
TrioCFD documentation
|
Class defining operators and methods for all reading operation in an input flow (file, keyboard communication buffer, etc.). More...
#include <Entree.h>
Public Types | |
| enum | Error_Action { ERROR_EXIT , ERROR_CONTINUE , ERROR_EXCEPTION } |
Public Member Functions | |
| Entree () | |
| Entree (istream &is) | |
| Entree (const Entree &is) | |
| virtual | ~Entree () |
| void | set_bin (bool bin) override |
| Change le mode d'ecriture du fichier. | |
| Entree & | operator= (istream &is) |
| Entree & | operator= (Entree &is) |
| virtual istream & | get_istream () |
| virtual const istream & | get_istream () const |
| void | set_istream (istream *is) |
| Entree & | operator>> (Entree &(*f)(Entree &)) |
| Entree & | operator>> (istream &(*f)(istream &)) |
| Entree & | operator>> (ios &(*f)(ios &)) |
| template<typename T> | |
| Entree & | operator>> (const TRUST_Ref< T > &) |
| Entree & | operator>> (const TRUST_Ref_Objet_U &) |
| virtual Entree & | operator>> (int &ob) |
| virtual Entree & | operator>> (long &ob) |
| virtual Entree & | operator>> (long long &ob) |
| virtual Entree & | operator>> (float &ob) |
| virtual Entree & | operator>> (double &ob) |
| virtual Entree & | operator>> (std::string &ob) |
| virtual Entree & | operator>> (Objet_U &ob) final |
| virtual int | get (int *ob, std::streamsize n) |
| virtual int | get (long *ob, std::streamsize n) |
| virtual int | get (long long *ob, std::streamsize n) |
| virtual int | get (float *ob, std::streamsize n) |
| virtual int | get (double *ob, std::streamsize n) |
| virtual int | get (char *buf, std::streamsize bufsize) |
| Lecture d'une chaine dans ostream_ bufsize est la taille du buffer alloue pour ob (y compris. | |
| virtual int | eof () |
| virtual int | jumpOfLines () |
| virtual int | fail () |
| virtual int | good () |
| virtual void | set_check_types (bool flag) |
| indique si le stream doit verifier les types des objets lus (ints et nombres flottants). | |
| bool | check_types () const |
| virtual void | set_error_action (Error_Action) |
| Change le comportement en cas d'erreur de l'entree, voir error_handle_() et get_error_action(). | |
| Error_Action | get_error_action () |
| renvoie error_action_ pour cette entree (permet de la modifier et de restaurer ensuite la valeur anterieure) | |
| operator istream & () | |
| istream & | putback (char ch) |
| bool | get_diffuse () |
| virtual void | set_diffuse (bool diffuse) |
| ToDo TMA : commenter. | |
| Public Member Functions inherited from AbstractIO | |
| bool | is_64b () const |
| virtual void | set_64b (bool is_64b) |
| bool | is_bin () |
| void | set_avoid_conversion (bool avoid) |
| bool | avoid_conversion () |
Protected Member Functions | |
| int | error_handle (int fail_flag) |
| virtual int | error_handle_ (int fail_flag) |
| Cette fonction est appellee par operateur>>, get, get_nom ouvrir, fermer, lire, etc. | |
| Protected Member Functions inherited from AbstractIO | |
| AbstractIO () | |
| virtual | ~AbstractIO () |
| template<typename _TYPE_> | |
| bool | must_convert () const |
| Whether to convert an int into a long when reading/writing out data. | |
Protected Attributes | |
| bool | check_types_ = false |
| Error_Action | error_action_ |
| bool | diffuse_ |
| Protected Attributes inherited from AbstractIO | |
| bool | bin_ = false |
| Is this a binary flux? | |
| bool | is_64b_ |
| Will we be reading/writing in 64b? (Init in ctor to avoid including arch.h probably). | |
| bool | avoid_conversion_ = false |
Class defining operators and methods for all reading operation in an input flow (file, keyboard communication buffer, etc.).
| enum Entree::Error_Action |
| Entree::Entree | ( | ) |
Definition at line 24 of file Entree.cpp.
| Entree::Entree | ( | istream & | is | ) |
Definition at line 31 of file Entree.cpp.
| Entree::Entree | ( | const Entree & | is | ) |
Definition at line 36 of file Entree.cpp.
|
virtual |
Definition at line 277 of file Entree.cpp.
|
virtual |
Reimplemented in Entree_complete, Entree_Fichier_base, and Lec_Diffuse_base.
Definition at line 256 of file Entree.cpp.
|
protectedvirtual |
Cette fonction est appellee par operateur>>, get, get_nom ouvrir, fermer, lire, etc.
.. en cas d'echec (lorsque fail() est mis) Elle renvoie 0 s'il y a eu une erreur (passer par error_handle() qui traite en inline le cas ou il n'y a pas d'erreur), et 1 s'il n'y a pas d'erreur. (par commodite de codage des methodes qui l'utilisent, on ecrira "return error_handle(fail());" Elle peut etre configuree pour
Definition at line 342 of file Entree.cpp.
|
virtual |
Reimplemented in Entree_complete, Entree_Fichier_base, and Lec_Diffuse_base.
Definition at line 263 of file Entree.cpp.
|
virtual |
Lecture d'une chaine dans ostream_ bufsize est la taille du buffer alloue pour ob (y compris.
le caractere 0 final). La chaine contient toujours un 0 meme en cas d'echec. La methode renvoie 1 si la lecture est bonne, 0 sinon. Si le buffer est trop petit, pour l'instant on fait exit() mais par la suite on pourra tester: si strlen(ob)==bufsize-1, alors refaire lire() jusqu'a arriver au bout. Si le lire() suivant renvoie une chaine de longueur nulle, cela signifie que la taille de la chaine etait exactement bufsize-1. Attention: le comportement est different en binaire et en ascii. En binaire, on lit la chaine jusqu'au prochain '\0'. En ascii, on lit la chaine jusqu'au prochain separateur (espace, tab, fin ligne)
Reimplemented in EChaineJDD, Entree_complete, and Lec_Diffuse_base.
Definition at line 103 of file Entree.cpp.
|
virtual |
Reimplemented in EChaineJDD, Entree_complete, and Lec_Diffuse_base.
Definition at line 219 of file Entree.cpp.
|
virtual |
Reimplemented in EChaineJDD, Entree_complete, and Lec_Diffuse_base.
Definition at line 225 of file Entree.cpp.
|
virtual |
Reimplemented in EChaineJDD, Entree_complete, and Lec_Diffuse_base.
Definition at line 222 of file Entree.cpp.
|
virtual |
Reimplemented in EChaineJDD, Entree_complete, and Lec_Diffuse_base.
Definition at line 228 of file Entree.cpp.
|
virtual |
Reimplemented in EChaineJDD, Entree_complete, and Lec_Diffuse_base.
Definition at line 231 of file Entree.cpp.
| Entree::Error_Action Entree::get_error_action | ( | ) |
renvoie error_action_ pour cette entree (permet de la modifier et de restaurer ensuite la valeur anterieure)
Definition at line 374 of file Entree.cpp.
|
virtual |
Reimplemented in LecFicDiffuse.
Definition at line 41 of file Entree.cpp.
|
virtual |
Reimplemented in LecFicDiffuse.
Definition at line 46 of file Entree.cpp.
|
virtual |
Reimplemented in Entree_complete, Entree_Fichier_base, and Lec_Diffuse_base.
Definition at line 270 of file Entree.cpp.
|
virtual |
Definition at line 238 of file Entree.cpp.
Definition at line 80 of file Entree.cpp.
| Entree & Entree::operator= | ( | istream & | is | ) |
Definition at line 72 of file Entree.cpp.
|
inline |
|
virtual |
Reimplemented in EChaineJDD, Entree_complete, and Lec_Diffuse_base.
Definition at line 216 of file Entree.cpp.
Definition at line 55 of file Entree.cpp.
|
virtual |
Reimplemented in EChaineJDD, Entree_complete, and Lec_Diffuse_base.
Definition at line 224 of file Entree.cpp.
|
virtual |
Reimplemented in EChaineJDD, Entree_complete, and Lec_Diffuse_base.
Definition at line 221 of file Entree.cpp.
| Entree & Entree::operator>> | ( | ios &(* | f )(ios &) | ) |
Definition at line 65 of file Entree.cpp.
| Entree & Entree::operator>> | ( | istream &(* | f )(istream &) | ) |
Definition at line 60 of file Entree.cpp.
|
virtual |
Reimplemented in EChaineJDD, Entree_complete, and Lec_Diffuse_base.
Definition at line 227 of file Entree.cpp.
|
virtual |
Reimplemented in EChaineJDD, Entree_complete, and Lec_Diffuse_base.
Definition at line 230 of file Entree.cpp.
Reimplemented in EChaineJDD, Entree_complete, and Lec_Diffuse_base.
Definition at line 236 of file Entree.cpp.
|
virtual |
Reimplemented in EChaineJDD, Entree_complete, and Lec_Diffuse_base.
Definition at line 234 of file Entree.cpp.
|
overridevirtual |
Change le mode d'ecriture du fichier.
Cette methode peut etre appelee n'importe quand.
Reimplemented from AbstractIO.
Reimplemented in Entree_Brute, Entree_complete, and Lec_Diffuse_base.
Definition at line 291 of file Entree.cpp.
|
virtual |
indique si le stream doit verifier les types des objets lus (ints et nombres flottants).
Exemple : l'entree contient 123.456 123.456 int i; check_types(0); is >> i; // i contient 123 check_types(1); is >> i; // Erreur : on lit la chaine 123.456 et on essaye de la convertir en int Voir operator>>(int &)
Reimplemented in Entree_complete, and Lec_Diffuse_base.
Definition at line 313 of file Entree.cpp.
|
virtual |
|
virtual |
Change le comportement en cas d'erreur de l'entree, voir error_handle_() et get_error_action().
Reimplemented in Entree_complete.
Definition at line 382 of file Entree.cpp.
| void Entree::set_istream | ( | istream * | is | ) |
Definition at line 50 of file Entree.cpp.
|
protected |