⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 typeinfo.htm

📁 这是关于VC++中的STL容器的资料,包括了STL容器各个类之间关系以及类的说明
💻 HTM
字号:
<html>
<head>
<title>type_info</title>
<head>

<body bgcolor="#FFFFFF">

<a name="here"></a>

<img src="typeban.gif">
<pre>

<font size=5>Class Name</font>            type_info

<font size=5>Header File</font>          &lt;typeinfo&gt;

<font size=5>Classification</font>      Runtime Support

</pre>

<a href="typeinfo.htm#crd">Class Relationship Diagram</a><br>
<br>
<a href="typeinfo.htm#class-descrip">Class Description</a>

<h1>Member Classes</h1>
<p>
None
</p>

<h1>Methods</h1>
<pre>

<a href="typeinfo.htm#before">bool before(const type_info&) const;</a>

<a href="typeinfo.htm#name">const char* name() const;</a>

<a href="typeinfo.htm#~typeinfo">virtual ~type_info();</a>

</pre>

<h1>Operators</h1>
<pre>

<a href="typeinfo.htm#operator==">bool operator==(const type_info&) const;</a>

<a href="typeinfo.htm#operator!=">bool operator!=(const type_info&) const;</a>

</pre>

<hr>

<a name="class-descrip"><h3>Class Description</h3></a>
<p>
The type_info class describes a class stores a pointer to a name for the
object type. When pointers can be of a base or derived types, this class
can be used to detect the type of object at runtime. The type_info object
has the operator==() and operator!=() defined to compare types.
</p>
<hr>

<pre>
<a name="~typeinfo">
Method             type_info()</a>

Access             Public

Classification     Destructor

Syntax             virtual ~type_info();

Parameters         None

Returns            None

</pre>

<h3>Description</h3>
<p>
The destructor destroys a type_info object.
</p>

<hr>

<pre>
<a name="operator==">
Method             operator==()</a>

Access             Public

Classification     Accessor

Syntax             bool operator==(const type_info& rhs) const;

Parameters         <em>rhs</em> is the type_info object to be compared to the
                   current object.

Returns            This operator returns true if the type_info objects
                   describe the same type.

</pre>

<h3>Description</h3>
<p>
The equality operator will return a bool value true if the type_info objects
describe the same type.
</p>

<hr>

<pre>
<a name="operator!=">
Method             operator!=()</a>

Access             Public

Classification     Accessor

Syntax             bool operator!=(const type_info& rhs) const;

Parameters         <em>rhs</em> is the type_info object to be compared to the
                   current object.

Returns            This operator returns true if the type_info objects
                   are not the same type.

</pre>

<h3>Description</h3>
<p>
The inequality operator will return a bool value true if the type_info objects
are not the same type.
</p>

<hr>
<pre>
<a name="before">
Method             before()</a>

Access             Public

Classification     Accessor

Syntax             bool before(const type_info& x) const;

Parameters         <em>x</em> is a reference to type_info object in which
                   the method determines whether the current object
                   precedes this object.

Returns            This method returns true if the current object
                   precedes type_info x.

</pre>

<h3>Description</h3>
<p>
The before() method is used to the determine order of these
objects. This will allow type_info objects to be sorted. The ordering has
nothing to do with inheritance order. The before()
method returns a bool value true if the calling type_info object precedes the type_info object passed as a
<em>x</em>. The manner in which the type_info objects are sorted is not
defined and may differ from one program to another or even different
executions of the same program. It is safe to assume that the collating
sequence is similar or connected to the address operator.
</p>

<hr>

<pre>
<a name="name">
Method             name()</a>

Access             Public

Classification     Accessor

Syntax             const char* name() const;

Parameters         None

Returns            This method returns a pointer to a null terminated
                   string which represents the name of a type.

</pre>

<h3>Description</h3>
<p>
The method name() will return the name of a type. It returns a const char*
to a null terminated string.
</p>

<hr>

<a name="crd"><h2>The Class Relationship Diagram for type_info</h2></a>
<img src="typeinfo.gif">
<hr>
</body>
</html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -