basic_array_sourcebasic_array_sinkbasic_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_sourceModel 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_sourcetemplate<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_sinkModel 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_sinktemplate<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_arrayModel 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::arraytemplate<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.
Revised 02 Feb 2008
© 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)