File: a00072.html

package info (click to toggle)
scim 1.4.7-3
  • links: PTS, VCS
  • area: main
  • in suites: lenny
  • size: 20,368 kB
  • ctags: 12,834
  • sloc: cpp: 51,239; sh: 22,370; ansic: 18,716; makefile: 1,258; xml: 641; yacc: 288
file content (223 lines) | stat: -rw-r--r-- 10,981 bytes parent folder | download
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
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
<!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>scim: scim::ReferencedObject Class Reference</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.5.0 -->
<div class="tabs">
  <ul>
    <li><a href="main.html"><span>Main&nbsp;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 id="current"><a href="classes.html"><span>Classes</span></a></li>
    <li><a href="files.html"><span>Files</span></a></li>
  </ul></div>
<div class="tabs">
  <ul>
    <li><a href="classes.html"><span>Alphabetical&nbsp;List</span></a></li>
    <li><a href="annotated.html"><span>Class&nbsp;List</span></a></li>
    <li><a href="hierarchy.html"><span>Class&nbsp;Hierarchy</span></a></li>
    <li><a href="functions.html"><span>Class&nbsp;Members</span></a></li>
  </ul></div>
<div class="nav">
<a class="el" href="a00157.html">scim</a>::<a class="el" href="a00072.html">ReferencedObject</a></div>
<h1>scim::ReferencedObject Class Reference<br>
<small>
[<a class="el" href="a00158.html">Accessories</a>,&nbsp;<a class="el" href="a00158.html">Accessories</a>]</small>
</h1><!-- doxytag: class="scim::ReferencedObject" -->Reference counted base class.  
<a href="#_details">More...</a>
<p>
<code>#include &lt;scim_object.h&gt;</code>
<p>
Inheritance diagram for scim::ReferencedObject:<p><center><img src="a00411.png" border="0" usemap="#a00412" alt="Inheritance graph"></center>
<map name="a00412">
<area href="a00002.html" shape="rect" coords="256,7,392,31" alt="">
<area href="a00014.html" shape="rect" coords="260,55,388,79" alt="">
<area href="a00031.html" shape="rect" coords="253,103,395,127" alt="">
<area href="a00050.html" shape="rect" coords="229,151,419,175" alt="">
<area href="a00052.html" shape="rect" coords="225,199,423,223" alt="">
<area href="a00065.html" shape="rect" coords="280,247,368,271" alt="">
<area href="a00095.html" shape="rect" coords="280,295,368,319" alt="">
</map>
<center><font size="2">[<a target="top" href="graph_legend.html">legend</a>]</font></center><a href="a00413.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">bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00072.html#d1af5e9dc51cce959075cedbd53d0945">is_referenced</a> () const</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00072.html#07512157e0d29d979b901eb8777956f8">ref</a> ()</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Increase an object's reference count by one.  <a href="#07512157e0d29d979b901eb8777956f8"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00072.html#35d5e67d9d037b018c7ee1c6bf23cc97">unref</a> ()</td></tr>

<tr><td colspan="2"><br><h2>Protected Member Functions</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00072.html#cb5970284a95fa54bd68f045f03d2439">ReferencedObject</a> ()</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Constructor.  <a href="#cb5970284a95fa54bd68f045f03d2439"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00072.html#7d4894a08de693fdadc1967f357d1c11">~ReferencedObject</a> ()=0</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Destructor.  <a href="#7d4894a08de693fdadc1967f357d1c11"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00072.html#e962b5a11086bf548d0ad444f18b870d">set_referenced</a> (bool reference)</td></tr>

<tr><td colspan="2"><br><h2>Friends</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">class&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00072.html#44775f045074547f5bdd831609e6c77c">Pointer</a></td></tr>

</table>
<hr><a name="_details"></a><h2>Detailed Description</h2>
Reference counted base class. 
<p>
<a class="el" href="a00072.html">ReferencedObject</a> is a reference counting base class. it has an integer reference counter so that dynamic objects can have their memory allocation handled by the scim smart pointer: Pointer&lt;&gt;. This keeps the memory management in scim consistent across all classes. If you derive a class from <a class="el" href="a00072.html">ReferencedObject</a> and allocate it on the heap, you free the memory and destroy the object by calling <a class="el" href="a00072.html#35d5e67d9d037b018c7ee1c6bf23cc97">unref()</a>, not delete. 
<p>
<hr><h2>Constructor &amp; Destructor Documentation</h2>
<a class="anchor" name="cb5970284a95fa54bd68f045f03d2439"></a><!-- doxytag: member="scim::ReferencedObject::ReferencedObject" ref="cb5970284a95fa54bd68f045f03d2439" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">scim::ReferencedObject::ReferencedObject           </td>
          <td>(</td>
          <td class="paramname">          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"><code> [protected]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Constructor. 
<p>

</div>
</div><p>
<a class="anchor" name="7d4894a08de693fdadc1967f357d1c11"></a><!-- doxytag: member="scim::ReferencedObject::~ReferencedObject" ref="7d4894a08de693fdadc1967f357d1c11" args="()=0" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual scim::ReferencedObject::~ReferencedObject           </td>
          <td>(</td>
          <td class="paramname">          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"><code> [protected, pure virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Destructor. 
<p>

</div>
</div><p>
<hr><h2>Member Function Documentation</h2>
<a class="anchor" name="e962b5a11086bf548d0ad444f18b870d"></a><!-- doxytag: member="scim::ReferencedObject::set_referenced" ref="e962b5a11086bf548d0ad444f18b870d" args="(bool reference)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void scim::ReferencedObject::set_referenced           </td>
          <td>(</td>
          <td class="paramtype">bool&nbsp;</td>
          <td class="paramname"> <em>reference</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"><code> [protected]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Set the internal referenced flag. <dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>reference</em>&nbsp;</td><td>- <em>true</em> if the initial reference count must be removed by owner.</td></tr>
  </table>
</dl>
<br>
Called by derived classes to set the referenced flag. A object sets this flag to true , indicating that it owns the initial reference count and <a class="el" href="a00072.html#35d5e67d9d037b018c7ee1c6bf23cc97">unref()</a> must be called. 
</div>
</div><p>
<a class="anchor" name="d1af5e9dc51cce959075cedbd53d0945"></a><!-- doxytag: member="scim::ReferencedObject::is_referenced" ref="d1af5e9dc51cce959075cedbd53d0945" args="() const" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool scim::ReferencedObject::is_referenced           </td>
          <td>(</td>
          <td class="paramname">          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"> const</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
The referenced flag setting. <dl class="return" compact><dt><b>Returns:</b></dt><dd><em>true</em> if <a class="el" href="a00072.html#35d5e67d9d037b018c7ee1c6bf23cc97">unref()</a> must be explicitly called on this object. </dd></dl>

</div>
</div><p>
<a class="anchor" name="07512157e0d29d979b901eb8777956f8"></a><!-- doxytag: member="scim::ReferencedObject::ref" ref="07512157e0d29d979b901eb8777956f8" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void scim::ReferencedObject::ref           </td>
          <td>(</td>
          <td class="paramname">          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Increase an object's reference count by one. 
<p>

</div>
</div><p>
<a class="anchor" name="35d5e67d9d037b018c7ee1c6bf23cc97"></a><!-- doxytag: member="scim::ReferencedObject::unref" ref="35d5e67d9d037b018c7ee1c6bf23cc97" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void scim::ReferencedObject::unref           </td>
          <td>(</td>
          <td class="paramname">          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Decrease an object's reference count by one. When the reference count becomes zero delete is called. Remember, with <a class="el" href="a00072.html">ReferencedObject</a> you must call <a class="el" href="a00072.html#35d5e67d9d037b018c7ee1c6bf23cc97">unref()</a> on dynmaically allocated objects, not delete. 
</div>
</div><p>
<hr><h2>Friends And Related Function Documentation</h2>
<a class="anchor" name="44775f045074547f5bdd831609e6c77c"></a><!-- doxytag: member="scim::ReferencedObject::Pointer" ref="44775f045074547f5bdd831609e6c77c" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">friend class <a class="el" href="a00070.html">Pointer</a><code> [friend]</code>          </td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>

</div>
</div><p>
<hr>The documentation for this class was generated from the following file:<ul>
<li><a class="el" href="a00142.html">scim_object.h</a></ul>
<hr size="1"><address style="align: right;"><small>Generated on Thu Jun 28 14:12:41 2007 for scim by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.0 </small></address>
</body>
</html>