blob: 95bea32f71b2dfe03ffab66d83f5fbc0b87e9d67 [file] [log] [blame]
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
<title>Class stl_type_index</title>
<link rel="stylesheet" href="../../../../doc/src/boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.78.1">
<link rel="home" href="../../index.html" title="The Boost C++ Libraries BoostBook Documentation Subset">
<link rel="up" href="../../boost_typeindex_header_reference.html#header.boost.type_index.stl_type_index_hpp" title="Header &lt;boost/type_index/stl_type_index.hpp&gt;">
<link rel="prev" href="ctti_type_index.html" title="Class ctti_type_index">
<link rel="next" href="type_index_facade.html" title="Class template type_index_facade">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr>
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../boost.png"></td>
<td align="center"><a href="../../../../index.html">Home</a></td>
<td align="center"><a href="../../../../libs/libraries.htm">Libraries</a></td>
<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td>
<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td>
<td align="center"><a href="../../../../more/index.htm">More</a></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="ctti_type_index.html"><img src="../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../../boost_typeindex_header_reference.html#header.boost.type_index.stl_type_index_hpp"><img src="../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="type_index_facade.html"><img src="../../../../doc/src/images/next.png" alt="Next"></a>
</div>
<div class="refentry">
<a name="boost.typeindex.stl_type_index"></a><div class="titlepage"></div>
<div class="refnamediv">
<h2><span class="refentrytitle">Class stl_type_index</span></h2>
<p>boost::typeindex::stl_type_index</p>
</div>
<h2 xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="refsynopsisdiv-title">Synopsis</h2>
<div xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="refsynopsisdiv"><pre class="synopsis"><span class="comment">// In header: &lt;<a class="link" href="../../boost_typeindex_header_reference.html#header.boost.type_index.stl_type_index_hpp" title="Header &lt;boost/type_index/stl_type_index.hpp&gt;">boost/type_index/stl_type_index.hpp</a>&gt;
</span>
<span class="keyword">class</span> <a class="link" href="stl_type_index.html" title="Class stl_type_index">stl_type_index</a> <span class="special">:</span> <span class="keyword">public</span> boost::typeindex::type_index_facade&lt; stl_type_index, std::type_info &gt;
<span class="special">{</span>
<span class="keyword">public</span><span class="special">:</span>
<span class="comment">// types</span>
<span class="keyword">typedef</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">type_info</span> <a name="boost.typeindex.stl_type_index.type_info_t"></a><span class="identifier">type_info_t</span><span class="special">;</span>
<span class="comment">// <a class="link" href="stl_type_index.html#boost.typeindex.stl_type_indexconstruct-copy-destruct">construct/copy/destruct</a></span>
<a class="link" href="stl_type_index.html#idp217849376-bb"><span class="identifier">stl_type_index</span></a><span class="special">(</span><span class="special">)</span> <span class="keyword">noexcept</span><span class="special">;</span>
<a class="link" href="stl_type_index.html#idp217849936-bb"><span class="identifier">stl_type_index</span></a><span class="special">(</span><span class="keyword">const</span> <span class="identifier">type_info_t</span> <span class="special">&amp;</span><span class="special">)</span> <span class="keyword">noexcept</span><span class="special">;</span>
<span class="comment">// <a class="link" href="stl_type_index.html#idp146777392-bb">public member functions</a></span>
<span class="keyword">const</span> <span class="identifier">type_info_t</span> <span class="special">&amp;</span> <a class="link" href="stl_type_index.html#idp146777952-bb"><span class="identifier">type_info</span></a><span class="special">(</span><span class="special">)</span> <span class="keyword">const</span> <span class="keyword">noexcept</span><span class="special">;</span>
<span class="keyword">const</span> <span class="keyword">char</span> <span class="special">*</span> <a class="link" href="stl_type_index.html#idp146779072-bb"><span class="identifier">raw_name</span></a><span class="special">(</span><span class="special">)</span> <span class="keyword">const</span> <span class="keyword">noexcept</span><span class="special">;</span>
<span class="keyword">const</span> <span class="keyword">char</span> <span class="special">*</span> <a class="link" href="stl_type_index.html#idp146780192-bb"><span class="identifier">name</span></a><span class="special">(</span><span class="special">)</span> <span class="keyword">const</span> <span class="keyword">noexcept</span><span class="special">;</span>
<span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span> <a class="link" href="stl_type_index.html#idp146781312-bb"><span class="identifier">pretty_name</span></a><span class="special">(</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span>
<span class="identifier">std</span><span class="special">::</span><span class="identifier">size_t</span> <a class="link" href="stl_type_index.html#idp146782432-bb"><span class="identifier">hash_code</span></a><span class="special">(</span><span class="special">)</span> <span class="keyword">const</span> <span class="keyword">noexcept</span><span class="special">;</span>
<span class="keyword">bool</span> <a class="link" href="stl_type_index.html#idp217844704-bb"><span class="identifier">equal</span></a><span class="special">(</span><span class="keyword">const</span> <a class="link" href="stl_type_index.html" title="Class stl_type_index">stl_type_index</a> <span class="special">&amp;</span><span class="special">)</span> <span class="keyword">const</span> <span class="keyword">noexcept</span><span class="special">;</span>
<span class="keyword">bool</span> <a class="link" href="stl_type_index.html#idp217846960-bb"><span class="identifier">before</span></a><span class="special">(</span><span class="keyword">const</span> <a class="link" href="stl_type_index.html" title="Class stl_type_index">stl_type_index</a> <span class="special">&amp;</span><span class="special">)</span> <span class="keyword">const</span> <span class="keyword">noexcept</span><span class="special">;</span>
<span class="comment">// <a class="link" href="stl_type_index.html#idp217851184-bb">public static functions</a></span>
<span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> T<span class="special">&gt;</span> <span class="keyword">static</span> <a class="link" href="stl_type_index.html" title="Class stl_type_index">stl_type_index</a> <a class="link" href="stl_type_index.html#idp217851744-bb"><span class="identifier">type_id</span></a><span class="special">(</span><span class="special">)</span> <span class="keyword">noexcept</span><span class="special">;</span>
<span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> T<span class="special">&gt;</span> <span class="keyword">static</span> <a class="link" href="stl_type_index.html" title="Class stl_type_index">stl_type_index</a> <a class="link" href="stl_type_index.html#idp152977760-bb"><span class="identifier">type_id_with_cvr</span></a><span class="special">(</span><span class="special">)</span> <span class="keyword">noexcept</span><span class="special">;</span>
<span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> T<span class="special">&gt;</span>
<span class="keyword">static</span> <a class="link" href="stl_type_index.html" title="Class stl_type_index">stl_type_index</a> <a class="link" href="stl_type_index.html#idp152980128-bb"><span class="identifier">type_id_runtime</span></a><span class="special">(</span><span class="keyword">const</span> <span class="identifier">T</span> <span class="special">&amp;</span><span class="special">)</span> <span class="keyword">noexcept</span><span class="special">;</span>
<span class="special">}</span><span class="special">;</span></pre></div>
<div class="refsect1">
<a name="idp478031984"></a><h2>Description</h2>
<p>This class is a wrapper around std::type_info, that workarounds issues and provides much more rich interface. <span class="bold"><strong>For</strong></span> <span class="bold"><strong>description</strong></span> <span class="bold"><strong>of</strong></span> <span class="bold"><strong>functions</strong></span> <span class="bold"><strong>see</strong></span> <a class="link" href="type_index_facade.html" title="Class template type_index_facade">type_index_facade</a>.</p>
<p>This class requires typeid() to work. For cases when RTTI is disabled see <a class="link" href="ctti_type_index.html" title="Class ctti_type_index">ctti_type_index</a>. </p>
<div class="refsect2">
<a name="idp478038192"></a><h3>
<a name="boost.typeindex.stl_type_indexconstruct-copy-destruct"></a><code class="computeroutput">stl_type_index</code>
public
construct/copy/destruct</h3>
<div class="orderedlist"><ol class="orderedlist" type="1">
<li class="listitem"><pre class="literallayout"><a name="idp217849376-bb"></a><span class="identifier">stl_type_index</span><span class="special">(</span><span class="special">)</span> <span class="keyword">noexcept</span><span class="special">;</span></pre></li>
<li class="listitem"><pre class="literallayout"><a name="idp217849936-bb"></a><span class="identifier">stl_type_index</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">type_info_t</span> <span class="special">&amp;</span> data<span class="special">)</span> <span class="keyword">noexcept</span><span class="special">;</span></pre></li>
</ol></div>
</div>
<div class="refsect2">
<a name="idp478051136"></a><h3>
<a name="idp146777392-bb"></a><code class="computeroutput">stl_type_index</code> public member functions</h3>
<div class="orderedlist"><ol class="orderedlist" type="1">
<li class="listitem"><pre class="literallayout"><span class="keyword">const</span> <span class="identifier">type_info_t</span> <span class="special">&amp;</span> <a name="idp146777952-bb"></a><span class="identifier">type_info</span><span class="special">(</span><span class="special">)</span> <span class="keyword">const</span> <span class="keyword">noexcept</span><span class="special">;</span></pre></li>
<li class="listitem"><pre class="literallayout"><span class="keyword">const</span> <span class="keyword">char</span> <span class="special">*</span> <a name="idp146779072-bb"></a><span class="identifier">raw_name</span><span class="special">(</span><span class="special">)</span> <span class="keyword">const</span> <span class="keyword">noexcept</span><span class="special">;</span></pre></li>
<li class="listitem"><pre class="literallayout"><span class="keyword">const</span> <span class="keyword">char</span> <span class="special">*</span> <a name="idp146780192-bb"></a><span class="identifier">name</span><span class="special">(</span><span class="special">)</span> <span class="keyword">const</span> <span class="keyword">noexcept</span><span class="special">;</span></pre></li>
<li class="listitem"><pre class="literallayout"><span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span> <a name="idp146781312-bb"></a><span class="identifier">pretty_name</span><span class="special">(</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span></pre></li>
<li class="listitem"><pre class="literallayout"><span class="identifier">std</span><span class="special">::</span><span class="identifier">size_t</span> <a name="idp146782432-bb"></a><span class="identifier">hash_code</span><span class="special">(</span><span class="special">)</span> <span class="keyword">const</span> <span class="keyword">noexcept</span><span class="special">;</span></pre></li>
<li class="listitem"><pre class="literallayout"><span class="keyword">bool</span> <a name="idp217844704-bb"></a><span class="identifier">equal</span><span class="special">(</span><span class="keyword">const</span> <a class="link" href="stl_type_index.html" title="Class stl_type_index">stl_type_index</a> <span class="special">&amp;</span> rhs<span class="special">)</span> <span class="keyword">const</span> <span class="keyword">noexcept</span><span class="special">;</span></pre></li>
<li class="listitem"><pre class="literallayout"><span class="keyword">bool</span> <a name="idp217846960-bb"></a><span class="identifier">before</span><span class="special">(</span><span class="keyword">const</span> <a class="link" href="stl_type_index.html" title="Class stl_type_index">stl_type_index</a> <span class="special">&amp;</span> rhs<span class="special">)</span> <span class="keyword">const</span> <span class="keyword">noexcept</span><span class="special">;</span></pre></li>
</ol></div>
</div>
<div class="refsect2">
<a name="idp478103056"></a><h3>
<a name="idp217851184-bb"></a><code class="computeroutput">stl_type_index</code> public static functions</h3>
<div class="orderedlist"><ol class="orderedlist" type="1">
<li class="listitem"><pre class="literallayout"><span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> T<span class="special">&gt;</span> <span class="keyword">static</span> <a class="link" href="stl_type_index.html" title="Class stl_type_index">stl_type_index</a> <a name="idp217851744-bb"></a><span class="identifier">type_id</span><span class="special">(</span><span class="special">)</span> <span class="keyword">noexcept</span><span class="special">;</span></pre></li>
<li class="listitem"><pre class="literallayout"><span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> T<span class="special">&gt;</span> <span class="keyword">static</span> <a class="link" href="stl_type_index.html" title="Class stl_type_index">stl_type_index</a> <a name="idp152977760-bb"></a><span class="identifier">type_id_with_cvr</span><span class="special">(</span><span class="special">)</span> <span class="keyword">noexcept</span><span class="special">;</span></pre></li>
<li class="listitem"><pre class="literallayout"><span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> T<span class="special">&gt;</span>
<span class="keyword">static</span> <a class="link" href="stl_type_index.html" title="Class stl_type_index">stl_type_index</a> <a name="idp152980128-bb"></a><span class="identifier">type_id_runtime</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">T</span> <span class="special">&amp;</span> value<span class="special">)</span> <span class="keyword">noexcept</span><span class="special">;</span></pre></li>
</ol></div>
</div>
</div>
</div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
<td align="left"></td>
<td align="right"><div class="copyright-footer">Copyright &#169; 2012-2014 Antony Polukhin<p>
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
</p>
</div></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="ctti_type_index.html"><img src="../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../../boost_typeindex_header_reference.html#header.boost.type_index.stl_type_index_hpp"><img src="../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="type_index_facade.html"><img src="../../../../doc/src/images/next.png" alt="Next"></a>
</div>
</body>
</html>