x
Yes
No
Do you want to visit DriveHQ English website?
Inicio
Características
Precios
Prueba gratuita
Software cliente
Acerca de nosotros
Servidor de archivos
|
Solución de copias de seguridad
|
Servidor FTP
|
Servidor de correo electrónico
|
Alojamiento web
|
Software cliente
Servidor de archivos
Solución de copia de seguridad
Servidor FTP
Servidor de correo electrónico
Alojamiento web
Software cliente
stdio.hpp - Hosted on DriveHQ Cloud IT Platform
Arriba
Subir
Descargar
Compartir
Publicar
Nueva carpeta
Nuevo archivo
Copiar
Cortar
Eliminar
Pegar
Clasificación
Actualizar
Ruta de la carpeta: \\game3dprogramming\materials\GameFactory\GameFactoryDemo\references\boost_1_35_0\boost\iostreams\filter\stdio.hpp
Girar
Efecto
Propiedad
Historial
// (C) Copyright 2008 CodeRage, LLC (turkanis at coderage dot com) // (C) Copyright 2005-2007 Jonathan Turkanis // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt.) // See http://www.boost.org/libs/iostreams for documentation. // Based on the work of Christopher Diggins. #ifndef BOOST_IOSTREAMS_STDIO_FILTER_HPP_INCLUDED #define BOOST_IOSTREAMS_STDIO_FILTER_HPP_INCLUDED #if defined(_MSC_VER) && (_MSC_VER >= 1020) # pragma once #endif #include
#include
// allocator. #include
#include
#include
#include
#include
#include
#include
#include
#include
namespace boost { namespace iostreams { namespace detail { } // End namespace detail. template
> class basic_stdio_filter : public aggregate_filter
{ private: typedef aggregate_filter
base_type; public: typedef typename base_type::char_type char_type; typedef typename base_type::category category; typedef typename base_type::vector_type vector_type; private: static std::istream& standard_input(char*) { return std::cin; } static std::ostream& standard_output(char*) { return std::cout; } #ifndef BOOST_IOSTREAMS_NO_WIDE_STREAMS static std::wistream& standard_input(wchar_t*) { return std::wcin; } static std::wostream& standard_output(wchar_t*) { return std::wcout; } #endif // BOOST_IOSTREAMS_NO_WIDE_STREAMS struct scoped_redirector { // Thanks to Maxim Egorushkin. typedef BOOST_IOSTREAMS_CHAR_TRAITS(Ch) traits_type; typedef BOOST_IOSTREAMS_BASIC_IOS(Ch, traits_type) ios_type; typedef BOOST_IOSTREAMS_BASIC_STREAMBUF(Ch, traits_type) streambuf_type; scoped_redirector( ios_type& ios, streambuf_type* newbuf ) : ios_(ios), old_(ios.rdbuf(newbuf)) { } ~scoped_redirector() { ios_.rdbuf(old_); } scoped_redirector& operator=(const scoped_redirector&); ios_type& ios_; streambuf_type* old_; }; virtual void do_filter() = 0; virtual void do_filter(const vector_type& src, vector_type& dest) { stream_buffer< basic_array_source
> srcbuf(&src[0], &src[0] + src.size()); stream_buffer< back_insert_device
> destbuf(iostreams::back_inserter(dest)); scoped_redirector redirect_input(standard_input((Ch*)0), &srcbuf); scoped_redirector redirect_output(standard_output((Ch*)0), &destbuf); do_filter(); } }; BOOST_IOSTREAMS_PIPABLE(basic_stdio_filter, 2) typedef basic_stdio_filter
stdio_filter; typedef basic_stdio_filter
wstdio_wfilter; } } // End namespaces iostreams, boost. #endif // #ifndef BOOST_IOSTREAMS_STDIO_FILTER_HPP_INCLUDED
stdio.hpp
Dirección de la página
Dirección del archivo
Anterior
8/11
Siguiente
Descargar
( 3 KB )
Comments
Total ratings:
0
Average rating:
No clasificado
of 10
Would you like to comment?
Join now
, or
Logon
if you are already a member.