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 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438
|
<?xml version="1.0" encoding="UTF-8"?>
<!--
Documentation for LCL (Lazarus Component Library) and LazUtils (Lazarus
Utilities) are published under the Creative Commons Attribution-ShareAlike 4.0
International public license.
https://creativecommons.org/licenses/by-sa/4.0/legalcode.txt
https://gitlab.com/freepascal.org/lazarus/lazarus/-/blob/main/docs/cc-by-sa-4-0.txt
Copyright (c) 1997-2025, by the Lazarus Development Team.
-->
<fpdoc-descriptions>
<package name="lazutils">
<!--
====================================================================
LazClasses
====================================================================
-->
<module name="LazClasses">
<short>
Contains classes and routines used to implement free notifications and
reference counting.
</short>
<descr>
<p>
<file>lazclasses.pas</file> is part of the <file>lazutils</file> package.
</p>
</descr>
<!-- unresolved external references -->
<element name="SysUtils"/>
<element name="Classes"/>
<element name="LazMethodList"/>
<element name="TFreeNotifyingGeneric">
<short>
Generic implementation of the class used to implement objects which perform
free notifications.
</short>
<descr/>
<seealso/>
</element>
<!-- private -->
<element name="TFreeNotifyingGeneric.FFreeNotificationList"/>
<!-- protected -->
<element name="TFreeNotifyingGeneric.DoDestroy">
<short>
Alternate destructor for the generic class type.
</short>
<descr>
<p>
FPC issues an error and can not compile an overridden Destructor.
</p>
</descr>
<seealso/>
</element>
<!-- public -->
<element name="TFreeNotifyingGeneric.AddFreeNotification">
<short>
Adds the specified notification to the notification list in the generic class instance.
</short>
<descr/>
<seealso/>
</element>
<element name="TFreeNotifyingGeneric.AddFreeNotification.ANotification">
<short>
The notification event handler added to the notification list.
</short>
</element>
<element name="TFreeNotifyingGeneric.RemoveFreeNotification">
<short>
Removes the specified notification from the notification list in the generic class instance.
</short>
<descr/>
<seealso/>
</element>
<element name="TFreeNotifyingGeneric.RemoveFreeNotification.ANotification">
<short>
The notification event handler removed from the notification list.
</short>
</element>
<element name="TFreeNotifyingObject">
<short>
Base class used to implement objects which perform free notifications.
</short>
<descr/>
<seealso/>
</element>
<element name="TFreeNotifyingObject.FFreeNotificationList">
<short>
List of notification methods called when the object is freed.
</short>
</element>
<element name="TFreeNotifyingObject.Destroy">
<short>Destructor for the class instance.</short>
<descr/>
<seealso/>
</element>
<element name="TFreeNotifyingObject.AddFreeNotification">
<short>
Adds the specified method to the notification list in the class instance.
</short>
<descr/>
<seealso/>
</element>
<element name="TFreeNotifyingObject.AddFreeNotification.ANotification">
<short>The notification event handler added to the internal list.</short>
</element>
<element name="TFreeNotifyingObject.RemoveFreeNotification">
<short>Removes the specified method from the internal list.</short>
<descr/>
<seealso/>
</element>
<element name="TFreeNotifyingObject.RemoveFreeNotification.ANotification">
<short>The notification event handler removed from the internal list.</short>
</element>
<element name="TRefCountedObject">
<short>
Implements a thread-safe reference-counted class which performs free
notifications.
</short>
<descr>
<p>
Used in the implementation of logging classes and the debugger interface in
Lazarus. Also used in the implementation of classes for TSynEdit.
</p>
</descr>
<seealso/>
</element>
<!-- private -->
<element name="TRefCountedObject.FRefCount"/>
<element name="TRefCountedObject.FIncDecRefCount"/>
<element name="TRefCountedObject.FDebugNext"/>
<element name="TRefCountedObject.FDebugPrev"/>
<element name="TRefCountedObject.FDebugList"/>
<element name="TRefCountedObject.FCritSect"/>
<element name="TRefCountedObject.FInDestroy"/>
<element name="TRefCountedObject.DbgAddName"/>
<element name="TRefCountedObject.DbgAddName.DebugIdAdr"/>
<element name="TRefCountedObject.DbgAddName.DebugIdTxt"/>
<element name="TRefCountedObject.DbgRemoveName"/>
<element name="TRefCountedObject.DbgRemoveName.DebugIdAdr"/>
<element name="TRefCountedObject.DbgRemoveName.DebugIdTxt"/>
<element name="TRefCountedObject.DoFree">
<short>
Performs actions needed to free the reference counted object instance.
</short>
<descr>
<p>
Calls the inherited Free method.
</p>
</descr>
<seealso/>
</element>
<element name="TRefCountedObject.DoReferenceAdded">
<short>Has an empty implementation in TRefCountedObject.</short>
<descr/>
<seealso/>
</element>
<element name="TRefCountedObject.DoReferenceReleased">
<short>Has an empty implementation in TRefCountedObject.</short>
<descr/>
<seealso/>
</element>
<element name="TRefCountedObject.RefCount">
<short>
Number of times the object instance has been referenced in the application.
</short>
<descr>
<p>
<var>RefCount</var> is a read-only <var>Integer</var> property which contains
the number of times the object instance has been referenced. Its value is
maintained when methods like <var>AddReference</var> and
<var>ReleaseReference</var> are called.
</p>
</descr>
<seealso>
<link id="TRefCountedObject.AddReference"/>
<link id="TRefCountedObject.ReleaseReference"/>
</seealso>
</element>
<element name="TRefCountedObject.Create">
<short>Constructor for the class instance.</short>
<descr>
<p>
Create is the constructor for the class instance. It sets the default values
for members used in the class instance.When WITH_REFCOUNT_DEBUG has been
defined in the LCL, a critical section used during debugging is initialized.
Create calls the inherited constructor prior to exiting from the method.
</p>
</descr>
<seealso>
<link id="TRefCountedObject.RefCount"/>
</seealso>
</element>
<element name="TRefCountedObject.Destroy">
<short>Destructor for the class instance.</short>
<descr>
<p>
<var>Destroy</var> is the overridden destructor for the class instance. It
ensures that resource allocated in the constructor are freed before freeing
the class instance. Destroy calls the inherited destructor prior to exit.
</p>
</descr>
<errors>
Destroy raises an EAssertionFailed exception if RefCount has a non-zero value
when the method was called.
</errors>
<seealso/>
</element>
<element name="TRefCountedObject.AddReference">
<short>Increments the value in RefCount and calls DoReferenceAdded.</short>
<descr>
<p>
AddReference and ReleaseReference can be used in threads. However a thread
can only call the methods, if either:
</p>
<ul>
<li>
The thread already holds a reference (and no other thread will release that
reference).
</li>
<li>
The thread created the reference, and no other thread has access to the
object (yet).
</li>
<li>
The thread is in a critical section, preventing other threads from decreasing
the reference count.
</li>
</ul>
</descr>
<seealso/>
</element>
<element name="TRefCountedObject.AddReference.DebugIdAdr">
<short>
Debugging symbol.
</short>
</element>
<element name="TRefCountedObject.AddReference.DebugIdTxt">
<short>
Debugging symbol.
</short>
</element>
<element name="TRefCountedObject.ReleaseReference">
<short>Decrements the value in RefCount and calls DoReferenceReleased.</short>
<descr>
<p>
AddReference and ReleaseReference can be used in threads. However a thread
can only call the methods, if either:
</p>
<ul>
<li>
The thread already holds a reference (and no other thread will release that
reference).
</li>
<li>
The thread created the reference, and no other thread has access to the
object (yet).
</li>
<li>
The thread is in a critical section, preventing other threads from decreasing
the reference count.
</li>
</ul>
</descr>
<seealso/>
</element>
<element name="TRefCountedObject.ReleaseReference.DebugIdAdr">
<short>
Debugging symbol.
</short>
</element>
<element name="TRefCountedObject.ReleaseReference.DebugIdTxt">
<short>
Debugging symbol.
</short>
</element>
<element name="TRefCountedObject.DbgRenameReference">
<short>
implemented when WITH_REFCOUNT_DEBUG is defined in the LCL.
</short>
<descr/>
<seealso/>
</element>
<element name="TRefCountedObject.DbgRenameReference.DebugIdAdr">
<short>
Debugging symbol.
</short>
</element>
<element name="TRefCountedObject.DbgRenameReference.DebugIdTxt">
<short>
Debugging symbol.
</short>
</element>
<element name="TRefCountedObject.DbgRenameReference.OldDebugIdAdr">
<short>
Debugging symbol.
</short>
</element>
<element name="TRefCountedObject.DbgRenameReference.OldDebugIdTxt">
<short>
Debugging symbol.
</short>
</element>
<element name="TRefCntObjList">
<short>
Implements a list used to store TRefCountedObject instances.
</short>
<descr>
<p>
Provides a <var>Notify</var> method which increases or decreases the
reference count for an object when it is added to or removed from the
list.ist.
</p>
</descr>
<seealso/>
</element>
<element name="TRefCntObjList.Notify">
<short>
Performs a notification when an object is added to or removed from the list.
</short>
<descr>
<p>
For TRefCntObjList, the notification causes the reference count for the
object in Ptr to be increased or decreased as needed for the value in Action.
</p>
</descr>
<seealso/>
</element>
<element name="TRefCntObjList.Notify.Ptr">
<short>
Pointer to the object instance for the notification.
</short>
</element>
<element name="TRefCntObjList.Notify.Action">
<short>
Identifies the action that caused the list notification.
</short>
</element>
<element name="ReleaseRefAndNil">
<short>
Releases the specified reference counted object and sets it to Nil.
</short>
<descr>
<p>
No actions are performed in the method when ARefCountedObject has not been
assigned, or has already been released. ReleaseRefAndNil calls the
ReleaseReference method for the object instance, and sets the pointer in
ARefCountedObject to Nil.
</p>
</descr>
<errors>
Raises an EAssertionFailed exception if the object instance in
ARefCountedObject is derived from a class other than TRefCountedObject.
</errors>
<seealso/>
</element>
<element name="ReleaseRefAndNil.ARefCountedObject">
<short>
TRefCountedObject object instance examined and updated in the routine.
</short>
</element>
<element name="ReleaseRefAndNil.DebugIdAdr">
<short>
Debugging symbol.
</short>
</element>
<element name="ReleaseRefAndNil.DebugIdTxt">
<short>
Debugging symbol.
</short>
</element>
<element name="NilThenReleaseRef">
<short>
Copies and releases the specified reference counted object, and sets the copy
to Nil.
</short>
<descr>
<p>
No actions are performed in the method when ARefCountedObject has not been
assigned, or has already been released. ReleaseRefAndNil calls the
ReleaseReference method for the object instance, and sets the pointer in
ARefCountedObject to Nil.
</p>
</descr>
<errors>
Raises an EAssertionFailed exception if the object instance in
ARefCountedObject is derived from a class other than TRefCountedObject.
</errors>
<seealso/>
</element>
<element name="NilThenReleaseRef.ARefCountedObject">
<short>
TRefCountedObject object instance examined and updated in the routine.
</short>
</element>
<element name="NilThenReleaseRef.DebugIdAdr">
<short>
Debugging symbol.
</short>
</element>
<element name="NilThenReleaseRef.DebugIdTxt">
<short>
Debugging symbol.
</short>
</element>
</module>
<!-- LazClasses -->
</package>
</fpdoc-descriptions>
|