|
-
- #ifndef iostream_h
- #define iostream_h
-
- #include "istream.h"
- #include "ostream.h"
-
- inline istream& ws(istream& is) {
- is.skipWhite();
- return is;
- }
-
- inline ostream& endl(ostream& os) {
- os.put('\n');
- #if ENDL_CALLS_FLUSH
- os.flush();
- #endif
- return os;
- }
-
- inline ostream& flush(ostream& os) {
- os.flush();
- return os;
- }
-
- struct setfill {
-
- char c;
-
-
- explicit setfill(char arg) : c(arg) {}
- };
-
- inline ostream &operator<< (ostream &os, const setfill &arg) {
- os.fill(arg.c);
- return os;
- }
-
- inline istream &operator>>(istream &obj, const setfill &arg) {
- obj.fill(arg.c);
- return obj;
- }
-
-
- struct setprecision {
-
- unsigned int p;
-
-
- explicit setprecision(unsigned int arg) : p(arg) {}
- };
-
- inline ostream &operator<< (ostream &os, const setprecision &arg) {
- os.precision(arg.p);
- return os;
- }
-
- inline istream &operator>>(istream &is, const setprecision &arg) {
- is.precision(arg.p);
- return is;
- }
-
-
- struct setw {
-
- unsigned w;
-
-
- explicit setw(unsigned arg) : w(arg) {}
- };
-
- inline ostream &operator<< (ostream &os, const setw &arg) {
- os.width(arg.w);
- return os;
- }
-
- inline istream &operator>>(istream &is, const setw &arg) {
- is.width(arg.w);
- return is;
- }
-
-
- class iostream : public istream, public ostream {
- };
- #endif
|