Back to Arangodb

Array Devices

3rdParty/boost/1.78.0/libs/iostreams/doc/classes/array.html

3.12.9.14.7 KB
Original Source

Array Devices

OverviewImplementationHeadersReferenceClass template basic_array_sourceClass template basic_array_sinkClass template basic_arrayAcknowledgments


Overview

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.

Implementation

The array Devices are implemented as Direct Devices in order to provide efficient unbuffered access to the underlying character sequences.

Headers

<boost/iostreams/device/array.hpp>

Reference

Class template basic_array_source

Description

Model of Source providing read-only access to a sequence of characters in memory.

Synopsis

namespaceboost {namespaceiostreams {template<typename[Ch](#array_source_params)>class[basic\_array\_source](#array_source_params){public:typedefCh char_type;typedefsource_tag category;template<intN>[basic\_array\_source](#array_source_constructors)(char_type (&)[N]);[basic\_array\_source](#array_source_constructors)(constchar_type* begin,constchar_type* end);[basic\_array\_source](#array_source_constructors)(constchar_type* begin, std::size_t length);...};typedefbasic_array_source<char>array\_source;typedefbasic_array_source<wchar\_t>warray\_source;

} }// End namespace boost::io

Template parameters

| Ch | - | The character type. |

basic_array_source::basic_array_source

template<intN> basic_array_source(char_type (&)[N]);
basic_array_source(constchar_type* begin,constchar_type* end);
basic_array_source(constchar_type* begin, std::size_t length);

Constructs a basic_array_source to read from the indicated character sequence.

Class template basic_array_sink

Description

Model of Sink providing write-only access to a sequence of characters in memory.

Synopsis

namespaceboost {namespaceiostreams {template<typename[Ch](#array_sink_params)>class[basic\_array\_sink](#array_sink_params){public:typedefCh char_type;typedefsink_tag category;template<intN>[basic\_array\_sink](#array_sink_constructors)(char_type (&)[N]);[basic\_array\_sink](#array_sink_constructors)(char_type* begin, char_type* end);[basic\_array\_sink](#array_sink_constructors)(char_type* begin, std::size_t length);// Additional nember functions};typedefbasic_array_sink<char>array\_sink;typedefbasic_array_sink<wchar\_t>warray\_sink;

} }// End namespace boost::io

Template parameters

| Ch | - | The character type. |

basic_array_sink::basic_array_sink

template<intN> 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.

Class template basic_array

Description

Model of SeekableDevice providing read-write access to a sequence of characters in memory.

Synopsis

namespaceboost {namespaceiostreams {template<typename[Ch](#array_params)>class[basic\_array](#array_params){public:typedefCh char_type;typedefseekable_device_tag category;template<intN>[basic\_array](#array_constructor)(char_type (&)[N]);[basic\_array](#array_constructor)(char_type* begin, char_type* end);[basic\_array](#array_constructor)(char_type* begin, std::size_t length);// Additional nember functions};typedefbasic_array<char>array;typedefbasic_array<wchar\_t>warray;

} }// End namespace boost::io

Template parameters

| Ch | - | The character type. |

array::array

template<intN> 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.

Acknowledgments

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)