array_sourcearray_sinkarray
The classes array_source, array_sink and array provide access to a sequence of characters in memory. They 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>array_sourceModel of Source providing read-only access to a sequence of characters in memory.
namespace boost { namespace iostreams { template<typename Ch> class array_source { public: typedef Ch char_type; typedef source_tag io_category; template<int N> array_source(char_type (&)[N]); array_source(char_type* begin, char_type* end); array_source(char_type* begin, std::size_t length); array_source(const char_type* begin, const char_type* end); array_source(const char_type* begin, std::size_t length); ... }; } } // End namespace boost::io
| Ch | - | The character type. |
array_source::array_sourcetemplate<int N> array_source(char_type (&)[N]); array_source(char_type* begin, char_type* end); array_source(char_type* begin, std::size_t length); array_source(const char_type* begin, const char_type* end); array_source(const char_type* begin, std::size_t length);
Constructs an array_source to read from the indicated character sequence.
array_sinkModel of Sink providing write-only access to a sequence of characters in memory.
namespace boost { namespace iostreams { template<typename Ch> class array_sink { public: typedef Ch char_type; typedef sink_tag io_category; template<int N> array_sink(char_type (&)[N]); array_sink(char_type* begin, char_type* end); array_sink(char_type* begin, std::size_t length); // Additional nember functions }; } } // End namespace boost::io
| Ch | - | The character type. |
array_sink::array_sinktemplate<int N> array_sink(char_type (&)[N]); array_sink(char_type* begin, char_type* end); array_sink(char_type* begin, std::size_t length);
Constructs an array_sink to write to the indicated character sequence.
arrayModel of SeekableDevice providing read-write access to a sequence of characters in memory.
namespace boost { namespace iostreams { template<typename Ch> class array { public: typedef Ch char_type; typedef seekable_device_tag io_category; template<int N> array(char_type (&)[N]); array(char_type* begin, char_type* end); array(char_type* begin, std::size_t length); // Additional nember functions }; } } // End namespace boost::io
| Ch | - | The character type. |
array::arraytemplate<int N> array(char_type (&)[N]); array(char_type* begin, char_type* end); array(char_type* begin, std::size_t length);
Constructs an 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 20 May, 2004
© Copyright Jonathan Turkanis, 2004
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)