ReactOS 0.4.15-dev-7788-g1ad9096
ios_base Class Reference

#include <_ios_base.h>

Inheritance diagram for ios_base:
Collaboration diagram for ios_base:

Classes

class  failure
 
class  Init
 

Public Types

enum  event { erase_event , imbue_event , copyfmt_event }
 
typedef int fmtflags
 
typedef int iostate
 
typedef int openmode
 
typedef int seekdir
 
typedef fmtflags fmt_flags
 
typedef void(* event_callback) (event, ios_base &, int __index)
 
typedef iostate io_state
 
typedef openmode open_mode
 
typedef seekdir seek_dir
 
typedef _STLP_STD::streamoff streamoff
 
typedef _STLP_STD::streampos streampos
 

Public Member Functions

 _STLP_STATIC_CONSTANT (int, left=0x0001)
 
 _STLP_STATIC_CONSTANT (int, right=0x0002)
 
 _STLP_STATIC_CONSTANT (int, internal=0x0004)
 
 _STLP_STATIC_CONSTANT (int, dec=0x0008)
 
 _STLP_STATIC_CONSTANT (int, hex=0x0010)
 
 _STLP_STATIC_CONSTANT (int, oct=0x0020)
 
 _STLP_STATIC_CONSTANT (int, fixed=0x0040)
 
 _STLP_STATIC_CONSTANT (int, scientific=0x0080)
 
 _STLP_STATIC_CONSTANT (int, boolalpha=0x0100)
 
 _STLP_STATIC_CONSTANT (int, showbase=0x0200)
 
 _STLP_STATIC_CONSTANT (int, showpoint=0x0400)
 
 _STLP_STATIC_CONSTANT (int, showpos=0x0800)
 
 _STLP_STATIC_CONSTANT (int, skipws=0x1000)
 
 _STLP_STATIC_CONSTANT (int, unitbuf=0x2000)
 
 _STLP_STATIC_CONSTANT (int, uppercase=0x4000)
 
 _STLP_STATIC_CONSTANT (int, adjustfield=left|right|internal)
 
 _STLP_STATIC_CONSTANT (int, basefield=dec|hex|oct)
 
 _STLP_STATIC_CONSTANT (int, floatfield=scientific|fixed)
 
 _STLP_STATIC_CONSTANT (int, goodbit=0x00)
 
 _STLP_STATIC_CONSTANT (int, badbit=0x01)
 
 _STLP_STATIC_CONSTANT (int, eofbit=0x02)
 
 _STLP_STATIC_CONSTANT (int, failbit=0x04)
 
 _STLP_STATIC_CONSTANT (int, __default_mode=0x0)
 
 _STLP_STATIC_CONSTANT (int, app=0x01)
 
 _STLP_STATIC_CONSTANT (int, ate=0x02)
 
 _STLP_STATIC_CONSTANT (int, binary=0x04)
 
 _STLP_STATIC_CONSTANT (int, in=0x08)
 
 _STLP_STATIC_CONSTANT (int, out=0x10)
 
 _STLP_STATIC_CONSTANT (int, trunc=0x20)
 
 _STLP_STATIC_CONSTANT (int, beg=0x01)
 
 _STLP_STATIC_CONSTANT (int, cur=0x02)
 
 _STLP_STATIC_CONSTANT (int, end=0x04)
 
fmtflags flags () const
 
fmtflags flags (fmtflags __flags)
 
fmtflags setf (fmtflags __flag)
 
fmtflags setf (fmtflags __flag, fmtflags __mask)
 
void unsetf (fmtflags __mask)
 
streamsize precision () const
 
streamsize precision (streamsize __newprecision)
 
streamsize width () const
 
streamsize width (streamsize __newwidth)
 
locale imbue (const locale &)
 
locale getloc () const
 
longiword (int __index)
 
void *& pword (int __index)
 
virtual ~ios_base ()
 
void register_callback (event_callback __fn, int __index)
 
 operator void * () const
 
bool operator! () const
 
iostate rdstate () const
 
bool good () const
 
bool eof () const
 
bool fail () const
 
bool bad () const
 

Static Public Member Functions

static int _STLP_CALL xalloc ()
 
static bool _STLP_CALL sync_with_stdio (bool __sync=true)
 

Protected Member Functions

void _M_copy_state (const ios_base &__x)
 
void _M_setstate_nothrow (iostate __state)
 
void _M_clear_nothrow (iostate __state)
 
iostate _M_get_exception_mask () const
 
void _M_set_exception_mask (iostate __mask)
 
void _M_check_exception_mask ()
 
void _M_invoke_callbacks (event)
 
void _STLP_FUNCTION_THROWS _M_throw_failure ()
 
 ios_base ()
 

Static Protected Member Functions

static void _STLP_CALL _S_initialize ()
 
static void _STLP_CALL _S_uninitialize ()
 

Static Protected Attributes

static bool _S_is_synced = true
 

Private Member Functions

 ios_base (const ios_base &)
 
void operator= (const ios_base &)
 

Private Attributes

fmtflags _M_fmtflags
 
iostate _M_iostate
 
openmode _M_openmode
 
seekdir _M_seekdir
 
iostate _M_exception_mask
 
streamsize _M_precision
 
streamsize _M_width
 
locale _M_locale
 
pair< event_callback, int > * _M_callbacks
 
size_t _M_num_callbacks
 
size_t _M_callback_index
 
long_M_iwords
 
size_t _M_num_iwords
 
void ** _M_pwords
 
size_t _M_num_pwords
 

Friends

class Init
 

Detailed Description

Definition at line 48 of file _ios_base.h.

Member Typedef Documentation

◆ event_callback

typedef void(* ios_base::event_callback) (event, ios_base &, int __index)

Definition at line 155 of file _ios_base.h.

◆ fmt_flags

Definition at line 63 of file _ios_base.h.

◆ fmtflags

Definition at line 57 of file _ios_base.h.

◆ io_state

Definition at line 254 of file _ios_base.h.

◆ iostate

Definition at line 58 of file _ios_base.h.

◆ open_mode

Definition at line 255 of file _ios_base.h.

◆ openmode

Definition at line 59 of file _ios_base.h.

◆ seek_dir

Definition at line 256 of file _ios_base.h.

◆ seekdir

Definition at line 60 of file _ios_base.h.

◆ streamoff

typedef _STLP_STD::streamoff ios_base::streamoff

Definition at line 257 of file _ios_base.h.

◆ streampos

typedef _STLP_STD::streampos ios_base::streampos

Definition at line 258 of file _ios_base.h.

Member Enumeration Documentation

◆ event

Enumerator
erase_event 
imbue_event 
copyfmt_event 

Definition at line 154 of file _ios_base.h.

Constructor & Destructor Documentation

◆ ~ios_base()

ios_base::~ios_base ( )
virtual

Definition at line 297 of file ios.cpp.

297 {
302}
void ** _M_pwords
Definition: _ios_base.h:230
pair< event_callback, int > * _M_callbacks
Definition: _ios_base.h:222
void _M_invoke_callbacks(event)
Definition: ios.cpp:197
long * _M_iwords
Definition: _ios_base.h:227
#define free
Definition: debug_ros.c:5

◆ ios_base() [1/2]

ios_base::ios_base ( )
protected

Definition at line 285 of file ios.cpp.

288 _M_precision(0), _M_width(0),
289 _M_locale(),
292 _M_pwords(0),
294{}
size_t _M_num_pwords
Definition: _ios_base.h:231
iostate _M_iostate
Definition: _ios_base.h:212
size_t _M_num_callbacks
Definition: _ios_base.h:223
locale _M_locale
Definition: _ios_base.h:220
size_t _M_callback_index
Definition: _ios_base.h:224
streamsize _M_precision
Definition: _ios_base.h:217
streamsize _M_width
Definition: _ios_base.h:218
size_t _M_num_iwords
Definition: _ios_base.h:228
fmtflags _M_fmtflags
Definition: _ios_base.h:211
openmode _M_openmode
Definition: _ios_base.h:213
iostate _M_exception_mask
Definition: _ios_base.h:215
seekdir _M_seekdir
Definition: _ios_base.h:214

◆ ios_base() [2/2]

ios_base::ios_base ( const ios_base )
private

Member Function Documentation

◆ _M_check_exception_mask()

void ios_base::_M_check_exception_mask ( )
inlineprotected

Definition at line 189 of file _ios_base.h.

189 {
192 }
void _STLP_FUNCTION_THROWS _M_throw_failure()
Definition: ios.cpp:207

Referenced by _M_copy_state(), basic_ios< _CharT, _Traits >::clear(), iword(), pword(), and register_callback().

◆ _M_clear_nothrow()

void ios_base::_M_clear_nothrow ( iostate  __state)
inlineprotected

Definition at line 186 of file _ios_base.h.

186{ _M_iostate = __state; }

Referenced by basic_ios< _CharT, _Traits >::clear().

◆ _M_copy_state()

void ios_base::_M_copy_state ( const ios_base __x)
protected

Definition at line 232 of file ios.cpp.

232 {
233 _M_fmtflags = x._M_fmtflags; // Copy the flags, except for _M_iostate
234 _M_openmode = x._M_openmode; // and _M_exception_mask.
235 _M_seekdir = x._M_seekdir;
236 _M_precision = x._M_precision;
237 _M_width = x._M_width;
238 _M_locale = x._M_locale;
239
240 if (x._M_callbacks) {
241 pair<event_callback, int>* tmp = _Stl_copy_array(x._M_callbacks, x._M_callback_index);
242 if (tmp) {
244 _M_callbacks = tmp;
245 _M_num_callbacks = _M_callback_index = x._M_callback_index;
246 }
247 else {
248 _M_setstate_nothrow(badbit);
250 }
251 }
252
253 if (x._M_iwords) {
254 long* tmp = _Stl_copy_array(x._M_iwords, x._M_num_iwords);
255 if (tmp) {
257 _M_iwords = tmp;
258 _M_num_iwords = x._M_num_iwords;
259 }
260 else {
261 _M_setstate_nothrow(badbit);
263 }
264 }
265
266 if (x._M_pwords) {
267 void** tmp = _Stl_copy_array(x._M_pwords, x._M_num_pwords);
268 if (tmp) {
270 _M_pwords = tmp;
271 _M_num_pwords = x._M_num_pwords;
272 }
273 else {
274 _M_setstate_nothrow(badbit);
276 }
277 }
278}
void _M_setstate_nothrow(iostate __state)
Definition: _ios_base.h:185
void _M_check_exception_mask()
Definition: _ios_base.h:189
GLint GLint GLint GLint GLint x
Definition: gl.h:1548
static PODType * _Stl_copy_array(const PODType *__array, size_t N)
Definition: ios.cpp:115
Definition: _pair.h:47

◆ _M_get_exception_mask()

iostate ios_base::_M_get_exception_mask ( ) const
inlineprotected

Definition at line 187 of file _ios_base.h.

187{ return _M_exception_mask; }

Referenced by basic_ios< _CharT, _Traits >::exceptions().

◆ _M_invoke_callbacks()

void ios_base::_M_invoke_callbacks ( event  E)
protected

Definition at line 197 of file ios.cpp.

197 {
198 for (size_t i = _M_callback_index; i > 0; --i) {
200 int n = _M_callbacks[i-1].second;
201 f(E, *this, n);
202 }
203}
void(* event_callback)(event, ios_base &, int __index)
Definition: _ios_base.h:155
static const WCHAR E[]
Definition: oid.c:1253
GLdouble n
Definition: glext.h:7729
GLfloat f
Definition: glext.h:7540
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
#define f
Definition: ke_i.h:83
_T2 second
Definition: _pair.h:52
_T1 first
Definition: _pair.h:51

Referenced by imbue(), and ~ios_base().

◆ _M_set_exception_mask()

void ios_base::_M_set_exception_mask ( iostate  __mask)
inlineprotected

Definition at line 188 of file _ios_base.h.

188{ _M_exception_mask = __mask; }

Referenced by basic_ios< _CharT, _Traits >::exceptions().

◆ _M_setstate_nothrow()

void ios_base::_M_setstate_nothrow ( iostate  __state)
inlineprotected

Definition at line 185 of file _ios_base.h.

185{ _M_iostate |= __state; }

Referenced by _M_copy_state(), iword(), pword(), and register_callback().

◆ _M_throw_failure()

void ios_base::_M_throw_failure ( )
protected

Definition at line 207 of file ios.cpp.

207 {
208 const char* arg ;
209# if 0
210 char buffer[256];
211 char* ptr;
212 strcpy(buffer, "ios failure: rdstate = 0x");
213 ptr = __write_integer(buffer+strlen(buffer), ios_base::hex, __STATIC_CAST(unsigned long,_M_iostate));
214 strcpy(ptr, " mask = 0x");
215 ptr = __write_integer(buffer+strlen(buffer), ios_base::hex, __STATIC_CAST(unsigned long,_M_exception_mask));
216 *ptr = 0;
217 arg = buffer;
218# else
219 arg = "ios failure";
220# endif
221
222# ifndef _STLP_USE_EXCEPTIONS
223 fputs(arg, stderr);
224# else
225 throw failure(arg);
226# endif
227}
ACPI_SIZE strlen(const char *String)
Definition: utclib.c:269
char * strcpy(char *DstString, const char *SrcString)
Definition: utclib.c:388
#define __STATIC_CAST(__x, __y)
Definition: features.h:585
GLuint buffer
Definition: glext.h:5915
#define stderr
Definition: stdio.h:100
_Check_return_opt_ _CRTIMP int __cdecl fputs(_In_z_ const char *_Str, _Inout_ FILE *_File)
static PVOID ptr
Definition: dispmode.c:27
char *_STLP_CALL __write_integer(char *buf, ios_base::fmtflags flags, long x)
Definition: num_put.cpp:125
void * arg
Definition: msvc.h:10

◆ _S_initialize()

void _STLP_CALL ios_base::_S_initialize ( )
staticprotected

Definition at line 191 of file iostream.cpp.

191 {
192#if !defined (_STLP_HAS_NO_NAMESPACES) && !defined (_STLP_DONT_USE_PRIV_NAMESPACE)
195#endif
196
197 auto_ptr<streambuf> cin_buf;
198 auto_ptr<streambuf> cout_buf;
199 auto_ptr<streambuf> cerr_buf;
200 auto_ptr<streambuf> clog_buf;
201
202 if (_S_is_synced)
203 cin_buf.reset(new stdio_istreambuf(stdin));
204 else
205 cin_buf.reset(_Stl_create_filebuf(stdin, ios_base::in));
206
207 if (_S_is_synced) {
208#ifdef _STLP_REDIRECT_STDSTREAMS
209 cout_buf.reset(_Stl_create_filebuf("/stdout.txt", ios::out));
210 cerr_buf.reset(_Stl_create_filebuf("/stderr.txt", ios::out));
211 clog_buf.reset(_Stl_create_filebuf("/stdlog.txt", ios::out));
212#else
213 cout_buf.reset(new stdio_ostreambuf(stdout));
214 cerr_buf.reset(new stdio_ostreambuf(stderr));
215 clog_buf.reset(new stdio_ostreambuf(stderr));
216#endif
217 }
218 else {
219 cout_buf.reset(_Stl_create_filebuf(stdout, ios_base::out));
220 cerr_buf.reset(_Stl_create_filebuf(stderr, ios_base::out));
221 clog_buf.reset(_Stl_create_filebuf(stderr, ios_base::out));
222 }
223
224 istream* ptr_cin = new(&cin) istream(cin_buf.get()); cin_buf.release();
225 ostream* ptr_cout = new(&cout) ostream(cout_buf.get()); cout_buf.release();
226 ostream* ptr_cerr = new(&cerr) ostream(cerr_buf.get()); cerr_buf.release();
227 /*ostream* ptr_clog = */ new(&clog) ostream(clog_buf.get()); clog_buf.release();
228 ptr_cin->tie(ptr_cout);
229 ptr_cerr->setf(ios_base::unitbuf);
230
231#ifndef _STLP_NO_WCHAR_T
233 auto_ptr<wfilebuf> wout(_Stl_create_wfilebuf(stdout, ios_base::out));
234 auto_ptr<wfilebuf> werr(_Stl_create_wfilebuf(stderr, ios_base::out));
235 auto_ptr<wfilebuf> wlog(_Stl_create_wfilebuf(stderr, ios_base::out));
236
237 // Run constructors for the four wide stream objects.
238 wistream* ptr_wcin = new(&wcin) wistream(win.get()); win.release();
239 wostream* ptr_wcout = new(&wcout) wostream(wout.get()); wout.release();
240 wostream* ptr_wcerr = new(&wcerr) wostream(werr.get()); werr.release();
241 /*wostream* ptr_wclog = */ new(&wclog) wostream(wlog.get()); wlog.release();
242
243 ptr_wcin->tie(ptr_wcout);
244 ptr_wcerr->setf(ios_base::unitbuf);
245#endif
246}
#define _STLP_PRIV
Definition: _dm.h:70
basic_ostream< char, char_traits< char > > ostream
Definition: _iosfwd.h:121
basic_istream< char, char_traits< char > > istream
Definition: _iosfwd.h:120
basic_ostream< wchar_t, char_traits< wchar_t > > wostream
Definition: _iosfwd.h:139
basic_istream< wchar_t, char_traits< wchar_t > > wistream
Definition: _iosfwd.h:138
void reset(_Tp *__px=0) _STLP_NOTHROW
Definition: _auto_ptr.h:59
_Tp * get() const _STLP_NOTHROW
Definition: _auto_ptr.h:66
_Tp * release() _STLP_NOTHROW
Definition: _auto_ptr.h:53
basic_ostream< _CharT, _Traits > * tie() const
Definition: _ios.h:62
fmtflags setf(fmtflags __flag)
Definition: _ios_base.h:114
static bool _S_is_synced
Definition: _ios_base.h:202
#define stdout
Definition: stdio.h:99
#define stdin
Definition: stdio.h:98
_STLP_DECLSPEC _Stl_aligned_buffer< wostream > wcout
Definition: iostream.cpp:120
#define cout
Definition: iostream.cpp:38
_STLP_DECLSPEC _Stl_aligned_buffer< wostream > wcerr
Definition: iostream.cpp:121
#define cin
Definition: iostream.cpp:37
static wfilebuf * _Stl_create_wfilebuf(FILE *f, ios_base::openmode mode)
Definition: iostream.cpp:180
static filebuf * _Stl_create_filebuf(_Tp x, ios_base::openmode mode)
Definition: iostream.cpp:168
#define cerr
Definition: iostream.cpp:39
_STLP_DECLSPEC _Stl_aligned_buffer< wostream > wclog
Definition: iostream.cpp:122
#define clog
Definition: iostream.cpp:40
_STLP_DECLSPEC _Stl_aligned_buffer< wistream > wcin
Definition: iostream.cpp:119
static real win[4][36]

Referenced by ios_base::Init::Init().

◆ _S_uninitialize()

void _STLP_CALL ios_base::_S_uninitialize ( )
staticprotected

Definition at line 248 of file iostream.cpp.

248 {
249 // Note that destroying output streambufs flushes the buffers.
250 istream* ptr_cin = &cin;
251 ostream* ptr_cout = &cout;
252 ostream* ptr_cerr = &cerr;
253 ostream* ptr_clog = &clog;
254
255 // We don't want any exceptions being thrown here
256 ptr_cin->exceptions(0);
257 ptr_cout->exceptions(0);
258 ptr_cerr->exceptions(0);
259 ptr_clog->exceptions(0);
260
261 delete ptr_cin->rdbuf(0);
262 delete ptr_cout->rdbuf(0);
263 delete ptr_cerr->rdbuf(0);
264 delete ptr_clog->rdbuf(0);
265
266 _Destroy(ptr_cin);
267 _Destroy(ptr_cout);
268 _Destroy(ptr_cerr);
269 _Destroy(ptr_clog);
270
271#ifndef _STLP_NO_WCHAR_T
272 wistream* ptr_wcin = &wcin;
273 wostream* ptr_wcout = &wcout;
274 wostream* ptr_wcerr = &wcerr;
275 wostream* ptr_wclog = &wclog;
276
277 // We don't want any exceptions being thrown here
278 ptr_wcin->exceptions(0);
279 ptr_wcout->exceptions(0);
280 ptr_wcerr->exceptions(0);
281 ptr_wclog->exceptions(0);
282
283 delete ptr_wcin->rdbuf(0);
284 delete ptr_wcout->rdbuf(0);
285 delete ptr_wcerr->rdbuf(0);
286 delete ptr_wclog->rdbuf(0);
287
288 _Destroy(ptr_wcin);
289 _Destroy(ptr_wcout);
290 _Destroy(ptr_wcerr);
291 _Destroy(ptr_wclog);
292#endif
293}
void _Destroy(_Tp *__pointer)
Definition: _construct.h:63
iostate exceptions() const
Definition: _ios.h:97
basic_streambuf< _CharT, _Traits > * rdbuf() const
Definition: _ios.h:72

Referenced by ios_base::Init::~Init().

◆ _STLP_STATIC_CONSTANT() [1/32]

ios_base::_STLP_STATIC_CONSTANT ( int  ,
__default_mode  = 0x0 
)

◆ _STLP_STATIC_CONSTANT() [2/32]

ios_base::_STLP_STATIC_CONSTANT ( int  ,
adjustfield  = left|right|internal 
)

◆ _STLP_STATIC_CONSTANT() [3/32]

ios_base::_STLP_STATIC_CONSTANT ( int  ,
app  = 0x01 
)

◆ _STLP_STATIC_CONSTANT() [4/32]

ios_base::_STLP_STATIC_CONSTANT ( int  ,
ate  = 0x02 
)

◆ _STLP_STATIC_CONSTANT() [5/32]

ios_base::_STLP_STATIC_CONSTANT ( int  ,
badbit  = 0x01 
)

◆ _STLP_STATIC_CONSTANT() [6/32]

ios_base::_STLP_STATIC_CONSTANT ( int  ,
basefield  = dec|hex|oct 
)

◆ _STLP_STATIC_CONSTANT() [7/32]

ios_base::_STLP_STATIC_CONSTANT ( int  ,
beg  = 0x01 
)

◆ _STLP_STATIC_CONSTANT() [8/32]

ios_base::_STLP_STATIC_CONSTANT ( int  ,
binary  = 0x04 
)

◆ _STLP_STATIC_CONSTANT() [9/32]

ios_base::_STLP_STATIC_CONSTANT ( int  ,
boolalpha  = 0x0100 
)

◆ _STLP_STATIC_CONSTANT() [10/32]

ios_base::_STLP_STATIC_CONSTANT ( int  ,
cur  = 0x02 
)

◆ _STLP_STATIC_CONSTANT() [11/32]

ios_base::_STLP_STATIC_CONSTANT ( int  ,
dec  = 0x0008 
)

◆ _STLP_STATIC_CONSTANT() [12/32]

ios_base::_STLP_STATIC_CONSTANT ( int  ,
end  = 0x04 
)

◆ _STLP_STATIC_CONSTANT() [13/32]

ios_base::_STLP_STATIC_CONSTANT ( int  ,
eofbit  = 0x02 
)

◆ _STLP_STATIC_CONSTANT() [14/32]

ios_base::_STLP_STATIC_CONSTANT ( int  ,
failbit  = 0x04 
)

◆ _STLP_STATIC_CONSTANT() [15/32]

ios_base::_STLP_STATIC_CONSTANT ( int  ,
fixed  = 0x0040 
)

◆ _STLP_STATIC_CONSTANT() [16/32]

ios_base::_STLP_STATIC_CONSTANT ( int  ,
floatfield  = scientific|fixed 
)

◆ _STLP_STATIC_CONSTANT() [17/32]

ios_base::_STLP_STATIC_CONSTANT ( int  ,
goodbit  = 0x00 
)

◆ _STLP_STATIC_CONSTANT() [18/32]

ios_base::_STLP_STATIC_CONSTANT ( int  ,
hex  = 0x0010 
)

◆ _STLP_STATIC_CONSTANT() [19/32]

ios_base::_STLP_STATIC_CONSTANT ( int  ,
in  = 0x08 
)

◆ _STLP_STATIC_CONSTANT() [20/32]

ios_base::_STLP_STATIC_CONSTANT ( int  ,
internal  = 0x0004 
)

◆ _STLP_STATIC_CONSTANT() [21/32]

ios_base::_STLP_STATIC_CONSTANT ( int  ,
left  = 0x0001 
)

◆ _STLP_STATIC_CONSTANT() [22/32]

ios_base::_STLP_STATIC_CONSTANT ( int  ,
oct  = 0x0020 
)

◆ _STLP_STATIC_CONSTANT() [23/32]

ios_base::_STLP_STATIC_CONSTANT ( int  ,
out  = 0x10 
)

◆ _STLP_STATIC_CONSTANT() [24/32]

ios_base::_STLP_STATIC_CONSTANT ( int  ,
right  = 0x0002 
)

◆ _STLP_STATIC_CONSTANT() [25/32]

ios_base::_STLP_STATIC_CONSTANT ( int  ,
scientific  = 0x0080 
)

◆ _STLP_STATIC_CONSTANT() [26/32]

ios_base::_STLP_STATIC_CONSTANT ( int  ,
showbase  = 0x0200 
)

◆ _STLP_STATIC_CONSTANT() [27/32]

ios_base::_STLP_STATIC_CONSTANT ( int  ,
showpoint  = 0x0400 
)

◆ _STLP_STATIC_CONSTANT() [28/32]

ios_base::_STLP_STATIC_CONSTANT ( int  ,
showpos  = 0x0800 
)

◆ _STLP_STATIC_CONSTANT() [29/32]

ios_base::_STLP_STATIC_CONSTANT ( int  ,
skipws  = 0x1000 
)

◆ _STLP_STATIC_CONSTANT() [30/32]

ios_base::_STLP_STATIC_CONSTANT ( int  ,
trunc  = 0x20 
)

◆ _STLP_STATIC_CONSTANT() [31/32]

ios_base::_STLP_STATIC_CONSTANT ( int  ,
unitbuf  = 0x2000 
)

◆ _STLP_STATIC_CONSTANT() [32/32]

ios_base::_STLP_STATIC_CONSTANT ( int  ,
uppercase  = 0x4000 
)

◆ bad()

bool ios_base::bad ( ) const
inline

Definition at line 175 of file _ios_base.h.

175{ return (_M_iostate & badbit) != 0; }

◆ eof()

bool ios_base::eof ( ) const
inline

◆ fail()

◆ flags() [1/2]

◆ flags() [2/2]

fmtflags ios_base::flags ( fmtflags  __flags)
inline

Definition at line 108 of file _ios_base.h.

108 {
109 fmtflags __tmp = _M_fmtflags;
110 _M_fmtflags = __flags;
111 return __tmp;
112 }
int fmtflags
Definition: _ios_base.h:57

◆ getloc()

◆ good()

bool ios_base::good ( ) const
inline

Definition at line 172 of file _ios_base.h.

172{ return _M_iostate == 0; }

Referenced by __init_bostr(), _M_init_noskip(), _M_init_skip(), and IOStreamTest::manipulators().

◆ imbue()

locale ios_base::imbue ( const locale loc)

Definition at line 122 of file ios.cpp.

122 {
123 if (loc != _M_locale) {
124 locale previous = _M_locale;
125 _M_locale = loc;
127 return previous;
128 }
129 else {
131 return _M_locale;
132 }
133}
Definition: _locale.h:75

Referenced by basic_ios< _CharT, _Traits >::imbue().

◆ iword()

long & ios_base::iword ( int  __index)

Definition at line 148 of file ios.cpp.

148 {
149 static long dummy = 0;
150
152 if (tmp.first) { // The allocation, if any, succeeded.
153 _M_iwords = tmp.first;
154 _M_num_iwords = tmp.second;
155 return _M_iwords[index];
156 }
157 else {
158 _M_setstate_nothrow(badbit);
160 return dummy;
161 }
162}
#define index(s, c)
Definition: various.h:29
GLuint index
Definition: glext.h:6031
static pair< PODType *, size_t > _Stl_expand_array(PODType *__array, size_t N, int index)
Definition: ios.cpp:94

◆ operator void *()

ios_base::operator void * ( ) const
inline

Definition at line 167 of file _ios_base.h.

167{ return !fail() ? (void*) __CONST_CAST(ios_base*,this) : (void*) 0; }
bool fail() const
Definition: _ios_base.h:174
#define __CONST_CAST(__x, __y)
Definition: features.h:584

◆ operator!()

bool ios_base::operator! ( ) const
inline

Definition at line 168 of file _ios_base.h.

168{ return fail(); }

◆ operator=()

void ios_base::operator= ( const ios_base )
private

◆ precision() [1/2]

streamsize ios_base::precision ( ) const
inline

Definition at line 127 of file _ios_base.h.

127{ return _M_precision; }

Referenced by __do_put_float(), operator<<(), and setprecision().

◆ precision() [2/2]

streamsize ios_base::precision ( streamsize  __newprecision)
inline

Definition at line 128 of file _ios_base.h.

128 {
129 streamsize __tmp = _M_precision;
130 _M_precision = __newprecision;
131 return __tmp;
132 }
ptrdiff_t streamsize
Definition: char_traits.h:81

◆ pword()

void *& ios_base::pword ( int  __index)

Definition at line 165 of file ios.cpp.

165 {
166 static void* dummy = 0;
167
169 if (tmp.first) { // The allocation, if any, succeeded.
170 _M_pwords = tmp.first;
171 _M_num_pwords = tmp.second;
172 return _M_pwords[index];
173 }
174 else {
175 _M_setstate_nothrow(badbit);
177 return dummy;
178 }
179}

◆ rdstate()

iostate ios_base::rdstate ( ) const
inline

◆ register_callback()

void ios_base::register_callback ( event_callback  __fn,
int  __index 
)

Definition at line 181 of file ios.cpp.

181 {
184 if (tmp.first) {
185 _M_callbacks = tmp.first;
188 }
189 else {
190 _M_setstate_nothrow(badbit);
192 }
193}
pair< _T1, _T2 > _STLP_CALL make_pair(_T1 __x, _T2 __y)
Definition: _pair.h:124

◆ setf() [1/2]

fmtflags ios_base::setf ( fmtflags  __flag)
inline

◆ setf() [2/2]

fmtflags ios_base::setf ( fmtflags  __flag,
fmtflags  __mask 
)
inline

Definition at line 119 of file _ios_base.h.

119 {
120 fmtflags __tmp = _M_fmtflags;
121 _M_fmtflags &= ~__mask;
122 _M_fmtflags |= __flag & __mask;
123 return __tmp;
124 }

◆ sync_with_stdio()

bool _STLP_CALL ios_base::sync_with_stdio ( bool  __sync = true)
static

Definition at line 296 of file iostream.cpp.

296 {
297# if !defined (_STLP_HAS_NO_NAMESPACES) && !defined (_STLP_DONT_USE_PRIV_NAMESPACE)
300# endif
301
302 if (sync == _S_is_synced) return sync;
303
304 // if by any chance we got there before std streams initialization,
305 // just set the sync flag and exit
306 if (Init::_S_count == 0) {
307 _S_is_synced = sync;
308 return sync;
309 }
310
311 auto_ptr<streambuf> cin_buf;
312 auto_ptr<streambuf> cout_buf;
313 auto_ptr<streambuf> cerr_buf;
314 auto_ptr<streambuf> clog_buf;
315
316 if (sync)
317 cin_buf.reset(new stdio_istreambuf(stdin));
318 else
319 cin_buf.reset(_Stl_create_filebuf(stdin, ios_base::in));
320
321 if (sync) {
322#ifdef _STLP_REDIRECT_STDSTREAMS
323 cout_buf.reset(_Stl_create_filebuf("/stdout.txt", ios::out));
324 cerr_buf.reset(_Stl_create_filebuf("/stderr.txt", ios::out));
325 clog_buf.reset(_Stl_create_filebuf("/stdlog.txt", ios::out));
326#else
327 cout_buf.reset(new stdio_ostreambuf(stdout));
328 cerr_buf.reset(new stdio_ostreambuf(stderr));
329 clog_buf.reset(new stdio_ostreambuf(stderr));
330#endif
331 }
332 else {
333 cout_buf.reset(_Stl_create_filebuf(stdout, ios_base::out));
334 cerr_buf.reset(_Stl_create_filebuf(stderr, ios_base::out));
335 clog_buf.reset(_Stl_create_filebuf(stderr, ios_base::out));
336 }
337
338 if (cin_buf.get() != 0 && cout_buf.get() != 0 && cerr_buf.get() != 0 && clog_buf.get() != 0) {
339 // When streambuf passed to rdbuf is not null, rdbuf is exception safe:
340 delete (&cin)->rdbuf(cin_buf.release());
341 delete (&cout)->rdbuf(cout_buf.release());
342 delete (&cerr)->rdbuf(cerr_buf.release());
343 delete (&clog)->rdbuf(clog_buf.release());
344 _S_is_synced = sync;
345 }
346
347 return _S_is_synced;
348}
static long _S_count
Definition: _ios_base.h:245

◆ unsetf()

void ios_base::unsetf ( fmtflags  __mask)
inline

◆ width() [1/2]

◆ width() [2/2]

streamsize ios_base::width ( streamsize  __newwidth)
inline

Definition at line 135 of file _ios_base.h.

135 {
136 streamsize __tmp = _M_width;
137 _M_width = __newwidth;
138 return __tmp;
139 }

◆ xalloc()

int _STLP_CALL ios_base::xalloc ( )
static

Definition at line 135 of file ios.cpp.

135 {
136#if defined (_STLP_THREADS) && \
137 defined (_STLP_WIN32THREADS) && defined (_STLP_NEW_PLATFORM_SDK)
138 static volatile __stl_atomic_t _S_index = 0;
139 return _STLP_ATOMIC_INCREMENT(&_S_index);
140#else
141 static int _S_index = 0;
143 _STLP_auto_lock sentry(__lock);
144 return _S_index++;
145#endif
146}
#define _STLP_ATOMIC_INCREMENT(__x)
Definition: _sparc_atomic.h:57
size_t __stl_atomic_t
Definition: _threads.h:232
#define _STLP_MUTEX_INITIALIZER
Definition: _threads.h:241
#define _STLP_STATIC_MUTEX
Definition: features.h:267

Friends And Related Function Documentation

◆ Init

friend class Init ( void  )
friend

Definition at line 249 of file _ios_base.h.

Member Data Documentation

◆ _M_callback_index

size_t ios_base::_M_callback_index
private

Definition at line 224 of file _ios_base.h.

Referenced by _M_copy_state(), _M_invoke_callbacks(), and register_callback().

◆ _M_callbacks

pair<event_callback, int>* ios_base::_M_callbacks
private

Definition at line 222 of file _ios_base.h.

Referenced by _M_copy_state(), _M_invoke_callbacks(), register_callback(), and ~ios_base().

◆ _M_exception_mask

iostate ios_base::_M_exception_mask
private

Definition at line 215 of file _ios_base.h.

Referenced by _M_throw_failure().

◆ _M_fmtflags

fmtflags ios_base::_M_fmtflags
private

Definition at line 211 of file _ios_base.h.

Referenced by _M_copy_state().

◆ _M_iostate

iostate ios_base::_M_iostate
private

Definition at line 212 of file _ios_base.h.

Referenced by _M_throw_failure().

◆ _M_iwords

long* ios_base::_M_iwords
private

Definition at line 227 of file _ios_base.h.

Referenced by _M_copy_state(), iword(), and ~ios_base().

◆ _M_locale

locale ios_base::_M_locale
private

Definition at line 220 of file _ios_base.h.

Referenced by _M_copy_state(), and imbue().

◆ _M_num_callbacks

size_t ios_base::_M_num_callbacks
private

Definition at line 223 of file _ios_base.h.

Referenced by _M_copy_state(), and register_callback().

◆ _M_num_iwords

size_t ios_base::_M_num_iwords
private

Definition at line 228 of file _ios_base.h.

Referenced by _M_copy_state(), and iword().

◆ _M_num_pwords

size_t ios_base::_M_num_pwords
private

Definition at line 231 of file _ios_base.h.

Referenced by _M_copy_state(), and pword().

◆ _M_openmode

openmode ios_base::_M_openmode
private

Definition at line 213 of file _ios_base.h.

Referenced by _M_copy_state().

◆ _M_precision

streamsize ios_base::_M_precision
private

Definition at line 217 of file _ios_base.h.

Referenced by _M_copy_state().

◆ _M_pwords

void** ios_base::_M_pwords
private

Definition at line 230 of file _ios_base.h.

Referenced by _M_copy_state(), pword(), and ~ios_base().

◆ _M_seekdir

seekdir ios_base::_M_seekdir
private

Definition at line 214 of file _ios_base.h.

Referenced by _M_copy_state().

◆ _M_width

streamsize ios_base::_M_width
private

Definition at line 218 of file _ios_base.h.

Referenced by _M_copy_state().

◆ _S_is_synced

bool ios_base::_S_is_synced = true
staticprotected

Definition at line 202 of file _ios_base.h.

Referenced by _S_initialize(), and sync_with_stdio().


The documentation for this class was generated from the following files: