From 4d495175043c399fdca6e1bb4c74ef176fc76fb4 Mon Sep 17 00:00:00 2001 From: Michele Calgaro Date: Wed, 6 Aug 2025 11:29:57 +0900 Subject: Replace TRUE/FALSE with boolean values true/false - part 4 Signed-off-by: Michele Calgaro --- doc/html/tqasciicache.html | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) (limited to 'doc/html/tqasciicache.html') diff --git a/doc/html/tqasciicache.html b/doc/html/tqasciicache.html index 0f4a5216b..179f3f21d 100644 --- a/doc/html/tqasciicache.html +++ b/doc/html/tqasciicache.html @@ -37,7 +37,7 @@ body { background: #ffffff; color: black; }

List of all member functions.

Public Members

@@ -75,7 +75,7 @@ the least recently used items in the cache are removed. item, returns it, and by default marks it as being the most recently used item.

There are also methods to remove() or take() an object from the -cache. Calling setAutoDelete(TRUE) tells the cache to delete items that +cache. Calling setAutoDelete(true) tells the cache to delete items that are removed. The default is to not delete items when then are removed (i.e., remove() and take() are equivalent).

When inserting an item into the cache, only the pointer is copied, @@ -91,7 +91,7 @@ items in the cache in arbitrary order.

See also TQAsciiCacheIterator, TQCache, TQIntCache, Collection Classes, and Non-GUI Classes.


Member Function Documentation

-

TQAsciiCache::TQAsciiCache ( int maxCost = 100, int size = 17, bool caseSensitive = TRUE, bool copyKeys = TRUE ) +

TQAsciiCache::TQAsciiCache ( int maxCost = 100, int size = 17, bool caseSensitive = true, bool copyKeys = true )

Constructs a cache whose contents will never have a total cost @@ -104,10 +104,10 @@ largest expected number of items in the cache. item, if the total cost of all items in the cache will exceed maxCost, the cache will start throwing out the older (least recently used) items until there is enough room for the new item to be inserted. -

If caseSensitive is TRUE (the default), the cache keys are case -sensitive; if it is FALSE, they are case-insensitive. +

If caseSensitive is true (the default), the cache keys are case +sensitive; if it is false, they are case-insensitive. Case-insensitive comparison only affects the 26 letters in -US-ASCII. If copyKeys is TRUE (the default), TQAsciiCache makes +US-ASCII. If copyKeys is true (the default), TQAsciiCache makes a copy of the cache keys, otherwise it copies just the const char * pointer - slightly faster if you can guarantee that the keys will never change, but very risky. @@ -134,11 +134,11 @@ enabled.

See also totalCost() and size().

Reimplemented from TQPtrCollection. -

type * TQAsciiCache::find ( const char * k, bool ref = TRUE ) const +

type * TQAsciiCache::find ( const char * k, bool ref = true ) const

Returns the item with key k, or 0 if the key does not exist -in the cache. If ref is TRUE (the default), the item is moved +in the cache. If ref is true (the default), the item is moved to the front of the least recently used list.

If there are two or more items with equal keys, the one that was inserted last is returned. @@ -147,8 +147,8 @@ inserted last is returned.

Inserts the item d into the cache using key k, and with an -associated cost of c. Returns TRUE if the item is successfully -inserted. Returns FALSE if the item is not inserted, for example, +associated cost of c. Returns true if the item is successfully +inserted. Returns false if the item is not inserted, for example, if the cost of the item exceeds maxCost().

The cache's size is limited, and if the total cost is too high, TQAsciiCache will remove old, least recently used items until there @@ -156,7 +156,7 @@ is room for this new item.

Items with duplicate keys can be inserted.

The parameter p is internal and should be left at the default value (0). -

Warning: If this function returns FALSE, you must delete d +

Warning: If this function returns false, you must delete d yourself. Additionally, be very careful about using d after calling this function, because any other insertions into the cache, from anywhere in the application or within TQt itself, could @@ -166,7 +166,7 @@ become invalid.

bool TQAsciiCache::isEmpty () const

-

Returns TRUE if the cache is empty; otherwise returns FALSE. +

Returns true if the cache is empty; otherwise returns false.

int TQAsciiCache::maxCost () const

@@ -182,16 +182,16 @@ the cache, and moves the item to the front of the least recently used list.

If there are two or more items with equal keys, the one that was inserted last is returned. -

This is the same as find( k, TRUE ). +

This is the same as find( k, true ).

See also find().

bool TQAsciiCache::remove ( const char * k )

-

Removes the item with key k and returns TRUE if the item was -present in the cache; otherwise returns FALSE. +

Removes the item with key k and returns true if the item was +present in the cache; otherwise returns false.

The item is deleted if auto-deletion has been enabled, i.e., if -you have called setAutoDelete(TRUE). +you have called setAutoDelete(true).

If there are two or more items with equal keys, the one that was inserted last is removed.

All iterators that refer to the removed item are set to point to -- cgit v1.2.3