DCL 4.0
Loading...
Searching...
No Matches
OutputStream.h File Reference
#include <stdarg.h>
#include <dcl/Object.h>
#include <dcl/Exception.h>
#include <dcl/String.h>

Go to the source code of this file.

Classes

class  OutputStream
struct  __endl

Macros

#define __DCL_OUTPUT_STREAM_H__   20071009
#define endl   endl()

Functions

DCLCAPI OutputStreamoperator<< (OutputStream &out, const __endl &) __DCL_THROWS1(IOException *)
DCLCAPI OutputStreamoperator<< (OutputStream &_out, const char *_psz) __DCL_THROWS1(IOException *)
DCLCAPI OutputStreamoperator<< (OutputStream &_out, const ByteString &_str) __DCL_THROWS1(IOException *)
DCLCAPI OutputStreamoperator<< (OutputStream &_out, const ByteStringBuilder &_sb) __DCL_THROWS1(IOException *)
DCLCAPI OutputStreamoperator<< (OutputStream &_out, char _ch) __DCL_THROWS1(IOException *)
DCLCAPI OutputStreamoperator<< (OutputStream &_out, unsigned char _ch) __DCL_THROWS1(IOException *)
DCLCAPI OutputStreamoperator<< (OutputStream &_out, short int _n) __DCL_THROWS1(IOException *)
DCLCAPI OutputStreamoperator<< (OutputStream &_out, unsigned short int _n) __DCL_THROWS1(IOException *)
DCLCAPI OutputStreamoperator<< (OutputStream &_out, int _n) __DCL_THROWS1(IOException *)
DCLCAPI OutputStreamoperator<< (OutputStream &_out, unsigned int _n) __DCL_THROWS1(IOException *)
DCLCAPI OutputStreamoperator<< (OutputStream &_out, long _n) __DCL_THROWS1(IOException *)
DCLCAPI OutputStreamoperator<< (OutputStream &_out, unsigned long _n) __DCL_THROWS1(IOException *)
DCLCAPI OutputStreamoperator<< (OutputStream &_out, long long _n) __DCL_THROWS1(IOException *)
DCLCAPI OutputStreamoperator<< (OutputStream &_out, unsigned long long _n) __DCL_THROWS1(IOException *)
DCLCAPI OutputStreamoperator<< (OutputStream &_out, float _n) __DCL_THROWS1(IOException *)
DCLCAPI OutputStreamoperator<< (OutputStream &_out, double _n) __DCL_THROWS1(IOException *)
DCLCAPI OutputStreamoperator<< (OutputStream &_out, long double _n) __DCL_THROWS1(IOException *)

Macro Definition Documentation

◆ __DCL_OUTPUT_STREAM_H__

#define __DCL_OUTPUT_STREAM_H__   20071009

Definition at line 2 of file OutputStream.h.

◆ endl

DCLCAPI const struct __endl endl   endl()

Definition at line 91 of file OutputStream.h.

Function Documentation

◆ operator<<() [1/17]

DCLCAPI OutputStream & operator<< ( OutputStream & _out,
char _ch )
inline

Definition at line 122 of file OutputStream.h.

124{
125 return _out.write(&_ch, sizeof(char));
126}

◆ operator<<() [2/17]

DCLCAPI OutputStream & operator<< ( OutputStream & _out,
const ByteString & _str )
inline

Definition at line 110 of file OutputStream.h.

112{
113 return _out.write(_str.data(), _str.length());
114}

◆ operator<<() [3/17]

DCLCAPI OutputStream & operator<< ( OutputStream & _out,
const ByteStringBuilder & _sb )
inline

Definition at line 116 of file OutputStream.h.

118{
119 return _out.write(_sb.data(), _sb.length());
120}

◆ operator<<() [4/17]

DCLCAPI OutputStream & operator<< ( OutputStream & _out,
const char * _psz )
inline

Definition at line 103 of file OutputStream.h.

105{
106 __DCL_ASSERT(_psz != NULL);
107 return _out.write(_psz, ByteString::length(_psz));
108}
#define NULL
Definition Config.h:340
#define __DCL_ASSERT(expr)
Definition Object.h:371

◆ operator<<() [5/17]

DCLCAPI OutputStream & operator<< ( OutputStream & _out,
double _n )
inline

Definition at line 214 of file OutputStream.h.

216{
217 return _out.write(&_n, sizeof(_n));
218}

◆ operator<<() [6/17]

DCLCAPI OutputStream & operator<< ( OutputStream & _out,
float _n )
inline

Definition at line 208 of file OutputStream.h.

210{
211 return _out.write(&_n, sizeof(_n));
212}

◆ operator<<() [7/17]

DCLCAPI OutputStream & operator<< ( OutputStream & _out,
int _n )
inline

Definition at line 146 of file OutputStream.h.

148{
149 return _out.write(&_n, sizeof(_n));
150}

◆ operator<<() [8/17]

DCLCAPI OutputStream & operator<< ( OutputStream & _out,
long _n )
inline

Definition at line 158 of file OutputStream.h.

160{
161 return _out.write(&_n, sizeof(_n));
162}

◆ operator<<() [9/17]

DCLCAPI OutputStream & operator<< ( OutputStream & _out,
long double _n )
inline

Definition at line 220 of file OutputStream.h.

222{
223 return _out.write(&_n, sizeof(_n));
224}

◆ operator<<() [10/17]

DCLCAPI OutputStream & operator<< ( OutputStream & _out,
long long _n )
inline

Definition at line 170 of file OutputStream.h.

172{
173 return _out.write(&_n, sizeof(_n));
174}

◆ operator<<() [11/17]

DCLCAPI OutputStream & operator<< ( OutputStream & _out,
short int _n )
inline

Definition at line 134 of file OutputStream.h.

136{
137 return _out.write(&_n, sizeof(_n));
138}

◆ operator<<() [12/17]

DCLCAPI OutputStream & operator<< ( OutputStream & _out,
unsigned char _ch )
inline

Definition at line 128 of file OutputStream.h.

130{
131 return _out.write(&_ch, sizeof(unsigned char));
132}

◆ operator<<() [13/17]

DCLCAPI OutputStream & operator<< ( OutputStream & _out,
unsigned int _n )
inline

Definition at line 152 of file OutputStream.h.

154{
155 return _out.write(&_n, sizeof(_n));
156}

◆ operator<<() [14/17]

DCLCAPI OutputStream & operator<< ( OutputStream & _out,
unsigned long _n )
inline

Definition at line 164 of file OutputStream.h.

166{
167 return _out.write(&_n, sizeof(_n));
168}

◆ operator<<() [15/17]

DCLCAPI OutputStream & operator<< ( OutputStream & _out,
unsigned long long _n )
inline

Definition at line 176 of file OutputStream.h.

178{
179 return _out.write(&_n, sizeof(_n));
180}

◆ operator<<() [16/17]

DCLCAPI OutputStream & operator<< ( OutputStream & _out,
unsigned short int _n )
inline

Definition at line 140 of file OutputStream.h.

142{
143 return _out.write(&_n, sizeof(_n));
144}

◆ operator<<() [17/17]

DCLCAPI OutputStream & operator<< ( OutputStream & out,
const __endl &  )

Definition at line 56 of file OutputStream.cpp.

58{
59 out.write("\n", 1);
60 out.flush();
61 return out;
62}