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
|
<!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>Loki: Lifetime policies</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
<link href="tabs.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Generated by Doxygen 1.4.7 -->
<div class="tabs">
<ul>
<li><a href="main.html"><span>Main Page</span></a></li>
<li><a href="modules.html"><span>Modules</span></a></li>
<li><a href="namespaces.html"><span>Namespaces</span></a></li>
<li><a href="classes.html"><span>Classes</span></a></li>
<li>
<form action="search.php" method="get">
<table cellspacing="0" cellpadding="0" border="0">
<tr>
<td><label> <u>S</u>earch for </label></td>
<td><input type="text" name="query" value="" size="20" accesskey="s"/></td>
</tr>
</table>
</form>
</li>
</ul></div>
<h1>Lifetime policies<br>
<small>
[<a class="el" href="a00775.html">Singleton</a>]</small>
</h1>
<p>
Collaboration diagram for Lifetime policies:<table border="0" cellpadding="0" cellspacing="0">
<tr><td></td></tr>
<tr><td colspan="2"><br><h2>Modules</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="a00778.html">LongevityLifetime</a></td></tr>
<tr><td colspan="2"><br><h2>Classes</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">struct </td><td class="memItemRight" valign="bottom"><a class="el" href="a00658.html">Loki::DefaultLifetime< T ></a></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">struct </td><td class="memItemRight" valign="bottom"><a class="el" href="a00696.html">Loki::PhoenixSingleton< T ></a></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">struct </td><td class="memItemRight" valign="bottom"><a class="el" href="a00660.html">Loki::DeletableSingleton< T ></a></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">struct </td><td class="memItemRight" valign="bottom"><a class="el" href="a00713.html">Loki::SingletonWithLongevity< T ></a></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">struct </td><td class="memItemRight" valign="bottom"><a class="el" href="a00692.html">Loki::NoDestroy< T ></a></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">class </td><td class="memItemRight" valign="bottom"><a class="el" href="a00675.html">Loki::FollowIntoDeath</a></td></tr>
<tr><td colspan="2"><br><h2>Functions</h2></td></tr>
<tr><td class="memTemplParams" nowrap colspan="2">template<typename T, typename Destroyer> </td></tr>
<tr><td class="memTemplItemLeft" nowrap align="right" valign="top">void </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="a00777.html#g82d4520d213b3b9ef2090f5e237874cf">Loki::SetLongevity</a> (T *pDynObject, unsigned int longevity, Destroyer d)</td></tr>
</table>
<hr><a name="_details"></a><h2>Detailed Description</h2>
The lifetimes of the singleton. <dl compact><dt><b>Special lifetime for SmallObjects</b></dt><dd>When the holded object is a Small(Value)Object or the holded object uses objects which are or inherit from Small(Value)Object then you can't use the default lifetime: you must use the lifetime <div class="fragment"><pre class="fragment"> <a class="code" href="a00666.html">Loki::LongevityLifetime::DieAsSmallObjectChild</a>
</pre></div> Be aware of this when you use <a class="el" href="a00673.html">Loki::Factory</a>, <a class="el" href="a00681.html">Loki::Functor</a>, or Loki::Function. </dd></dl>
<hr><h2>Function Documentation</h2>
<a class="anchor" name="g82d4520d213b3b9ef2090f5e237874cf"></a><!-- doxytag: member="Loki::SetLongevity" ref="g82d4520d213b3b9ef2090f5e237874cf" args="(T *pDynObject, unsigned int longevity, Destroyer d)" -->
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template<typename T, typename Destroyer> </div>
<table class="memname">
<tr>
<td class="memname">void Loki::SetLongevity </td>
<td>(</td>
<td class="paramtype">T * </td>
<td class="paramname"> <em>pDynObject</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">unsigned int </td>
<td class="paramname"> <em>longevity</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">Destroyer </td>
<td class="paramname"> <em>d</em></td><td> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td><td width="100%"></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Assigns an object a longevity; ensures ordered destructions of objects registered thusly during the exit sequence of the application
</div>
</div><p>
<hr size="1"><address style="align: right;"><small>Generated on Mon Jun 19 15:14:43 2006 for Loki by
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.7 </small></address>
</body>
</html>
|