Entree#

#include <Entree.h>

Class defining operators and methods for all reading operation in an input flow (file, keyboard communication buffer, etc.)

How to cite this class in this doc#

:ref:`Entree <class-entree>`
[Entree](#class-entree)

Detailed description#

Inherits from#

Inherited by#

List of Public Methods#

List of Protected Methods#

List of Private Methods#

Complete Member Function Documentation#

check_types
bool Entree::check_types() const
References
Referenced By
How to cite in this doc:
:ref:`bool Entree::check_types() const <public-bool-entree-check-types-const>`
[bool Entree::check_types() const](#public-bool-entree-check-types-const)
Entree
Entree::Entree()
How to cite in this doc:
:ref:`Entree::Entree() <public-entree-entree>`
[Entree::Entree()](#public-entree-entree)
Entree
Entree::Entree(const Entree &is)
References
How to cite in this doc:
:ref:`Entree::Entree(const Entree &is) <public-entree-entree-const-entree-ref-is>`
[Entree::Entree(const Entree &is)](#public-entree-entree-const-entree-ref-is)
Entree
Entree::Entree(istream &is)
How to cite in this doc:
:ref:`Entree::Entree(istream &is) <public-entree-entree-istream-ref-is>`
[Entree::Entree(istream &is)](#public-entree-entree-istream-ref-is)
fail
int Entree::fail()
Referenced By
How to cite in this doc:
:ref:`int Entree::fail() <public-int-entree-fail>`
[int Entree::fail()](#public-int-entree-fail)
get
int Entree::get(char *buf, std::streamsize bufsize)

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)

References
How to cite in this doc:
:ref:`int Entree::get(char *buf, std::streamsize bufsize) <public-int-entree-get-char-ptr-buf-std-streamsize-bufsize>`
[int Entree::get(char *buf, std::streamsize bufsize)](#public-int-entree-get-char-ptr-buf-std-streamsize-bufsize)
get
int Entree::get(double *ob, std::streamsize n)
How to cite in this doc:
:ref:`int Entree::get(double *ob, std::streamsize n) <public-int-entree-get-double-ptr-ob-std-streamsize-n>`
[int Entree::get(double *ob, std::streamsize n)](#public-int-entree-get-double-ptr-ob-std-streamsize-n)
get
int Entree::get(float *ob, std::streamsize n)
How to cite in this doc:
:ref:`int Entree::get(float *ob, std::streamsize n) <public-int-entree-get-float-ptr-ob-std-streamsize-n>`
[int Entree::get(float *ob, std::streamsize n)](#public-int-entree-get-float-ptr-ob-std-streamsize-n)
get
int Entree::get(long *ob, std::streamsize n)
How to cite in this doc:
:ref:`int Entree::get(long *ob, std::streamsize n) <public-int-entree-get-long-ptr-ob-std-streamsize-n>`
[int Entree::get(long *ob, std::streamsize n)](#public-int-entree-get-long-ptr-ob-std-streamsize-n)
get
int Entree::get(long long *ob, std::streamsize n)
How to cite in this doc:
:ref:`int Entree::get(long long *ob, std::streamsize n) <public-int-entree-get-long-long-ptr-ob-std-streamsize-n>`
[int Entree::get(long long *ob, std::streamsize n)](#public-int-entree-get-long-long-ptr-ob-std-streamsize-n)
get
int Entree::get(True_int *ob, std::streamsize n)
Referenced By
How to cite in this doc:
:ref:`int Entree::get(True_int *ob, std::streamsize n) <public-int-entree-get-true-int-ptr-ob-std-streamsize-n>`
[int Entree::get(True_int *ob, std::streamsize n)](#public-int-entree-get-true-int-ptr-ob-std-streamsize-n)
get_diffuse
bool Entree::get_diffuse()
References
How to cite in this doc:
:ref:`bool Entree::get_diffuse() <public-bool-entree-get-diffuse>`
[bool Entree::get_diffuse()](#public-bool-entree-get-diffuse)
get_error_action
Entree::Error_Action Entree::get_error_action()

renvoie error_action_ pour cette entree (permet de la modifier et de restaurer ensuite la valeur anterieure)

References
Referenced By
How to cite in this doc:
:ref:`Entree::Error_Action Entree::get_error_action() <public-entree-error-action-entree-get-error-action>`
[Entree::Error_Action Entree::get_error_action()](#public-entree-error-action-entree-get-error-action)
get_istream
istream & Entree::get_istream()
Referenced By
How to cite in this doc:
:ref:`istream & Entree::get_istream() <public-istream-ref-entree-get-istream>`
[istream & Entree::get_istream()](#public-istream-ref-entree-get-istream)
get_istream
const istream & Entree::get_istream() const
How to cite in this doc:
:ref:`const istream & Entree::get_istream() const <public-const-istream-ref-entree-get-istream-const>`
[const istream & Entree::get_istream() const](#public-const-istream-ref-entree-get-istream-const)
good
int Entree::good()
Referenced By
How to cite in this doc:
:ref:`int Entree::good() <public-int-entree-good>`
[int Entree::good()](#public-int-entree-good)
jumpOfLines
int Entree::jumpOfLines()
Referenced By
How to cite in this doc:
:ref:`int Entree::jumpOfLines() <public-int-entree-jumpoflines>`
[int Entree::jumpOfLines()](#public-int-entree-jumpoflines)
operator istream &
Entree::operator istream &()
References
How to cite in this doc:
:ref:`Entree::operator istream &() <public-entree-operator-istream-ref>`
[Entree::operator istream &()](#public-entree-operator-istream-ref)
operator =
Entree & Entree::operator=(Entree &is)
How to cite in this doc:
:ref:`Entree & Entree::operator=(Entree &is) <public-entree-ref-entree-operator-equal-entree-ref-is>`
[Entree & Entree::operator=(Entree &is)](#public-entree-ref-entree-operator-equal-entree-ref-is)
operator =
Entree & Entree::operator=(istream &is)
How to cite in this doc:
:ref:`Entree & Entree::operator=(istream &is) <public-entree-ref-entree-operator-equal-istream-ref-is>`
[Entree & Entree::operator=(istream &is)](#public-entree-ref-entree-operator-equal-istream-ref-is)
operator>>
Entree & Entree::operator>>(const TRUST_Ref< T > &)
How to cite in this doc:
:ref:`Entree & Entree::operator>>(const TRUST_Ref< T > &) <public-entree-ref-entree-operator-const-trust-ref-t-ref>`
[Entree & Entree::operator>>(const TRUST_Ref< T > &)](#public-entree-ref-entree-operator-const-trust-ref-t-ref)
operator>>
Entree & Entree::operator>>(const TRUST_Ref_Objet_U &)
How to cite in this doc:
:ref:`Entree & Entree::operator>>(const TRUST_Ref_Objet_U &) <public-entree-ref-entree-operator-const-trust-ref-objet-u-ref>`
[Entree & Entree::operator>>(const TRUST_Ref_Objet_U &)](#public-entree-ref-entree-operator-const-trust-ref-objet-u-ref)
operator>>
Entree & Entree::operator>>(double &ob)
How to cite in this doc:
:ref:`Entree & Entree::operator>>(double &ob) <public-entree-ref-entree-operator-double-ref-ob>`
[Entree & Entree::operator>>(double &ob)](#public-entree-ref-entree-operator-double-ref-ob)
operator>>
Entree & Entree::operator>>(Entree &(*f)(Entree &))
How to cite in this doc:
:ref:`Entree & Entree::operator>>(Entree &(*f)(Entree &)) <public-entree-ref-entree-operator-entree-ref-ptr-f-entree-ref>`
[Entree & Entree::operator>>(Entree &(*f)(Entree &))](#public-entree-ref-entree-operator-entree-ref-ptr-f-entree-ref)
operator>>
Entree & Entree::operator>>(float &ob)
How to cite in this doc:
:ref:`Entree & Entree::operator>>(float &ob) <public-entree-ref-entree-operator-float-ref-ob>`
[Entree & Entree::operator>>(float &ob)](#public-entree-ref-entree-operator-float-ref-ob)
operator>>
Entree & Entree::operator>>(ios &(*f)(ios &))
How to cite in this doc:
:ref:`Entree & Entree::operator>>(ios &(*f)(ios &)) <public-entree-ref-entree-operator-ios-ref-ptr-f-ios-ref>`
[Entree & Entree::operator>>(ios &(*f)(ios &))](#public-entree-ref-entree-operator-ios-ref-ptr-f-ios-ref)
operator>>
Entree & Entree::operator>>(istream &(*f)(istream &))
How to cite in this doc:
:ref:`Entree & Entree::operator>>(istream &(*f)(istream &)) <public-entree-ref-entree-operator-istream-ref-ptr-f-istream-ref>`
[Entree & Entree::operator>>(istream &(*f)(istream &))](#public-entree-ref-entree-operator-istream-ref-ptr-f-istream-ref)
operator>>
Entree & Entree::operator>>(long &ob)
How to cite in this doc:
:ref:`Entree & Entree::operator>>(long &ob) <public-entree-ref-entree-operator-long-ref-ob>`
[Entree & Entree::operator>>(long &ob)](#public-entree-ref-entree-operator-long-ref-ob)
operator>>
Entree & Entree::operator>>(long long &ob)
How to cite in this doc:
:ref:`Entree & Entree::operator>>(long long &ob) <public-entree-ref-entree-operator-long-long-ref-ob>`
[Entree & Entree::operator>>(long long &ob)](#public-entree-ref-entree-operator-long-long-ref-ob)
operator>>
Entree & Entree::operator>>(Objet_U &ob) final
References
How to cite in this doc:
:ref:`Entree & Entree::operator>>(Objet_U &ob) final <public-entree-ref-entree-operator-objet-u-ref-ob-final>`
[Entree & Entree::operator>>(Objet_U &ob) final](#public-entree-ref-entree-operator-objet-u-ref-ob-final)
operator>>
Entree & Entree::operator>>(True_int &ob)
How to cite in this doc:
:ref:`Entree & Entree::operator>>(True_int &ob) <public-entree-ref-entree-operator-true-int-ref-ob>`
[Entree & Entree::operator>>(True_int &ob)](#public-entree-ref-entree-operator-true-int-ref-ob)
putback
istream & Entree::putback(char ch)
References
How to cite in this doc:
:ref:`istream & Entree::putback(char ch) <public-istream-ref-entree-putback-char-ch>`
[istream & Entree::putback(char ch)](#public-istream-ref-entree-putback-char-ch)
set_bin
void Entree::set_bin(bool bin) override

Change le mode d’ecriture du fichier.

Cette methode peut etre appelee n’importe quand.

Reimplements:

References
Referenced By
How to cite in this doc:
:ref:`void Entree::set_bin(bool bin) override <public-void-entree-set-bin-bool-bin-override>`
[void Entree::set_bin(bool bin) override](#public-void-entree-set-bin-bool-bin-override)
set_check_types
void Entree::set_check_types(bool flag)

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 &)

References
Referenced By
How to cite in this doc:
:ref:`void Entree::set_check_types(bool flag) <public-void-entree-set-check-types-bool-flag>`
[void Entree::set_check_types(bool flag)](#public-void-entree-set-check-types-bool-flag)
set_diffuse
void Entree::set_diffuse(bool diffuse)

ToDo TMA : commenter.

References
How to cite in this doc:
:ref:`void Entree::set_diffuse(bool diffuse) <public-void-entree-set-diffuse-bool-diffuse>`
[void Entree::set_diffuse(bool diffuse)](#public-void-entree-set-diffuse-bool-diffuse)
set_error_action
void Entree::set_error_action(Error_Action)

Change le comportement en cas d’erreur de l’entree, voir error_handle_() et get_error_action()

References
Referenced By
How to cite in this doc:
:ref:`void Entree::set_error_action(Error_Action) <public-void-entree-set-error-action-error-action>`
[void Entree::set_error_action(Error_Action)](#public-void-entree-set-error-action-error-action)
set_istream
void Entree::set_istream(istream *is)
Referenced By
How to cite in this doc:
:ref:`void Entree::set_istream(istream *is) <public-void-entree-set-istream-istream-ptr-is>`
[void Entree::set_istream(istream *is)](#public-void-entree-set-istream-istream-ptr-is)
~Entree
Entree::~Entree()
How to cite in this doc:
:ref:`Entree::~Entree() <public-entree-dtor-entree>`
[Entree::~Entree()](#public-entree-dtor-entree)
error_handle
int Entree::error_handle(int fail_flag)
References
Referenced By
How to cite in this doc:
:ref:`int Entree::error_handle(int fail_flag) <protected-int-entree-error-handle-int-fail-flag>`
[int Entree::error_handle(int fail_flag)](#protected-int-entree-error-handle-int-fail-flag)
error_handle_
int Entree::error_handle_(int fail_flag)

Cette fonction est appellee par operateur>>, get, get_nom ouvrir, fermer, lire, etc.

References
Referenced By
How to cite in this doc:
:ref:`int Entree::error_handle_(int fail_flag) <protected-int-entree-error-handle-underscore-int-fail-flag>`
[int Entree::error_handle_(int fail_flag)](#protected-int-entree-error-handle-underscore-int-fail-flag)
get_template
template int Entree::get_template(_TYPE_ *ob, std::streamsize n)
How to cite in this doc:
:ref:`template int Entree::get_template(_TYPE_ *ob, std::streamsize n) <private-template-int-entree-get-template-type-ptr-ob-std-streamsize-n>`
[template int Entree::get_template(_TYPE_ *ob, std::streamsize n)](#private-template-int-entree-get-template-type-ptr-ob-std-streamsize-n)
operator_template
template Entree & Entree::operator_template(_TYPE_ &ob)
How to cite in this doc:
:ref:`template Entree & Entree::operator_template(_TYPE_ &ob) <private-template-entree-ref-entree-operator-template-type-ref-ob>`
[template Entree & Entree::operator_template(_TYPE_ &ob)](#private-template-entree-ref-entree-operator-template-type-ref-ob)

Attributes Documentation#

check_types_ (protected)
bool Entree::check_types_
diffuse_ (protected)
bool Entree::diffuse_
error_action_ (protected)
Error_Action Entree::error_action_
istream_ (private)
istream* Entree::istream_

Enums#

Entree::Error_Action#

Location: trust-code/src/Kernel/Utilitaires/Entree.h:92

How to cite in this doc:

:ref:`Entree::Error\_Action <enum-none-entree-error-action>`
[Entree::Error\_Action](#enum-none-entree-error-action)
  • ERROR_EXIT

  • ERROR_CONTINUE

  • ERROR_EXCEPTION