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

📄 messages.htm

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

<body bgcolor="#FFFFFF">

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


<img src="messban.gif">

<pre>

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

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

<font size=5>Classification</font>      abstract data type

</pre>

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

<h1>Member Classes</h1>
<a href="messages.htm#id">locale::id</a>

<h1>Methods</h1>
<pre>
<a href="messages.htm#close">
void close(catalog c) const;</a> 

<a href="messages.htm#do-close">
virtual void do_close(catalog) const;</a>

<a href="messages.htm#do-get">
virtual string_type do_get(catalog, int set, int msgid, 
const string_type& dfault) const;</a>

<a href="messages.htm#do-open">
virtual catalog do_open(const basic_string<char>&, const locale&) const;</a> 

<a href="messages.htm#get">
string_type get(catalog c, int set, int msgid, 
const string_type& dfault) const;</a> 

<a href="messages.htm#messages">
explicit messages(size_t refs = 0);</a> 

<a href="messages.htm#~messages">
~messages();</a> 

<a href="messages.htm#open">
catalog open(const basic_string<char>& fn, const locale&) const;</a>

</pre>
<hr>
<a name="class-descrip"><h3>Class Description</h3></a>
<p>
The messages class describes a class used to provides a facility for the retrieval
of strings from the message catalogs.
</p>
<hr>
<a name="id"><h3>locale::id</h3></a>
<p>
<em>locale::id</em> is a class used to provide an identification of a locale facet interfaces used as
an index for lookup and to encapsulate initialization.
</p>
<hr>
<pre>
<a name="close">
Method             close()</a>

Access             Public

Classification     Modifier

Syntax             void close(catalog c) const;

Parameters         <em>c</em> is the message <a href="messbase.htm#class-descrip">catalog</a> obtained from open().

Returns            None

</pre>

<h3>Description</h3>
<p>
The close() method calls do_close(cat).
</p>
<hr>

<pre>
<a name="do-close">
Method             do_close()</a>

Access             Protected

Classification     Modifier

Syntax             virtual void do_close(catalog cat) const;

Parameters         <em>cat</em> is the message <a href="messbase.htm#class-descrip">catalog</a> obtained from open().

Returns            None

</pre>

<h3>Description</h3>
<p>
The do_close() method closes the <a href="messbase.htm#class-descrip">catalog</a> opened by an earlier call to do_open().
</p>
<hr>

<pre>
<a name="do-get">
Method             do_get()</a>

Access             Protected

Classification     Accessor

Syntax             virtual string_type do_get(catalog cat, int set, 
                                              int msgid, 
                                              const string_type& dfault) const;

Parameters         <em>cat</em> is the message <a href="messbase.htm#class-descrip">catalog</a> obtained from open().

                   <em>set</em> is used to identify the message.

                   <em>msgid</em> is used to identify the message.

                   <em>dfault</em> is returned if the message cannot be found.

Returns            This method returns a string_type that is a copy 
                   of the message or a copy of the dfault message if 
                   a failure occurs.

</pre>

<h3>Description</h3>
<p>
The do_get() method returns the message sequence from the message <a href="messbase.htm#class-descrip">catalog</a> <em>cat</em>. It makes use of <em>set</em>, 
<em>msgid</em>, and <em>dfault</em> in doing so. It returns a copy of the specified message sequence. If failure occurs,
it returns a copy of <em>dfault</em> on failure. 
</p>
<hr>

<pre>
<a name="do-open">
Method             do_open()</a>

Access             Protected

Classification     Modifier

Syntax             virtual catalog do_open(const string& name, 
                                           const locale& loc) const;

Parameters         <em>name</em> is the name of the message <a href="messbase.htm#class-descrip">catalog</a>.

                   <em>loc</em> is used for the codeset conversion when 
                   retrieving messages if needed.

Returns            This method returns a <a href="messbase.htm#class-descrip">catalog</a> value that is passed 
                   to get() in order to retrieve a message.

</pre>

<h3>Description</h3>
<p>
The do_open() opens a message <a href="messbase.htm#class-descrip">catalog</a> specified by <em>name</em> argument. The method returns
a value less than 0 if no such <a href="messbase.htm#class-descrip">catalog</a> can be opened. The <em>loc</em> argument is used for codeset
conversion when retrieving messages.
</p>
<hr>

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

Access             Public

Classification     Accessor

Syntax             string_type get(catalog c, int set, int msgid, 
                                   const string_type& dfault) const;

Parameters         <em>c</em> is the message <a href="messbase.htm#class-descrip">catalog</a> obtained from open().

                   <em>set</em> is used to identify the message.

                   <em>msgid</em> is used to identify the message.

                   <em>dfault</em> is returned if the message cannot be found.

Returns            This method returns a string_type that is a copy 
                   of the message or a copy of the dfault message if 
                   a failure occurs.

</pre>

<h3>Description</h3>
<p>
The get() method returns do_get(c, set, msgid, dfault).
</p>
<hr>

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

Access             Public

Classification     Constructor

Syntax             explicit messages(size_t refs = 0);

Parameters         <em>refs</em>, if the refs argument = 0 then the destruction 
                   of the object is delegated to the locale or locales 
                   which contain it. If refs = 1 then the object must 
                   be explicitly deleted. The locale will not delete
                   it. The object can then be maintained across the 
                   lifetime of multiple locales.


Returns            None

</pre>

<h3>Description</h3>
<p>
The constructor constructs a messages facet object.
</p>
<hr>

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

Access             Protected

Classification     Destructor

Syntax             ~messages();

Parameters         None

Returns            None

</pre>

<h3>Description</h3>
<p>
The destructor destroys a messages facet object.
</p>
<hr>

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

Access             Public

Classification     Modifier

Syntax             catalog open(const string& fn, 
                                const locale& loc) const;

Parameters         <em>fn</em> is the name of the message <a href="messbase.htm#class-descrip">catalog</a>.

                   <em>loc</em> is used for the codeset conversion when 
                   retrieving messages if needed.

Returns            This method returns a value that is passed to get() in order 
                   to retrieve a message.

</pre>

<h3>Description</h3>
<p>
The open() method returns do_open(fn, loc).
</p>
<hr>

<a name="crd"><h2>The Class Relationship Diagram for messages</h2></a>
<img src="messge.gif">
<hr>

</body>
</html>



⌨️ 快捷键说明

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