/usr/share/doc/libjuce/apiref/classReferenceCountedObject.html is in libjuce-doc 4.3.0~repack-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
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 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.12"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>JUCE: ReferenceCountedObject Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">JUCE
</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.12 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
$(function() {
initMenu('',true,false,'search.php','Search');
$(document).ready(function() { init_search(); });
});
</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0"
name="MSearchResults" id="MSearchResults">
</iframe>
</div>
</div><!-- top -->
<div class="header">
<div class="summary">
<a href="#pub-methods">Public Member Functions</a> |
<a href="#pro-methods">Protected Member Functions</a> |
<a href="classReferenceCountedObject-members.html">List of all members</a> </div>
<div class="headertitle">
<div class="title">ReferenceCountedObject Class Reference</div> </div>
</div><!--header-->
<div class="contents">
<p>A base class which provides methods for reference-counting.
<a href="classReferenceCountedObject.html#details">More...</a></p>
<div id="dynsection-0" onclick="return toggleVisibility(this)" class="dynheader closed" style="cursor:pointer;">
<img id="dynsection-0-trigger" src="closed.png" alt="+"/> Inheritance diagram for ReferenceCountedObject:</div>
<div id="dynsection-0-summary" class="dynsummary" style="display:block;">
</div>
<div id="dynsection-0-content" class="dyncontent" style="display:none;">
<div class="center">
<img src="classReferenceCountedObject.png" usemap="#ReferenceCountedObject_map" alt=""/>
<map id="ReferenceCountedObject_map" name="ReferenceCountedObject_map">
<area href="classAudioProcessorGraph_1_1Node.html" title="Represents one of the nodes, or processors, in an AudioProcessorGraph. " alt="AudioProcessorGraph::Node" shape="rect" coords="0,56,199,80"/>
<area href="classDynamicObject.html" title="Represents a dynamically implemented object. " alt="DynamicObject" shape="rect" coords="209,56,408,80"/>
<area href="classImagePixelData.html" title="This is a base class for holding image data in implementation-specific ways. " alt="ImagePixelData" shape="rect" coords="418,56,617,80"/>
<area href="classMessageManager_1_1MessageBase.html" title="Internal class used as the base class for all message objects. " alt="MessageManager::MessageBase" shape="rect" coords="627,56,826,80"/>
<area href="classSynthesiserSound.html" title="Describes one of the sounds that a Synthesiser can play. " alt="SynthesiserSound" shape="rect" coords="940,56,1139,80"/>
<area href="classTypeface.html" title="A typeface represents a size-independent font. " alt="Typeface" shape="rect" coords="1149,56,1348,80"/>
<area href="classValue_1_1ValueSource.html" title="Used internally by the Value class as the base class for its shared value objects. " alt="Value::ValueSource" shape="rect" coords="1358,56,1557,80"/>
<area href="classCallbackMessage.html" title="A message that invokes a callback method when it gets delivered. " alt="CallbackMessage" shape="rect" coords="522,112,721,136"/>
<area href="classMessage.html" title="The base class for objects that can be sent to a MessageListener. " alt="Message" shape="rect" coords="731,112,930,136"/>
<area href="classSamplerSound.html" title="A subclass of SynthesiserSound that represents a sampled audio clip. " alt="SamplerSound" shape="rect" coords="940,112,1139,136"/>
<area href="classCustomTypeface.html" title="A typeface that can be populated with custom glyphs. " alt="CustomTypeface" shape="rect" coords="1149,112,1348,136"/>
</map>
</div></div>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:a878ca594f89f757d29af5a42ee51161f"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classReferenceCountedObject.html#a878ca594f89f757d29af5a42ee51161f">incReferenceCount</a> () noexcept</td></tr>
<tr class="memdesc:a878ca594f89f757d29af5a42ee51161f"><td class="mdescLeft"> </td><td class="mdescRight">Increments the object's reference count. <a href="#a878ca594f89f757d29af5a42ee51161f">More...</a><br /></td></tr>
<tr class="separator:a878ca594f89f757d29af5a42ee51161f"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a523f06d996130f24b36996b28b83d802"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classReferenceCountedObject.html#a523f06d996130f24b36996b28b83d802">decReferenceCount</a> () noexcept</td></tr>
<tr class="memdesc:a523f06d996130f24b36996b28b83d802"><td class="mdescLeft"> </td><td class="mdescRight">Decreases the object's reference count. <a href="#a523f06d996130f24b36996b28b83d802">More...</a><br /></td></tr>
<tr class="separator:a523f06d996130f24b36996b28b83d802"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a2355316960a6bf2e9691fded43249254"><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classReferenceCountedObject.html#a2355316960a6bf2e9691fded43249254">decReferenceCountWithoutDeleting</a> () noexcept</td></tr>
<tr class="memdesc:a2355316960a6bf2e9691fded43249254"><td class="mdescLeft"> </td><td class="mdescRight">Decreases the object's reference count. <a href="#a2355316960a6bf2e9691fded43249254">More...</a><br /></td></tr>
<tr class="separator:a2355316960a6bf2e9691fded43249254"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a0111caf12d101fc74abd832d44fbfa4f"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="classReferenceCountedObject.html#a0111caf12d101fc74abd832d44fbfa4f">getReferenceCount</a> () const noexcept</td></tr>
<tr class="memdesc:a0111caf12d101fc74abd832d44fbfa4f"><td class="mdescLeft"> </td><td class="mdescRight">Returns the object's current reference count. <a href="#a0111caf12d101fc74abd832d44fbfa4f">More...</a><br /></td></tr>
<tr class="separator:a0111caf12d101fc74abd832d44fbfa4f"><td class="memSeparator" colspan="2"> </td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pro-methods"></a>
Protected Member Functions</h2></td></tr>
<tr class="memitem:a86c1a0791cb6e98e63f7c1f7812c6eb5"><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="classReferenceCountedObject.html#a86c1a0791cb6e98e63f7c1f7812c6eb5">ReferenceCountedObject</a> ()</td></tr>
<tr class="memdesc:a86c1a0791cb6e98e63f7c1f7812c6eb5"><td class="mdescLeft"> </td><td class="mdescRight">Creates the reference-counted object (with an initial ref count of zero). <a href="#a86c1a0791cb6e98e63f7c1f7812c6eb5">More...</a><br /></td></tr>
<tr class="separator:a86c1a0791cb6e98e63f7c1f7812c6eb5"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a7ed87d7f91e5ae51c620947c61291375"><td class="memItemLeft" align="right" valign="top">virtual </td><td class="memItemRight" valign="bottom"><a class="el" href="classReferenceCountedObject.html#a7ed87d7f91e5ae51c620947c61291375">~ReferenceCountedObject</a> ()</td></tr>
<tr class="memdesc:a7ed87d7f91e5ae51c620947c61291375"><td class="mdescLeft"> </td><td class="mdescRight">Destructor. <a href="#a7ed87d7f91e5ae51c620947c61291375">More...</a><br /></td></tr>
<tr class="separator:a7ed87d7f91e5ae51c620947c61291375"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a9bbeeab431755e2be8ff09dfe9ea4c4d"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classReferenceCountedObject.html#a9bbeeab431755e2be8ff09dfe9ea4c4d">resetReferenceCount</a> () noexcept</td></tr>
<tr class="memdesc:a9bbeeab431755e2be8ff09dfe9ea4c4d"><td class="mdescLeft"> </td><td class="mdescRight">Resets the reference count to zero without deleting the object. <a href="#a9bbeeab431755e2be8ff09dfe9ea4c4d">More...</a><br /></td></tr>
<tr class="separator:a9bbeeab431755e2be8ff09dfe9ea4c4d"><td class="memSeparator" colspan="2"> </td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>A base class which provides methods for reference-counting. </p>
<p>To add reference-counting to a class, derive it from this class, and use the <a class="el" href="classReferenceCountedObjectPtr.html" title="A smart-pointer class which points to a reference-counted object. ">ReferenceCountedObjectPtr</a> class to point to it.</p>
<p>e.g.</p><div class="fragment"><div class="line"><span class="keyword">class </span>MyClass : <span class="keyword">public</span> <a class="code" href="classReferenceCountedObject.html">ReferenceCountedObject</a></div><div class="line">{</div><div class="line"> <span class="keywordtype">void</span> foo();</div><div class="line"></div><div class="line"> <span class="comment">// This is a neat way of declaring a typedef for a pointer class,</span></div><div class="line"> <span class="comment">// rather than typing out the full templated name each time..</span></div><div class="line"> <span class="keyword">typedef</span> <a class="code" href="classReferenceCountedObjectPtr.html">ReferenceCountedObjectPtr<MyClass></a> Ptr;</div><div class="line">};</div><div class="line"></div><div class="line">MyClass::Ptr p = <span class="keyword">new</span> MyClass();</div><div class="line">MyClass::Ptr p2 = p;</div><div class="line">p = <span class="keyword">nullptr</span>;</div><div class="line">p2->foo();</div></div><!-- fragment --><p>Once a new <a class="el" href="classReferenceCountedObject.html" title="A base class which provides methods for reference-counting. ">ReferenceCountedObject</a> has been assigned to a pointer, be careful not to delete the object manually.</p>
<p>This class uses an <a class="el" href="classAtomic.html">Atomic<int></a> value to hold the reference count, so that it the pointers can be passed between threads safely. For a faster but non-thread-safe version, use <a class="el" href="classSingleThreadedReferenceCountedObject.html" title="Adds reference-counting to an object. ">SingleThreadedReferenceCountedObject</a> instead.</p>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="classReferenceCountedObjectPtr.html" title="A smart-pointer class which points to a reference-counted object. ">ReferenceCountedObjectPtr</a>, <a class="el" href="classReferenceCountedArray.html" title="Holds a list of objects derived from ReferenceCountedObject, or which implement basic reference-count...">ReferenceCountedArray</a>, <a class="el" href="classSingleThreadedReferenceCountedObject.html" title="Adds reference-counting to an object. ">SingleThreadedReferenceCountedObject</a> </dd></dl>
</div><h2 class="groupheader">Constructor & Destructor Documentation</h2>
<a id="a86c1a0791cb6e98e63f7c1f7812c6eb5"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a86c1a0791cb6e98e63f7c1f7812c6eb5">§ </a></span>ReferenceCountedObject()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">ReferenceCountedObject::ReferenceCountedObject </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">protected</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Creates the reference-counted object (with an initial ref count of zero). </p>
</div>
</div>
<a id="a7ed87d7f91e5ae51c620947c61291375"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a7ed87d7f91e5ae51c620947c61291375">§ </a></span>~ReferenceCountedObject()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">virtual ReferenceCountedObject::~ReferenceCountedObject </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">protected</span><span class="mlabel">virtual</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Destructor. </p>
<p>References <a class="el" href="juce__PlatformDefs_8h.html#a1f96ab6751237979b907a54f52a7296a">jassert</a>.</p>
</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a id="a878ca594f89f757d29af5a42ee51161f"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a878ca594f89f757d29af5a42ee51161f">§ </a></span>incReferenceCount()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">void ReferenceCountedObject::incReferenceCount </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">noexcept</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Increments the object's reference count. </p>
<p>This is done automatically by the smart pointer, but is public just in case it's needed for nefarious purposes. </p>
</div>
</div>
<a id="a523f06d996130f24b36996b28b83d802"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a523f06d996130f24b36996b28b83d802">§ </a></span>decReferenceCount()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">void ReferenceCountedObject::decReferenceCount </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">noexcept</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Decreases the object's reference count. </p>
<p>If the count gets to zero, the object will be deleted. </p>
<p>References <a class="el" href="juce__PlatformDefs_8h.html#a1f96ab6751237979b907a54f52a7296a">jassert</a>.</p>
</div>
</div>
<a id="a2355316960a6bf2e9691fded43249254"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a2355316960a6bf2e9691fded43249254">§ </a></span>decReferenceCountWithoutDeleting()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">bool ReferenceCountedObject::decReferenceCountWithoutDeleting </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">noexcept</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Decreases the object's reference count. </p>
<p>If the count gets to zero, the object will not be deleted, but this method will return true, allowing the caller to take care of deletion. </p>
<p>References <a class="el" href="juce__PlatformDefs_8h.html#a1f96ab6751237979b907a54f52a7296a">jassert</a>.</p>
</div>
</div>
<a id="a0111caf12d101fc74abd832d44fbfa4f"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a0111caf12d101fc74abd832d44fbfa4f">§ </a></span>getReferenceCount()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">int ReferenceCountedObject::getReferenceCount </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td> const</td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">noexcept</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Returns the object's current reference count. </p>
</div>
</div>
<a id="a9bbeeab431755e2be8ff09dfe9ea4c4d"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a9bbeeab431755e2be8ff09dfe9ea4c4d">§ </a></span>resetReferenceCount()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">void ReferenceCountedObject::resetReferenceCount </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">protected</span><span class="mlabel">noexcept</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Resets the reference count to zero without deleting the object. </p>
<p>You should probably never need to use this! </p>
</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li><a class="el" href="juce__ReferenceCountedObject_8h.html">juce_ReferenceCountedObject.h</a></li>
</ul>
</div><!-- contents -->
<hr class="footer"/>
<address class="footer"><small>All content © ROLI Ltd.</small></address><br/>
</body>
</html>
|