summaryrefslogtreecommitdiffstats
path: root/doc/man/man3/tqintcache.3qt
diff options
context:
space:
mode:
authorMichele Calgaro <michele.calgaro@yahoo.it>2025-07-26 11:44:58 +0900
committerMichele Calgaro <michele.calgaro@yahoo.it>2025-07-30 14:26:34 +0900
commit6dd781c483eea56f51ae0eff47d857976b5d0f0d (patch)
tree0ddd4408e142ae6f8b13d3538359abd127988b2f /doc/man/man3/tqintcache.3qt
parentff56b6fec14de4cd4b89d5b322531671d200b6e0 (diff)
downloadtqt-6dd781c483eea56f51ae0eff47d857976b5d0f0d.tar.gz
tqt-6dd781c483eea56f51ae0eff47d857976b5d0f0d.zip
Replace TRUE/FALSE with boolean values true/false - part 3
Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
Diffstat (limited to 'doc/man/man3/tqintcache.3qt')
-rw-r--r--doc/man/man3/tqintcache.3qt20
1 files changed, 10 insertions, 10 deletions
diff --git a/doc/man/man3/tqintcache.3qt b/doc/man/man3/tqintcache.3qt
index f49d9274e..20d8a80ee 100644
--- a/doc/man/man3/tqintcache.3qt
+++ b/doc/man/man3/tqintcache.3qt
@@ -52,7 +52,7 @@ Inherits TQPtrCollection.
.BI "virtual void \fBclear\fR ()"
.br
.ti -1c
-.BI "type * \fBfind\fR ( long k, bool ref = TRUE ) const"
+.BI "type * \fBfind\fR ( long k, bool ref = true ) const"
.br
.ti -1c
.BI "type * \fBoperator[]\fR ( long k ) const"
@@ -70,7 +70,7 @@ A cache is a least recently used (LRU) list of cache items, accessed via \fClong
.PP
Apart from insert(), by far the most important function is find() (which also exists as operator[]). This function looks up an item, returns it, and by default marks it as being the most recently used item.
.PP
-There are also methods to remove() or take() an object from the cache. Calling setAutoDelete(TRUE) for a cache tells it to delete items that are removed. The default is to not delete items when they are removed (i.e. remove() and take() are equivalent).
+There are also methods to remove() or take() an object from the cache. Calling setAutoDelete(true) for a cache tells it to delete items that are removed. The default is to not delete items when they are removed (i.e. remove() and take() are equivalent).
.PP
When inserting an item into the cache, only the pointer is copied, not the item itself. This is called a shallow copy. It is possible to make the cache copy all of the item's data (known as a deep copy) when an item is inserted. insert() calls the virtual function TQPtrCollection::newItem() for the item to be inserted. Inherit a dictionary and reimplement newItem() if you want deep copies.
.PP
@@ -102,20 +102,20 @@ Returns the number of items in the cache.
See also totalCost().
.PP
Reimplemented from TQPtrCollection.
-.SH "type * TQIntCache::find ( long k, bool ref = TRUE ) const"
-Returns the item associated with \fIk\fR, or 0 if the key does not exist in the cache. If \fIref\fR is TRUE (the default), the item is moved to the front of the least recently used list.
+.SH "type * TQIntCache::find ( long k, bool ref = true ) const"
+Returns the item associated with \fIk\fR, or 0 if the key does not exist in the cache. If \fIref\fR is true (the default), the item is moved to the front of the least recently used list.
.PP
If there are two or more items with equal keys, the one that was inserted most recently is returned.
.SH "bool TQIntCache::insert ( long k, const type * d, int c = 1, int p = 0 )"
-Inserts the item \fId\fR into the cache with key \fIk\fR and assigns it a cost of \fIc\fR (default 1). Returns TRUE if it succeeds; otherwise returns FALSE.
+Inserts the item \fId\fR into the cache with key \fIk\fR and assigns it a cost of \fIc\fR (default 1). Returns true if it succeeds; otherwise returns false.
.PP
The cache's size is limited, and if the total cost is too high, TQIntCache will remove old, least-used items until there is room for this new item.
.PP
The parameter \fIp\fR is internal and should be left at the default value (0).
.PP
-\fBWarning:\fR If this function returns FALSE (for example, the cost \fC,\fR exceeds maxCost()), you must delete \fId\fR yourself. Additionally, be very careful about using \fId\fR after calling this function. Any other insertions into the cache, from anywhere in the application or within TQt itself, could cause the object to be discarded from the cache and the pointer to become invalid.
+\fBWarning:\fR If this function returns false (for example, the cost \fC,\fR exceeds maxCost()), you must delete \fId\fR yourself. Additionally, be very careful about using \fId\fR after calling this function. Any other insertions into the cache, from anywhere in the application or within TQt itself, could cause the object to be discarded from the cache and the pointer to become invalid.
.SH "bool TQIntCache::isEmpty () const"
-Returns TRUE if the cache is empty; otherwise returns FALSE.
+Returns true if the cache is empty; otherwise returns false.
.SH "int TQIntCache::maxCost () const"
Returns the maximum allowed total cost of the cache.
.PP
@@ -125,13 +125,13 @@ Returns the item associated with \fIk\fR, or 0 if \fIk\fR does not exist in the
.PP
If there are two or more items with equal keys, the one that was inserted most recently is returned.
.PP
-This is the same as find( k, TRUE ).
+This is the same as find( k, true ).
.PP
See also find().
.SH "bool TQIntCache::remove ( long k )"
-Removes the item associated with \fIk\fR, and returns TRUE if the item was present in the cache; otherwise returns FALSE.
+Removes the item associated with \fIk\fR, and returns true if the item was present in the cache; otherwise returns false.
.PP
-The item is deleted if auto-deletion has been enabled, i.e. if you have called setAutoDelete(TRUE).
+The item is deleted if auto-deletion has been enabled, i.e. if you have called setAutoDelete(true).
.PP
If there are two or more items with equal keys, the one that was inserted most recently is removed.
.PP