|
TrioCFD 1.9.8
TrioCFD documentation
|
: Classe outil utilisee exclusivement par Schema_Comm. More...
#include <InputCommBuffer.h>
Public Member Functions | |
| InputCommBuffer () | |
| ~InputCommBuffer () override | |
| char * | reserve_buffer (int bufsize) |
| void | create_stream_from_output_stream (OutputCommBuffer &) |
| void | create_stream () |
| void | clear () |
| Public Member Functions inherited from Entree | |
| 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 () |
Additional Inherited Members | |
| Public Types inherited from Entree | |
| enum | Error_Action { ERROR_EXIT , ERROR_CONTINUE , ERROR_EXCEPTION } |
| Protected Member Functions inherited from Entree | |
| 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 inherited from Entree | |
| 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 |
: Classe outil utilisee exclusivement par Schema_Comm.
C'est une classe derivee de Entree dont le stream est de type istringstream (les donnees lues par operator>> sont prises dans un buffer). On utilise la classe comme suit: (1) on reserve un buffer d'une certaine taille avec char * buf = input_comm_buffer.reserve_buffer(taille); (2) on remplit le buffer avec des donnees: for (i=0; i<taille; i++) buf[i] = .....; (3) on cree un stream a partir du buffer: input_comm_buffer.create_stream(); (4) on peut ensuite lire les donnees a travers l'operateur>>: input_comm_buffer >> x >> y >> chaine >> ... ; (5) quand on a fini de lire avec operateur>> on fait input_comm_buffer.clear(); et on peut refaire (1)
Definition at line 42 of file InputCommBuffer.h.
| InputCommBuffer::InputCommBuffer | ( | ) |
Definition at line 20 of file InputCommBuffer.cpp.
|
override |
Definition at line 34 of file InputCommBuffer.cpp.
| void InputCommBuffer::clear | ( | ) |
Definition at line 88 of file InputCommBuffer.cpp.
| void InputCommBuffer::create_stream | ( | ) |
Definition at line 56 of file InputCommBuffer.cpp.
| void InputCommBuffer::create_stream_from_output_stream | ( | OutputCommBuffer & | output_buf | ) |
Definition at line 71 of file InputCommBuffer.cpp.
| char * InputCommBuffer::reserve_buffer | ( | int | bufsize | ) |
Definition at line 43 of file InputCommBuffer.cpp.