sentry.htm
来自「这是关于VC++中的STL容器的资料,包括了STL容器各个类之间关系以及类的说明」· HTM 代码 · 共 120 行
HTM
120 行
<html>
<head>
<title> The sentry Class</title>
</head>
<body bgcolor="#FFFFFF">
<pre>
<font size=5>Class Name</font> sentry
<font size=5>Header File</font> <sentry>
<font size=5>Classification</font> sentry
</pre>
<a href="sentry.htm#desc">Class Description</a><br>
<h1>Methods</h1>
<pre>
<a href="sentry.htm#sentry1">explicit sentry(basic_ostream<charT,traits>& Os)</a><br>
<a href="sentry.htm#sentry2">~sentry()</a><br>
<a href="sentry.htm#bool">operator bool()</a><br>
</pre>
<a name="desc"><h3>Description</h3></a>
<p>
The sentry class is a class used monitor pre-conditions and post-conditions
of an input/output class. The constructor for the sentry class performs
exception safe prefix operations. The destructor for the sentry class performs
exception safe suffix operations.
</p>
<hr>
<pre>
<a name="sentry1">Method sentry</a>
Access Public
Classification Constructor
Syntax explicit sentry(basic_ostream<charT,traits>& Os)
Parameters Os is a reference to the ostream object that requires
exception safe prefix or suffix operations.
Return None
</pre>
<h3>Description</h3>
<p>
This sentry() method is used to construct an object of type sentry. The sentry() constructor
has the effect of calling the opfx() method.
</p>
<hr>
<pre>
<a name="sentry2">Method sentry()</a>
Access Public
Classification Destructor
Syntax ~sentry()
Parameters None
Return None
</pre>
<h3>Description</h3>
<p>
This sentry() method is destructs an object of type sentry. The ~sentry() destructor
has the effect of calling the osfx() method.
</p>
<hr>
<pre>
<a name="bool">Method bool()</a>
Access Public
Classification Accessor
Syntax operator bool()
Parameters None
Return This method returns the value of ok_.
</pre>
<h3>Description</h3>
<p>
This bool() method returns the value of the ok_ attribute.
</p>
<hr>
</body>
</html>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?