00001 #ifndef SCT_IS_OSTREAMIS_H
00002 #define SCT_IS_OSTREAMIS_H
00003
00004 #include <is/isinfo.h>
00005 #include "../OStream.h"
00006
00007 namespace Sct {
00008 namespace IS {
00009
00010 class OStreamIS : public virtual OStream {
00011 public:
00012 OStreamIS(ISostream& out) : out(out) {}
00013
00014 virtual OStream & operator<<(bool val) {
00015 out << val;
00016 return *this;
00017 }
00018
00019 virtual OStream & operator<<(char val) {
00020 out << val;
00021 return *this;
00022 }
00023
00024 virtual OStream & operator<<(unsigned char val) {
00025 out << val;
00026 return *this;
00027 }
00028
00029 virtual OStream & operator<<(short val) {
00030 out << val;
00031 return *this;
00032 }
00033
00034 virtual OStream & operator<<(unsigned short val) {
00035 out << val;
00036 return *this;
00037 }
00038
00039 virtual OStream & operator<<(int val) {
00040 out << val;
00041 return *this;
00042 }
00043
00044 virtual OStream & operator<<(unsigned int val) {
00045 out << val;
00046 return *this;
00047 }
00048
00049 virtual OStream & operator<<(long val) {
00050 out << val;
00051 return *this;
00052 }
00053
00054 virtual OStream & operator<<(unsigned long val) {
00055 out << val;
00056 return *this;
00057 }
00058
00059 virtual OStream & operator<<(double val) {
00060 out << val;
00061 return *this;
00062 }
00063
00064 virtual OStream & operator<<(float val) {
00065 out << val;
00066 return *this;
00067 }
00068
00069 virtual OStream & operator<<(const std::string & val) {
00070 out << val;
00071 return *this;
00072 }
00073
00074 virtual OStream & operator<<(OWLDate & val) {
00075 out << val;
00076 return *this;
00077 }
00078
00079 virtual OStream & operator<<(OWLTime & val) {
00080 out << val;
00081 return *this;
00082 }
00083
00084
00085 virtual OStream & operator<<(const char * str) {
00086 out << str;
00087 return *this;
00088 }
00089
00090 virtual OStream & operator<<(const unsigned char * str) {
00091 out << str;
00092 return *this;
00093 }
00094
00095
00096 virtual OStream & put(const bool* p, size_t size) {
00097 out.put(p, size);
00098 return *this;
00099 }
00100
00101 virtual OStream & put(const char* p, size_t size){
00102 out.put(p, size);
00103 return *this;
00104 }
00105
00106 virtual OStream & put(const unsigned char* p, size_t size) {
00107 out.put(p, size);
00108 return *this;
00109 }
00110
00111 virtual OStream & put(const short* p, size_t size) {
00112 out.put(p, size);
00113 return *this;
00114 }
00115
00116 virtual OStream & put(const unsigned short* p, size_t size) {
00117 out.put(p, size);
00118 return *this;
00119 }
00120
00121 virtual OStream & put(const int* p, size_t size) {
00122 out.put(p, size);
00123 return *this;
00124 }
00125
00126 virtual OStream & put(const unsigned int* p, size_t size) {
00127 out.put(p, size);
00128 return *this;
00129 }
00130
00131 virtual OStream & put(const long* p, size_t size) {
00132 out.put(p, size);
00133 return *this;
00134 }
00135
00136 virtual OStream & put(const unsigned long* p, size_t size) {
00137 out.put(p, size);
00138 return *this;
00139 }
00140
00141 virtual OStream & put(const float* p, size_t size) {
00142 out.put(p, size);
00143 return *this;
00144 }
00145
00146 virtual OStream & put(const double* p, size_t size) {
00147 out.put(p, size);
00148 return *this;
00149 }
00150
00151 virtual OStream & put(const std::string* p, size_t size) {
00152 out.put(p, size);
00153 return *this;
00154 }
00155
00156 virtual OStream & put(const OWLDate* p, size_t size) {
00157 out.put(p, size);
00158 return *this;
00159 }
00160
00161 virtual OStream & put(const OWLTime* p, size_t size) {
00162 out.put(p, size);
00163 return *this;
00164 }
00165
00166
00167 private:
00168 ISostream& out;
00169 };
00170 }
00171 }
00172 #endif //SCT_IS_OSTREAMIS_H