Archivo de encabezado de la biblioteca estándar <ios>
De cppreference.com
Este archivo de encabezado es parte de la biblioteca de Entrada/Salida.
Incluye | ||
Declaraciones adelantadas de todas las clases en la biblioteca de entrada/salida. | ||
Clases | ||
Maneja el formato de banderas y las excepciones de entrada/salida. (clase) | ||
Administra un búfer de flujo arbitrario. (plantilla de clase) | ||
Representa una posición absoluta en un flujo o un archivo. (plantilla de clase) | ||
(C++11) |
los códigos IO secuencia de error Original: the IO stream error codes The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (enum) | |
Extiende el rasgo de tipo std::is_error_code_enum para identificar códigos de error de flujos de entrada/salida. (especialización de plantilla de clase) | ||
Representa la posición relativa en el archivo o flujo (desplazamiento desde fpos , suficiente para representar cualquier tamaño de archivo. (typedef) | ||
Representa el número de caracteres transferido en una operación de E/S o el tamaño de un búfer de E/S. (typedef) | ||
Funciones | ||
(C++11) |
identifica la categoría de error iostream Original: identifies the iostream error category The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (función) | |
Construye un código de error de un flujo de entrada/salida. (función) | ||
Construye un objeto error_condition de un flujo de entrada/salida. (función) | ||
cambia entre la representación textual y numérica de booleanos Original: switches between textual and numeric representation of booleans The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (función) | ||
Controla si se utiliza prefijo para indicar base numérica. (función) | ||
controla si el punto decimal se incluye siempre en representación de punto flotante Original: controls whether decimal point is always included in floating-point representation The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (función) | ||
controla si el signo + utilizados con números no negativosOriginal: controls whether the + sign used with non-negative numbersThe text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (función) | ||
controla si los principales espacios en blanco se pasa por alto en la entrada Original: controls whether leading whitespace is skipped on input The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (función) | ||
controls whether uppercase characters are used with some output formats (función) | ||
Controla si la salida se vacía después de cada operación. (función) | ||
define la posición de caracteres de relleno Original: sets the placement of fill characters The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (función) | ||
Cambia la base utilizada para la E/S de enteros. (función) | ||
(C++11)(C++11) |
Los cambios de formato utilizado para punto flotante de I / O Original: changes formatting used for floating-point I/O The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (función) |
[editar] Sinopsis
#include <iosfwd> namespace std { using streamoff = /* definido por la implementación */; using streamsize = /* definido por la implementación */; template<class StateT> class fpos; class ios_base; template<class CharT, class Traits = char_traits<CharT>> class basic_ios; // manipuladores ios_base& boolalpha (ios_base& str); ios_base& noboolalpha(ios_base& str); ios_base& showbase (ios_base& str); ios_base& noshowbase (ios_base& str); ios_base& showpoint (ios_base& str); ios_base& noshowpoint(ios_base& str); ios_base& showpos (ios_base& str); ios_base& noshowpos (ios_base& str); ios_base& skipws (ios_base& str); ios_base& noskipws (ios_base& str); ios_base& uppercase (ios_base& str); ios_base& nouppercase(ios_base& str); ios_base& unitbuf (ios_base& str); ios_base& nounitbuf (ios_base& str); // adjustfield (ajuste de campo) ios_base& internal (ios_base& str); ios_base& left (ios_base& str); ios_base& right (ios_base& str); // basefield (campo base) ios_base& dec (ios_base& str); ios_base& hex (ios_base& str); ios_base& oct (ios_base& str); // floatfield (campo flotante) ios_base& fixed (ios_base& str); ios_base& scientific (ios_base& str); ios_base& hexfloat (ios_base& str); ios_base& defaultfloat(ios_base& str); // informe de errores enum class io_errc { stream = 1 }; template<> struct is_error_code_enum<io_errc> : public true_type { }; error_code make_error_code(io_errc e) noexcept; error_condition make_error_condition(io_errc e) noexcept; const error_category& iostream_category() noexcept; }
[editar] Clase std::ios_base
namespace std { class ios_base { public: class failure; // véase descripción // fmtflags (banderas de formato) using fmtflags = /*bitmask-type-1*/; static constexpr fmtflags boolalpha = /* no especificado */; static constexpr fmtflags dec = /* no especificado */; static constexpr fmtflags fixed = /* no especificado */; static constexpr fmtflags hex = /* no especificado */; static constexpr fmtflags internal = /* no especificado */; static constexpr fmtflags left = /* no especificado */; static constexpr fmtflags oct = /* no especificado */; static constexpr fmtflags right = /* no especificado */; static constexpr fmtflags scientific = /* no especificado */; static constexpr fmtflags showbase = /* no especificado */; static constexpr fmtflags showpoint = /* no especificado */; static constexpr fmtflags showpos = /* no especificado */; static constexpr fmtflags skipws = /* no especificado */; static constexpr fmtflags unitbuf = /* no especificado */; static constexpr fmtflags uppercase = /* no especificado */; static constexpr fmtflags adjustfield = /* véase descripción */; static constexpr fmtflags basefield = /* véase descripción */; static constexpr fmtflags floatfield = /* véase descripción */; // iostate using iostate = /*bitmask-type-2*/; static constexpr iostate badbit = /* no especificado */; static constexpr iostate eofbit = /* no especificado */; static constexpr iostate failbit = /* no especificado */; static constexpr iostate goodbit = /* véase descripción */; // openmode using openmode = /*bitmask-type-3*/; static constexpr openmode app = /* no especificado */; static constexpr openmode ate = /* no especificado */; static constexpr openmode binary = /* no especificado */; static constexpr openmode in = /* no especificado */; static constexpr openmode out = /* no especificado */; static constexpr openmode trunc = /* no especificado */; // seekdir using seekdir = /*bitmask-type-4*/; static constexpr seekdir beg = /* no especificado */; static constexpr seekdir cur = /* no especificado */; static constexpr seekdir end = /* no especificado */; class Init; // estado fmtflags fmtflags flags() const; fmtflags flags(fmtflags fmtfl); fmtflags setf(fmtflags fmtfl); fmtflags setf(fmtflags fmtfl, fmtflags mask); void unsetf(fmtflags mask); streamsize precision() const; streamsize precision(streamsize prec); streamsize width() const; streamsize width(streamsize wide); // configuraciones regionales locale imbue(const locale& loc); locale getloc() const; // almacenamiento static int xalloc(); long& iword(int idx); void*& pword(int idx); // destructor virtual ~ios_base(); // devoluciones de llamada enum event { erase_event, imbue_event, copyfmt_event }; using event_callback = void (*)(event, ios_base&, int idx); void register_callback(event_callback fn, int idx); ios_base(const ios_base&) = delete; ios_base& operator=(const ios_base&) = delete; static bool sync_with_stdio(bool sync = true); protected: ios_base(); private: static int index; // solo exposición long* iarray; // solo exposición void** parray; // solo exposición }; }
[editar] Clase std::ios_base::failure
namespace std { class ios_base::failure : public system_error { public: explicit failure(const string& msg, const error_code& ec = io_errc::stream); explicit failure(const char* msg, const error_code& ec = io_errc::stream); }; }
[editar] Clase std::ios_base::Init
namespace std { class ios_base::Init { public: Init(); Init(const Init&) = default; ~Init(); Init& operator=(const Init&) = default; private: static int init_cnt; // solo exposición }; }
[editar] Plantilla de clase std::fpos
namespace std { template<class StateT> class fpos { public: // members StateT state() const; void state(stateT); private; StateT st; // solo exposición }; }
[editar] Plantilla de clase std::basic_ios
namespace std { template<class CharT, class Traits = char_traits<CharT>> class basic_ios : public ios_base { public: using char_type = CharT; using int_type = typename Traits::int_type; using pos_type = typename Traits::pos_type; using off_type = typename Traits::off_type; using traits_type = Traits; // funciones de banderas explicit operator bool() const; bool operator!() const; iostate rdstate() const; void clear(iostate state = goodbit); void setstate(iostate state); bool good() const; bool eof() const; bool fail() const; bool bad() const; iostate exceptions() const; void exceptions(iostate except); // constructor/destructor explicit basic_ios(basic_streambuf<CharT, Traits>* sb); virtual ~basic_ios(); // miembros basic_ostream<CharT, Traits>* tie() const; basic_ostream<CharT, Traits>* tie(basic_ostream<CharT, Traits>* tiestr); basic_streambuf<CharT, Traits>* rdbuf() const; basic_streambuf<CharT, Traits>* rdbuf(basic_streambuf<CharT, Traits>* sb); basic_ios& copyfmt(const basic_ios& rhs); char_type fill() const; char_type fill(char_type ch); locale imbue(const locale& loc); char narrow(char_type c, char dfault) const; char_type widen(char c) const; basic_ios(const basic_ios&) = delete; basic_ios& operator=(const basic_ios&) = delete; protected: basic_ios(); void init(basic_streambuf<CharT, Traits>* sb); void move(basic_ios& rhs); void move(basic_ios&& rhs); void swap(basic_ios& rhs) noexcept; void set_rdbuf(basic_streambuf<CharT, Traits>* sb); }; }