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