Public Types | Public Member Functions | Static Public Attributes | Protected Member Functions | List of all members
ustl::ios_base Class Reference

Defines types and constants used by all stream classes. More...

#include <uios.h>

Inheritance diagram for ustl::ios_base:
ustl::fstream ustl::ios ustl::istream ustl::ostream ustl::istringstream ustl::ostringstream ustl::ifstream ustl::ofstream

Public Types

enum  fmtflags {
  boolalpha = (1 << 0),
  dec = (1 << 1),
  fixed = (1 << 2),
  hex = (1 << 3),
  internal = (1 << 4),
  left = (1 << 5),
  oct = (1 << 6),
  right = (1 << 7),
  scientific = (1 << 8),
  showbase = (1 << 9),
  showpoint = (1 << 10),
  showpos = (1 << 11),
  skipws = (1 << 12),
  unitbuf = (1 << 13),
  uppercase = (1 << 14),
  adjustfield = (1 << 15),
  basefield = (1 << 16),
  floatfield = (1 << 17)
}
 Used to set parameters for stringstreams. More...
 
enum  openmode_bits {
  in = (1 << 0),
  out = (1 << 1),
  app = (1 << 2),
  ate = (1 << 3),
  binary = (1 << 4),
  trunc = (1 << 5)
}
 For file-based streams, specifies fd mode.
 
enum  seekdir {
  beg,
  cur,
  end
}
 Seek directions, equivalent to SEEK_SET, SEEK_CUR, and SEEK_END.
 
enum  iostate_bits {
  goodbit = 0,
  badbit = (1 << 0),
  eofbit = (1 << 1),
  failbit = (1 << 2)
}
 I/O state bitmasks.
 
typedef uint32_t openmode
 Holds openmode_bits.
 
typedef uint32_t iostate
 Holds iostate_bits for a file stream.
 
typedef file_exception failure
 Thrown by fstream on errors.
 

Public Member Functions

iostate rdstate (void) const
 
bool bad (void) const
 
bool good (void) const
 
bool fail (void) const
 
bool eof (void) const
 
bool operator! (void) const
 
 operator void * (void) const
 
void clear (iostate v=goodbit)
 
void setstate (iostate v)
 
iostate exceptions (void) const
 
iostate exceptions (iostate v)
 

Static Public Attributes

static const char c_DefaultDelimiters [16] = DEFAULT_DELIMITERS
 Default word delimiters for stringstreams.
 

Protected Member Functions

bool set_and_throw (iostate v)
 
void overrun (const char *op, const char *type, uint32_t n, uint32_t p, uint32_t rem)
 Checks that n bytes are available in the stream, or else throws.
 

Detailed Description

Defines types and constants used by all stream classes.

Member Enumeration Documentation

Used to set parameters for stringstreams.

Enumerator
boolalpha 

Boolean values printed as text.

dec 

Decimal number output.

fixed 

Fixed-point float output.

hex 

Hexadecimal number output.

left 

Left alignment.

oct 

Octal number output.

right 

Right alignment.

scientific 

Scientific float format.

showbase 

Add 0x or 0 prefixes on hex and octal numbers.

showpoint 

Print decimal point.

skipws 

Skip whitespace when reading.


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

Generated on Mon Sep 28 2015 17:58:50 for uSTL by Doxygen 1.8.10