1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
<title>Wt: Wt::WLocalizedStrings Class Reference</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Generated by Doxygen 1.5.6 -->
<div class="navigation" id="top">
<div class="tabs">
<ul>
<li><a href="index.html"><span>Main Page</span></a></li>
<li><a href="pages.html"><span>Related Pages</span></a></li>
<li><a href="modules.html"><span>Modules</span></a></li>
<li><a href="namespaces.html"><span>Namespaces</span></a></li>
<li class="current"><a href="annotated.html"><span>Classes</span></a></li>
</ul>
</div>
<div class="tabs">
<ul>
<li><a href="annotated.html"><span>Class List</span></a></li>
<li><a href="hierarchy.html"><span>Class Hierarchy</span></a></li>
<li><a href="functions.html"><span>Class Members</span></a></li>
</ul>
</div>
<div class="navpath"><a class="el" href="namespaceWt.html">Wt</a>::<a class="el" href="classWt_1_1WLocalizedStrings.html">WLocalizedStrings</a>
</div>
</div>
<div class="contents">
<h1>Wt::WLocalizedStrings Class Reference</h1><!-- doxytag: class="Wt::WLocalizedStrings" -->An abstract class that provides support for localized strings.
<a href="#_details">More...</a>
<p>
<code>#include <Wt/WLocalizedStrings></code>
<p>
<div class="dynheader">
Inheritance diagram for Wt::WLocalizedStrings:</div>
<div class="dynsection">
<p><center><img src="classWt_1_1WLocalizedStrings__inherit__graph.png" border="0" usemap="#Wt_1_1WLocalizedStrings__inherit__map" alt="Inheritance graph"></center>
<map name="Wt_1_1WLocalizedStrings__inherit__map">
<area shape="rect" href="classWt_1_1WCombinedLocalizedStrings.html" title="A localized string resolver that bundles multiple string resolvers." alt="" coords="5,80,216,107"><area shape="rect" href="classWt_1_1WMessageResourceBundle.html" title="Support for localized strings using XML files." alt="" coords="240,80,445,107"></map>
<center><font size="2">[<a href="graph_legend.html">legend</a>]</font></center></div>
<p>
<a href="classWt_1_1WLocalizedStrings-members.html">List of all members.</a><table border="0" cellpadding="0" cellspacing="0">
<tr><td></td></tr>
<tr><td colspan="2"><br><h2>Public Member Functions</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="04d2e40e52b9827bb5eb4759b9928f66"></a><!-- doxytag: member="Wt::WLocalizedStrings::~WLocalizedStrings" ref="04d2e40e52b9827bb5eb4759b9928f66" args="()" -->
virtual </td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1WLocalizedStrings.html#04d2e40e52b9827bb5eb4759b9928f66">~WLocalizedStrings</a> ()</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Destructor. <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1WLocalizedStrings.html#71b2ca0b40eed56ee1acba8f865e7220">refresh</a> ()</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Rereads the message resources. <a href="#71b2ca0b40eed56ee1acba8f865e7220"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1WLocalizedStrings.html#2ea29ba180ed9af25cf561f0df6a995d">hibernate</a> ()</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Purges memory resources, if possible. <a href="#2ea29ba180ed9af25cf561f0df6a995d"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1WLocalizedStrings.html#05666a0ae917e4fd6deafdd2f4b98ba2">resolveKey</a> (const std::string &key, std::string &result)=0</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Resolves a key in the current locale. <a href="#05666a0ae917e4fd6deafdd2f4b98ba2"></a><br></td></tr>
</table>
<hr><a name="_details"></a><h2>Detailed Description</h2>
An abstract class that provides support for localized strings.
<p>
This abstract class provides the content to localized WStrings, by resolving the key to a string using the current application locale.<p>
<dl class="see" compact><dt><b>See also:</b></dt><dd><a class="el" href="classWt_1_1WString.html#0afc7dc0f9897456d71b569a86ca26c1" title="Creates a localized string from a key.">WString::tr()</a>, <a class="el" href="classWt_1_1WApplication.html#1039775b5a73ff2efc34a482ebd112a8" title="Sets the resource object that provides localized strings.">WApplication::setLocalizedStrings()</a> </dd></dl>
<hr><h2>Member Function Documentation</h2>
<a class="anchor" name="71b2ca0b40eed56ee1acba8f865e7220"></a><!-- doxytag: member="Wt::WLocalizedStrings::refresh" ref="71b2ca0b40eed56ee1acba8f865e7220" args="()" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void Wt::WLocalizedStrings::refresh </td>
<td>(</td>
<td class="paramname"> </td>
<td> ) </td>
<td><code> [virtual]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Rereads the message resources.
<p>
Purge any cached key/values, if applicable.<p>
The default implementation does nothing.
<p>Reimplemented in <a class="el" href="classWt_1_1WCombinedLocalizedStrings.html#ad27735fdadc6e0deb52f55e8ca77d17">Wt::WCombinedLocalizedStrings</a>, and <a class="el" href="classWt_1_1WMessageResourceBundle.html#8dd275eff8f823ee58a1e673a79b71e7">Wt::WMessageResourceBundle</a>.</p>
</div>
</div><p>
<a class="anchor" name="2ea29ba180ed9af25cf561f0df6a995d"></a><!-- doxytag: member="Wt::WLocalizedStrings::hibernate" ref="2ea29ba180ed9af25cf561f0df6a995d" args="()" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void Wt::WLocalizedStrings::hibernate </td>
<td>(</td>
<td class="paramname"> </td>
<td> ) </td>
<td><code> [virtual]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Purges memory resources, if possible.
<p>
This is called afer event handling, and is an opportunity to conserve memory inbetween events, by freeing memory used for cached key/value bindings, if applicable.<p>
The default implementation does nothing.
<p>Reimplemented in <a class="el" href="classWt_1_1WCombinedLocalizedStrings.html#bf4a64defdd472751aab40d561dddd1d">Wt::WCombinedLocalizedStrings</a>, and <a class="el" href="classWt_1_1WMessageResourceBundle.html#5e6c391a95229691fcae8c058c637b7b">Wt::WMessageResourceBundle</a>.</p>
</div>
</div><p>
<a class="anchor" name="05666a0ae917e4fd6deafdd2f4b98ba2"></a><!-- doxytag: member="Wt::WLocalizedStrings::resolveKey" ref="05666a0ae917e4fd6deafdd2f4b98ba2" args="(const std::string &key, std::string &result)=0" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">virtual bool Wt::WLocalizedStrings::resolveKey </td>
<td>(</td>
<td class="paramtype">const std::string & </td>
<td class="paramname"> <em>key</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">std::string & </td>
<td class="paramname"> <em>result</em></td><td> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td><td><code> [pure virtual]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Resolves a key in the current locale.
<p>
This method is used by <a class="el" href="classWt_1_1WString.html" title="A unicode string class, with support for localization.">WString</a> to obtain the UTF8 value corresponding to a key in the current locale.<p>
Returns <code>true</code> if the key could be resolved. The value is written in <code>result</code>, encoded using UTF8.<p>
<dl class="see" compact><dt><b>See also:</b></dt><dd><a class="el" href="classWt_1_1WApplication.html#6e782f1f38a6f56e2024aab1a917a80b" title="Returns the current locale.">WApplication::locale()</a> </dd></dl>
<p>Implemented in <a class="el" href="classWt_1_1WCombinedLocalizedStrings.html#cbe64134b2d1c13abf98ed8b1b039f00">Wt::WCombinedLocalizedStrings</a>, and <a class="el" href="classWt_1_1WMessageResourceBundle.html#22878a466da85139384133f01c7fec77">Wt::WMessageResourceBundle</a>.</p>
</div>
</div><p>
</div>
<hr size="1"><address style="align: right;"><small>
Generated on Fri Mar 26 17:12:07 2010 for <a href="http://www.webtoolkit.eu/wt/">Wt</a> by <a href="http://www.doxygen.org/index.html"><img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.6</small></address>
</body>
</html>
|