TrioCFD 1.9.9_beta
TrioCFD documentation
Loading...
Searching...
No Matches
Entree_complete Class Reference

This class behaves like EChaine until the end of the string is reached. More...

#include <Entree_complete.h>

Inheritance diagram for Entree_complete:
[legend]
Collaboration diagram for Entree_complete:
[legend]

Public Member Functions

 Entree_complete (const char *str, Entree &entree2)
 ~Entree_complete () override
Entreeoperator>> (int &ob) override
Entreeoperator>> (long &ob) override
Entreeoperator>> (long long &ob) override
Entreeoperator>> (float &ob) override
Entreeoperator>> (double &ob) override
int get (int *ob, std::streamsize n) override
int get (long *ob, std::streamsize n) override
int get (long long *ob, std::streamsize n) override
int get (float *ob, std::streamsize n) override
int get (double *ob, std::streamsize n) override
int get (char *buf, std::streamsize bufsize) override
 Reads a string from ostream_. bufsize is the size of the buffer allocated for ob (including.
int eof () override
int fail () override
int good () override
void set_bin (bool bin) override
 Changing the type of input is forbidden.
void set_error_action (Error_Action) override
 Sets the value on both source inputs. Warning, the value of entree2 is modified!
void set_check_types (bool flag) override
 Sets the flag on both source inputs. Warning, the flag of entree2 is modified!
Entreeoperator>> (Entree &(*f)(Entree &))
Entreeoperator>> (istream &(*f)(istream &))
Entreeoperator>> (ios &(*f)(ios &))
template<typename T>
Entreeoperator>> (const TRUST_Ref< T > &)
Entreeoperator>> (const TRUST_Ref_Objet_U &)
virtual Entreeoperator>> (std::string &ob)
virtual Entreeoperator>> (Objet_U &ob) final
Public Member Functions inherited from Entree
 Entree ()
 Entree (istream &is)
 Entree (const Entree &is)
virtual ~Entree ()
Entreeoperator= (istream &is)
Entreeoperator= (Entree &is)
virtual istream & get_istream ()
virtual const istream & get_istream () const
void set_istream (istream *is)
Entreeoperator>> (Entree &(*f)(Entree &))
Entreeoperator>> (istream &(*f)(istream &))
Entreeoperator>> (ios &(*f)(ios &))
template<typename T>
Entreeoperator>> (const TRUST_Ref< T > &)
Entreeoperator>> (const TRUST_Ref_Objet_U &)
virtual int jumpOfLines ()
bool check_types () const
Error_Action get_error_action ()
 Returns error_action_ for this input (allows modifying it and restoring the previous value afterwards).
 operator istream & ()
istream & putback (char ch)
bool get_diffuse ()
virtual void set_diffuse (bool diffuse)
 Sets the diffuse flag for this input stream.
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

Entreeget_input ()
Protected Member Functions inherited from Entree
int error_handle (int fail_flag)
virtual int error_handle_ (int fail_flag)
 This function is called by operator>>, 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

int num_entree_
int str_size_
EChaine chaine_str_
Entreeentree2_
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

Additional Inherited Members

Public Types inherited from Entree
enum  Error_Action { ERROR_EXIT , ERROR_CONTINUE , ERROR_EXCEPTION }

Detailed Description

This class behaves like EChaine until the end of the string is reached.

The remainder is read from entree2 passed as parameter. check_types() and error_action() are identical to those of entree2.

Definition at line 28 of file Entree_complete.h.

Constructor & Destructor Documentation

◆ Entree_complete()

Entree_complete::Entree_complete ( const char * str,
Entree & entree2 )

Definition at line 22 of file Entree_complete.cpp.

◆ ~Entree_complete()

Entree_complete::~Entree_complete ( )
override

Definition at line 38 of file Entree_complete.cpp.

Member Function Documentation

◆ eof()

int Entree_complete::eof ( )
overridevirtual

Reimplemented from Entree.

Definition at line 73 of file Entree_complete.cpp.

◆ fail()

int Entree_complete::fail ( )
overridevirtual

Reimplemented from Entree.

Definition at line 79 of file Entree_complete.cpp.

◆ get() [1/6]

int Entree_complete::get ( char * ob,
std::streamsize bufsize )
overridevirtual

Reads a string from ostream_. bufsize is the size of the buffer allocated for ob (including.

the final null character). The string always contains a null character even on failure. The method returns 1 if reading is successful, 0 otherwise. If the buffer is too small, we currently call exit(), but in the future we could test: if strlen(ob)==bufsize-1, then call lire() again until the end is reached. If the next lire() returns a string of length zero, it means the string length was exactly bufsize-1. Warning: the behaviour differs between binary and ASCII mode. In binary mode, the string is read until the next '\0'. In ASCII mode, the string is read until the next separator (space, tab, newline).

Reimplemented from Entree.

Definition at line 52 of file Entree_complete.cpp.

◆ get() [2/6]

int Entree_complete::get ( double * ob,
std::streamsize n )
overridevirtual

Reimplemented from Entree.

Definition at line 71 of file Entree_complete.cpp.

◆ get() [3/6]

int Entree_complete::get ( float * ob,
std::streamsize n )
overridevirtual

Reimplemented from Entree.

Definition at line 68 of file Entree_complete.cpp.

◆ get() [4/6]

int Entree_complete::get ( int * ob,
std::streamsize n )
overridevirtual

Reimplemented from Entree.

Definition at line 59 of file Entree_complete.cpp.

◆ get() [5/6]

int Entree_complete::get ( long * ob,
std::streamsize n )
overridevirtual

Reimplemented from Entree.

Definition at line 62 of file Entree_complete.cpp.

◆ get() [6/6]

int Entree_complete::get ( long long * ob,
std::streamsize n )
overridevirtual

Reimplemented from Entree.

Definition at line 65 of file Entree_complete.cpp.

◆ get_input()

Entree & Entree_complete::get_input ( )
protected

Definition at line 40 of file Entree_complete.cpp.

◆ good()

int Entree_complete::good ( )
overridevirtual

Reimplemented from Entree.

Definition at line 85 of file Entree_complete.cpp.

◆ operator>>() [1/12]

template<typename T>
Entree & Entree::operator>> ( const TRUST_Ref< T > & )
inline

Definition at line 65 of file Entree.h.

◆ operator>>() [2/12]

Entree & Entree::operator>> ( const TRUST_Ref_Objet_U & )
inline

Definition at line 67 of file Entree.h.

◆ operator>>() [3/12]

Entree & Entree_complete::operator>> ( double & ob)
overridevirtual

Reimplemented from Entree.

Definition at line 70 of file Entree_complete.cpp.

◆ operator>>() [4/12]

Entree & Entree::operator>> ( Entree &(* )(Entree &))

Definition at line 60 of file Entree.cpp.

◆ operator>>() [5/12]

Entree & Entree_complete::operator>> ( float & ob)
overridevirtual

Reimplemented from Entree.

Definition at line 67 of file Entree_complete.cpp.

◆ operator>>() [6/12]

Entree & Entree_complete::operator>> ( int & ob)
overridevirtual

Reimplemented from Entree.

Definition at line 58 of file Entree_complete.cpp.

◆ operator>>() [7/12]

Entree & Entree::operator>> ( ios &(* )(ios &))

Definition at line 62 of file Entree.cpp.

◆ operator>>() [8/12]

Entree & Entree::operator>> ( istream &(* )(istream &))

Definition at line 61 of file Entree.cpp.

◆ operator>>() [9/12]

Entree & Entree_complete::operator>> ( long & ob)
overridevirtual

Reimplemented from Entree.

Definition at line 61 of file Entree_complete.cpp.

◆ operator>>() [10/12]

Entree & Entree_complete::operator>> ( long long & ob)
overridevirtual

Reimplemented from Entree.

Definition at line 64 of file Entree_complete.cpp.

◆ operator>>() [11/12]

Entree & Entree::operator>> ( Objet_U & ob)
finalvirtual

Reimplemented from Entree.

Definition at line 77 of file Entree.cpp.

◆ operator>>() [12/12]

Entree & Entree::operator>> ( std::string & ob)
virtual

Reimplemented from Entree.

Definition at line 74 of file Entree.cpp.

◆ set_bin()

void Entree_complete::set_bin ( bool bin)
overridevirtual

Changing the type of input is forbidden.

exit()

Reimplemented from Entree.

Definition at line 96 of file Entree_complete.cpp.

◆ set_check_types()

void Entree_complete::set_check_types ( bool flag)
overridevirtual

Sets the flag on both source inputs. Warning, the flag of entree2 is modified!

See Entree::set_check_types()

Reimplemented from Entree.

Definition at line 110 of file Entree_complete.cpp.

◆ set_error_action()

void Entree_complete::set_error_action ( Error_Action action)
overridevirtual

Sets the value on both source inputs. Warning, the value of entree2 is modified!

See Entree::set_error_action()

Reimplemented from Entree.

Definition at line 122 of file Entree_complete.cpp.

Member Data Documentation

◆ chaine_str_

EChaine Entree_complete::chaine_str_
protected

Definition at line 62 of file Entree_complete.h.

◆ entree2_

Entree* Entree_complete::entree2_
protected

Definition at line 64 of file Entree_complete.h.

◆ num_entree_

int Entree_complete::num_entree_
protected

Definition at line 60 of file Entree_complete.h.

◆ str_size_

int Entree_complete::str_size_
protected

Definition at line 61 of file Entree_complete.h.


The documentation for this class was generated from the following files: