3rdParty/boost/1.78.0/libs/iostreams/doc/classes/device.html
deviceThe class template device, its subclass wdevice and their specializations source, sink, wsource and wsink are provided by the Iostreams library to ease the definitions of new models of the various Device Concepts. These templates and typedefs are intended to be used as base classes for user-defined Devices. They supply the member types char_type and category used by the Iostreams library.
The supplied category member is convertible to closable_tag and to localizable_tag. This allows users to define models of the concepts Closable and Localizable simply by providing definitions of member functions close and imbue.
<boost/iostreams/concepts.hpp>
namespaceboost{namespaceiostreams {template<typenameMode,typenameCh =char>struct[device](#description);template<typenameMode,typenameCh =wchar\_t>structwdevice: device<Mode, Ch> { };typedefdevice<input>source;typedefdevice<output>sink;typedefwdevice<input>wsource;typedefwdevice<output>wsink;template<typename[Mode](#template_params),typename[Ch](#template_params)=char>struct[device](#description){typedefCh char_type;typedef[see below](#category)category;void[close](#close)();void[close](#close)(std::ios_base::openmode);void[imbue](#imbue)(conststd::locale&);
};
} }// End namespace boost::io
| | | | Mode | - | A mode tag. | | Ch | - | The character type |
device::categorytypedefsee belowcategory;
A category tag convertible to Mode, device_tag, closable_tag and localizable_tag.
device::closevoid[close](#close)();void[close](#close)(std::ios_base::openmode);
Both overloads are implemented as no-ops. The second is available only if Mode is convertible to bidirectional. The first is available only if Mode is not convertible to bidirectional.
Required by Closable.
device::imbuevoid[imbue](#imbue)(conststd::locale&);
Implemented as a no-op. Required by Localizable.
© 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)