Back to Arangodb

Function Template restrict

3rdParty/boost/1.78.0/libs/iostreams/doc/functions/restrict.html

3.12.9.14.3 KB
Original Source

Function Template restrict

DescriptionHeadersReference


Description

Given a Filter or Device that provides access to a single character sequence, we can construct a second Filter or Device which provides access to contiguous subsequence of the the original sequence. This second Filter or Device is called a restriction of the original device. Restrictions are represented by instances of the class template restriction. The function template resrict is an object generator which returns an appropriate instance of resriction when passed a Filter or Device and a pair of values indicating the endpoints of the restricted subsequence.

The mode of a resriction is the same as that of the underlying component. A resriction is Closable, Flushable, Localizable and OptimallyBuffered.

The function template slice is available as an alias of restrict, for platforms that treat restrict as a keyword.

Headers

<boost/iostreams/restrict.hpp>

Reference

Synopsis

namespaceboost {namespaceiostreams {template<typename[Component](#restriction_template_params)>class[restriction](#restriction){public:typedeftypename[char\_type\_of](../guide/traits.html#char_type_of_ref)<Component>::type char_type;typedefimplementation-definedmode;[restriction](#restriction_ctor)( [const] Component& component,[stream\_offset](positioning.html#synopsis)off,[stream\_offset](positioning.html#synopsis)len =-1);// Filter or Device member functions};template<typename[Component](#restrict_template_params)>[restriction](#restriction)<Component>[restrict](#restrict)( [const] Component& component,[stream\_offset](positioning.html#synopsis)off,[stream\_offset](positioning.html#synopsis)len =-1);

} } // End namespace boost::io

Class Template restriction

Template parameters

| | | | Component | - | A model of Filter or Device |

restriction::restriction

restriction( [const] Component& component,[stream\_offset](positioning.html#synopsis)off,[stream\_offset](positioning.html#synopsis)len =-1);

Constructs an instance of restriction based on the given component and offsets. The parameters have the following interpretation:

| | | | component | - | The Filter or Device to be restricted. If Component is a stream or stream buffer type, the function parameter is a non-const reference; otherwise it is a const reference. | | off | - | The offset of the beginning of the restricted character sequence. | | len | - | The length of the restricted character sequence. A value of -1 indicates that the end of the restricted sequence should be the same as that of the unrestricted sequence. |

Function Template restrict

template<typenameComponent>
restriction<Component> 
restrict( [const] Component& component,[stream\_offset](positioning.html#synopsis)off,[stream\_offset](positioning.html#synopsis)len =-1);

Template parameters

| | | | Component | - | A model of Filter or Device |

Constructs an instance of an appropriate specialization of restriction based on the given component and offsets. The parameters have the following interpretation:

| | | | component | - | The Filter or Device to be restricted. If Component is a stream or stream buffer type, the function parameter is a non-const reference; otherwise it is a const reference. | | off | - | The offset of the beginning of the restricted character sequence. | | len | - | The length of the restricted character sequence. A value of -1 indicates that the end of the restricted sequence should be the same as that of the unrestricted sequence. |


© 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)