basic_array_source
basic_array_sink
basic_array
The class templates basic_array_source
, basic_array_sink
and basic_array
provide access to a sequence of characters in memory. The array Devices do not manage the lifetimes of the underlying character sequences.
The array Devices are implemented as Direct Devices in order to provide efficient unbuffered access to the underlying character sequences.
<boost/iostreams/device/array.hpp>
basic_array_source
Model of Source providing read-only access to a sequence of characters in memory.
namespace boost { namespace iostreams { template<typename Ch> class basic_array_source { public: typedef Ch char_type; typedef source_tag category; template<int N> basic_array_source(char_type (&)[N]); basic_array_source(const char_type* begin, const char_type* end); basic_array_source(const char_type* begin, std::size_t length); ... }; typedef basic_array_source<char> array_source; typedef basic_array_source<wchar_t> warray_source; } } // End namespace boost::io
Ch | - | The character type. |
basic_array_source::basic_array_source
template<int N> basic_array_source(char_type (&)[N]); basic_array_source(const char_type* begin, const char_type* end); basic_array_source(const char_type* begin, std::size_t length);
Constructs a basic_array_source
to read from the indicated character sequence.
basic_array_sink
Model of Sink providing write-only access to a sequence of characters in memory.
namespace boost { namespace iostreams { template<typename Ch> class basic_array_sink { public: typedef Ch char_type; typedef sink_tag category; template<int N> basic_array_sink(char_type (&)[N]); basic_array_sink(char_type* begin, char_type* end); basic_array_sink(char_type* begin, std::size_t length); // Additional nember functions }; typedef basic_array_sink<char> array_sink; typedef basic_array_sink<wchar_t> warray_sink; } } // End namespace boost::io
Ch | - | The character type. |
basic_array_sink::basic_array_sink
template<int N> basic_array_sink(char_type (&)[N]); basic_array_sink(char_type* begin, char_type* end); basic_array_sink(char_type* begin, std::size_t length);
Constructs an basic_array_sink
to write to the indicated character sequence.
basic_array
Model of SeekableDevice providing read-write access to a sequence of characters in memory.
namespace boost { namespace iostreams { template<typename Ch> class basic_array { public: typedef Ch char_type; typedef seekable_device_tag category; template<int N> basic_array(char_type (&)[N]); basic_array(char_type* begin, char_type* end); basic_array(char_type* begin, std::size_t length); // Additional nember functions }; typedef basic_array<char> array; typedef basic_array<wchar_t> warray; } } // End namespace boost::io
Ch | - | The character type. |
array::array
template<int N> basic_array(char_type (&)[N]); basic_array(char_type* begin, char_type* end); basic_array(char_type* begin, std::size_t length);
Constructs a basic_array
to access the indicated character sequence.
The concept of Devices which provide unbuffered access to character sequences was suggested by Daryle Walker's array_stream
template.
© Copyright 2008 CodeRage, LLC
© Copyright 2004-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)