DCL 3.7.4
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

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 *)

Variables

DCLCVAR const struct __endl endl

Macro Definition Documentation

◆ __DCL_OUTPUT_STREAM_H__

#define __DCL_OUTPUT_STREAM_H__   20071009

Definition at line 2 of file OutputStream.h.

Function Documentation

◆ operator<<() [1/17]

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

Definition at line 117 of file OutputStream.h.

119{
120 return _out.write(&_ch, sizeof(char));
121}

◆ operator<<() [2/17]

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

Definition at line 105 of file OutputStream.h.

107{
108 return _out.write(_str.data(), _str.length());
109}

◆ operator<<() [3/17]

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

Definition at line 111 of file OutputStream.h.

113{
114 return _out.write(_sb.data(), _sb.length());
115}

◆ operator<<() [4/17]

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

Definition at line 98 of file OutputStream.h.

100{
101 __DCL_ASSERT(_psz != NULL);
102 return _out.write(_psz, ByteString::length(_psz));
103}
#define NULL
Definition Config.h:312
#define __DCL_ASSERT(expr)
Definition Object.h:394

◆ operator<<() [5/17]

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

Definition at line 209 of file OutputStream.h.

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

◆ operator<<() [6/17]

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

Definition at line 203 of file OutputStream.h.

205{
206 return _out.write(&_n, sizeof(_n));
207}

◆ operator<<() [7/17]

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

Definition at line 141 of file OutputStream.h.

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

◆ operator<<() [8/17]

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

Definition at line 153 of file OutputStream.h.

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

◆ operator<<() [9/17]

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

Definition at line 215 of file OutputStream.h.

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

◆ operator<<() [10/17]

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

Definition at line 165 of file OutputStream.h.

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

◆ operator<<() [11/17]

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

Definition at line 129 of file OutputStream.h.

131{
132 return _out.write(&_n, sizeof(_n));
133}

◆ operator<<() [12/17]

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

Definition at line 123 of file OutputStream.h.

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

◆ operator<<() [13/17]

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

Definition at line 147 of file OutputStream.h.

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

◆ operator<<() [14/17]

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

Definition at line 159 of file OutputStream.h.

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

◆ operator<<() [15/17]

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

Definition at line 171 of file OutputStream.h.

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

◆ operator<<() [16/17]

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

Definition at line 135 of file OutputStream.h.

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

◆ operator<<() [17/17]

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

Definition at line 58 of file OutputStream.cpp.

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

Variable Documentation

◆ endl

DCLCVAR const struct __endl endl
extern

Definition at line 66 of file OutputStream.cpp.