mirror of
https://github.com/boostorg/variant.git
synced 2026-01-28 19:52:13 +00:00
105 lines
3.2 KiB
XML
105 lines
3.2 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<!DOCTYPE header PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN"
|
|
"http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
|
|
<header name="boost/variant/visitor_ptr.hpp">
|
|
<namespace name="boost">
|
|
|
|
<class name="bad_visit">
|
|
<inherit access="public">
|
|
<classname>std::exception</classname>
|
|
</inherit>
|
|
|
|
<purpose>The exception thrown in the event of a visitor
|
|
unable to handle the visited value.</purpose>
|
|
|
|
<method name="what" specifiers="virtual" cv="const">
|
|
<type>const char *</type>
|
|
</method>
|
|
</class>
|
|
|
|
<class name="visitor_ptr_t">
|
|
<template>
|
|
<template-type-parameter name="ArgumentType"/>
|
|
<template-type-parameter name="ResultType"/>
|
|
</template>
|
|
|
|
<inherit access="public">
|
|
<classname alt="boost::static_visitor">
|
|
static_visitor<ResultType>
|
|
</classname>
|
|
</inherit>
|
|
|
|
<constructor>
|
|
<parameter>
|
|
<paramtype>ResultType (*)(ArgumentType)</paramtype>
|
|
</parameter>
|
|
|
|
<effects>
|
|
<simpara>Constructs the visitor with the given function.</simpara>
|
|
</effects>
|
|
</constructor>
|
|
|
|
<method-group name="static visitor interface">
|
|
<overloaded-method name="operator()">
|
|
<signature>
|
|
<type>
|
|
<link linkend="static_visitor.result_type">result_type</link>
|
|
</type>
|
|
|
|
<parameter name="operand">
|
|
<paramtype><emphasis>argument_forward_type</emphasis></paramtype>
|
|
</parameter>
|
|
</signature>
|
|
|
|
<signature>
|
|
<template>
|
|
<template-type-parameter name="U"/>
|
|
</template>
|
|
|
|
<type>void</type>
|
|
|
|
<parameter>
|
|
<paramtype>const U&</paramtype>
|
|
</parameter>
|
|
</signature>
|
|
|
|
<effects>
|
|
<simpara>If passed a value or reference of type
|
|
<code>ArgumentType</code>, it invokes the function given at
|
|
construction, appropriately forwarding
|
|
<code>operand</code>.</simpara>
|
|
</effects>
|
|
<returns>Returns the result of the function invocation.</returns>
|
|
|
|
<throws>
|
|
<simpara>The overload taking a value or reference of type
|
|
<code>ArgumentType</code> throws if the invoked function throws.
|
|
The overload taking all other values <emphasis>always</emphasis>
|
|
throws <code><classname>bad_visit</classname></code>.</simpara>
|
|
</throws>
|
|
</overloaded-method>
|
|
</method-group>
|
|
</class>
|
|
|
|
<function name="visitor_ptr">
|
|
<template>
|
|
<template-type-parameter name="R"/>
|
|
<template-type-parameter name="T"/>
|
|
</template>
|
|
|
|
<type><classname>visitor_ptr_t</classname><T,R></type>
|
|
|
|
<parameter>
|
|
<paramtype>R (*)(T)</paramtype>
|
|
</parameter>
|
|
|
|
<returns>
|
|
<simpara>Returns a <classname>visitor_ptr_t</classname>
|
|
visitor object that, when applied, invokes the given function.</simpara>
|
|
</returns>
|
|
|
|
<throws>Does not throw. However, returned visitor may throw when applied.</throws>
|
|
</function>
|
|
|
|
</namespace>
|
|
</header> |