ReactOS 0.4.16-dev-822-gbcedb53
__crt_stdio_stream Class Reference

#include <corecrt_internal_stdio.h>

Collaboration diagram for __crt_stdio_stream:

Public Member Functions

 __crt_stdio_stream () throw ()
 
 __crt_stdio_stream (FILE *const stream) throw ()
 
 __crt_stdio_stream (__crt_stdio_stream_data *const stream) throw ()
 
bool valid () const throw ()
 
FILEpublic_stream () const throw ()
 
bool is_in_use () const throw ()
 
bool try_allocate () throw ()
 
void deallocate () throw ()
 
void lock () const throw ()
 
void unlock () const throw ()
 
bool has_any_of (long const flags) const throw ()
 
bool has_all_of (long const flags) const throw ()
 
bool set_flags (long const flags) const throw ()
 
bool unset_flags (long const flags) const throw ()
 
bool eof () const throw ()
 
bool error () const throw ()
 
bool ctrl_z () const throw ()
 
bool has_crt_buffer () const throw ()
 
bool has_user_buffer () const throw ()
 
bool has_temporary_buffer () const throw ()
 
bool has_setvbuf_buffer () const throw ()
 
bool has_big_buffer () const throw ()
 
bool has_any_buffer () const throw ()
 
int lowio_handle () const throw ()
 
bool is_string_backed () const throw ()
 
__crt_stdio_stream_dataoperator-> () const throw ()
 
long get_flags () const throw ()
 

Private Attributes

__crt_stdio_stream_data_stream
 

Detailed Description

Definition at line 196 of file corecrt_internal_stdio.h.

Constructor & Destructor Documentation

◆ __crt_stdio_stream() [1/3]

__crt_stdio_stream::__crt_stdio_stream ( )
throw (
)
inline

Definition at line 200 of file corecrt_internal_stdio.h.

201 : _stream(nullptr)
202 {
203 }
__crt_stdio_stream_data * _stream

◆ __crt_stdio_stream() [2/3]

__crt_stdio_stream::__crt_stdio_stream ( FILE *const  stream)
throw (
)
inlineexplicit

Definition at line 205 of file corecrt_internal_stdio.h.

206 : _stream(reinterpret_cast<__crt_stdio_stream_data*>(stream))
207 {
208 }
Definition: parse.h:23

◆ __crt_stdio_stream() [3/3]

__crt_stdio_stream::__crt_stdio_stream ( __crt_stdio_stream_data *const  stream)
throw (
)
inlineexplicit

Definition at line 210 of file corecrt_internal_stdio.h.

211 : _stream(stream)
212 {
213 }

Member Function Documentation

◆ ctrl_z()

bool __crt_stdio_stream::ctrl_z ( ) const
throw (
)
inline

Definition at line 259 of file corecrt_internal_stdio.h.

259{ return has_any_of(_IOCTRLZ); }
bool has_any_of(long const flags) const

◆ deallocate()

void __crt_stdio_stream::deallocate ( )
throw (
)
inline

Definition at line 239 of file corecrt_internal_stdio.h.

240 {
241 // Note: We clear all flags intentionally, so that the stream object
242 // is "clean" the next time it is allocated.
244 }
long __cdecl _InterlockedExchange(_Interlocked_operand_ long volatile *_Target, long _Value)

◆ eof()

bool __crt_stdio_stream::eof ( ) const
throw (
)
inline

Definition at line 257 of file corecrt_internal_stdio.h.

257{ return has_any_of(_IOEOF); }

Referenced by feof().

◆ error()

bool __crt_stdio_stream::error ( ) const
throw (
)
inline

Definition at line 258 of file corecrt_internal_stdio.h.

258{ return has_any_of(_IOERROR); }

Referenced by ferror().

◆ get_flags()

long __crt_stdio_stream::get_flags ( ) const
throw (
)
inline

Definition at line 276 of file corecrt_internal_stdio.h.

277 {
278 return __crt_interlocked_read(&_stream->_flags);
279 }

Referenced by has_all_of(), has_any_of(), is_in_use(), and is_string_backed().

◆ has_all_of()

bool __crt_stdio_stream::has_all_of ( long const  flags) const
throw (
)
inline

Definition at line 252 of file corecrt_internal_stdio.h.

252{ return (get_flags() & flags) == flags; }
GLbitfield flags
Definition: glext.h:7161

◆ has_any_buffer()

bool __crt_stdio_stream::has_any_buffer ( ) const
throw (
)
inline

Definition at line 266 of file corecrt_internal_stdio.h.

◆ has_any_of()

bool __crt_stdio_stream::has_any_of ( long const  flags) const
throw (
)
inline

◆ has_big_buffer()

bool __crt_stdio_stream::has_big_buffer ( ) const
throw (
)
inline

Definition at line 265 of file corecrt_internal_stdio.h.

◆ has_crt_buffer()

bool __crt_stdio_stream::has_crt_buffer ( ) const
throw (
)
inline

Definition at line 261 of file corecrt_internal_stdio.h.

261{ return has_any_of(_IOBUFFER_CRT); }

◆ has_setvbuf_buffer()

bool __crt_stdio_stream::has_setvbuf_buffer ( ) const
throw (
)
inline

Definition at line 264 of file corecrt_internal_stdio.h.

264{ return has_any_of(_IOBUFFER_SETVBUF); }
@ _IOBUFFER_SETVBUF

◆ has_temporary_buffer()

bool __crt_stdio_stream::has_temporary_buffer ( ) const
throw (
)
inline

Definition at line 263 of file corecrt_internal_stdio.h.

263{ return has_any_of(_IOBUFFER_STBUF); }
@ _IOBUFFER_STBUF

◆ has_user_buffer()

bool __crt_stdio_stream::has_user_buffer ( ) const
throw (
)
inline

Definition at line 262 of file corecrt_internal_stdio.h.

262{ return has_any_of(_IOBUFFER_USER); }

◆ is_in_use()

bool __crt_stdio_stream::is_in_use ( ) const
throw (
)
inline

Definition at line 222 of file corecrt_internal_stdio.h.

223 {
224 return (get_flags() & _IOALLOCATED) != 0;
225 }

◆ is_string_backed()

bool __crt_stdio_stream::is_string_backed ( ) const
throw (
)
inline

◆ lock()

void __crt_stdio_stream::lock ( ) const
throw (
)
inline

Definition at line 248 of file corecrt_internal_stdio.h.

_CRTIMP void __cdecl _lock_file(_Inout_ FILE *_File)

◆ lowio_handle()

int __crt_stdio_stream::lowio_handle ( ) const
throw (
)
inline

Definition at line 270 of file corecrt_internal_stdio.h.

270{ return __crt_interlocked_read(&_stream->_file); }

◆ operator->()

__crt_stdio_stream_data * __crt_stdio_stream::operator-> ( ) const
throw (
)
inline

Definition at line 274 of file corecrt_internal_stdio.h.

274{ return _stream; }

◆ public_stream()

◆ set_flags()

bool __crt_stdio_stream::set_flags ( long const  flags) const
throw (
)
inline

Definition at line 254 of file corecrt_internal_stdio.h.

254{ return (_InterlockedOr(&_stream->_flags, flags) & flags) != 0; }
long _InterlockedOr(_Interlocked_operand_ long volatile *_Value, long _Mask)

Referenced by _Success_().

◆ try_allocate()

bool __crt_stdio_stream::try_allocate ( )
throw (
)
inline

Definition at line 232 of file corecrt_internal_stdio.h.

233 {
235 }

◆ unlock()

void __crt_stdio_stream::unlock ( ) const
throw (
)
inline

Definition at line 249 of file corecrt_internal_stdio.h.

_CRTIMP void __cdecl _unlock_file(_Inout_ FILE *_File)

Referenced by _Success_().

◆ unset_flags()

bool __crt_stdio_stream::unset_flags ( long const  flags) const
throw (
)
inline

Definition at line 255 of file corecrt_internal_stdio.h.

255{ return (_InterlockedAnd(&_stream->_flags, ~flags) & flags) != 0; }
volatile char *const const char modify _InterlockedAnd
Definition: intrin_ppc.h:267

◆ valid()

bool __crt_stdio_stream::valid ( ) const
throw (
)
inline

Member Data Documentation

◆ _stream


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