summaryrefslogtreecommitdiffstats
path: root/doc/man/man3/tqasciicache.3qt
diff options
context:
space:
mode:
Diffstat (limited to 'doc/man/man3/tqasciicache.3qt')
-rw-r--r--doc/man/man3/tqasciicache.3qt26
1 files changed, 13 insertions, 13 deletions
diff --git a/doc/man/man3/tqasciicache.3qt b/doc/man/man3/tqasciicache.3qt
index c03f1e74a..0022d1a86 100644
--- a/doc/man/man3/tqasciicache.3qt
+++ b/doc/man/man3/tqasciicache.3qt
@@ -16,7 +16,7 @@ Inherits TQPtrCollection.
.SS "Public Members"
.in +1c
.ti -1c
-.BI "\fBTQAsciiCache\fR ( int maxCost = 100, int size = 17, bool caseSensitive = TRUE, bool copyKeys = TRUE )"
+.BI "\fBTQAsciiCache\fR ( int maxCost = 100, int size = 17, bool caseSensitive = true, bool copyKeys = true )"
.br
.ti -1c
.BI "\fB~TQAsciiCache\fR ()"
@@ -52,7 +52,7 @@ Inherits TQPtrCollection.
.BI "type * \fBtake\fR ( const char * k )"
.br
.ti -1c
-.BI "type * \fBfind\fR ( const char * k, bool ref = TRUE ) const"
+.BI "type * \fBfind\fR ( const char * k, bool ref = true ) const"
.br
.ti -1c
.BI "type * \fBoperator[]\fR ( const char * k ) const"
@@ -72,7 +72,7 @@ Each cache item has a cost. The sum of item costs, totalCost(), will not exceed
.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) 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).
+There are also methods to remove() or take() an object from the 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).
.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 cache and reimplement newItem() if you want deep copies.
.PP
@@ -82,14 +82,14 @@ There is a TQAsciiCacheIterator which may be used to traverse the items in the c
.PP
See also TQAsciiCacheIterator, TQCache, TQIntCache, Collection Classes, and Non-GUI Classes.
.SH MEMBER FUNCTION DOCUMENTATION
-.SH "TQAsciiCache::TQAsciiCache ( int maxCost = 100, int size = 17, bool caseSensitive = TRUE, bool copyKeys = TRUE )"
+.SH "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 greater than \fImaxCost\fR and which is expected to contain less than \fIsize\fR items.
.PP
\fIsize\fR is actually the size of an internal hash array; it's usually best to make it prime and at least 50% bigger than the largest expected number of items in the cache.
.PP
Each inserted item has an associated cost. When inserting a new item, if the total cost of all items in the cache will exceed \fImaxCost\fR, the cache will start throwing out the older (least recently used) items until there is enough room for the new item to be inserted.
.PP
-If \fIcaseSensitive\fR 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 \fIcopyKeys\fR 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.
+If \fIcaseSensitive\fR 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 \fIcopyKeys\fR 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.
.SH "TQAsciiCache::~TQAsciiCache ()"
Removes all items from the cache and destroys it. All iterators that access this cache will be reset.
.SH "void TQAsciiCache::clear ()\fC [virtual]\fR"
@@ -106,12 +106,12 @@ Returns the number of items in the cache.
See also totalCost() and size().
.PP
Reimplemented from TQPtrCollection.
-.SH "type * TQAsciiCache::find ( const char * k, bool ref = TRUE ) const"
-Returns the item with key \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 * TQAsciiCache::find ( const char * k, bool ref = true ) const"
+Returns the item with key \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 last is returned.
.SH "bool TQAsciiCache::insert ( const char * k, const type * d, int c = 1, int p = 0 )"
-Inserts the item \fId\fR into the cache using key \fIk\fR, and with an associated cost of \fIc\fR. 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().
+Inserts the item \fId\fR into the cache using key \fIk\fR, and with an associated cost of \fIc\fR. 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().
.PP
The cache's size is limited, and if the total cost is too high, TQAsciiCache will remove old, least recently used items until there is room for this new item.
.PP
@@ -119,9 +119,9 @@ Items with duplicate keys can be inserted.
.PP
The parameter \fIp\fR is internal and should be left at the default value (0).
.PP
-\fBWarning:\fR If this function returns FALSE, you must delete \fId\fR yourself. Additionally, be very careful about using \fId\fR after calling this function, because 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, you must delete \fId\fR yourself. Additionally, be very careful about using \fId\fR after calling this function, because 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 TQAsciiCache::isEmpty () const"
-Returns TRUE if the cache is empty; otherwise returns FALSE.
+Returns true if the cache is empty; otherwise returns false.
.SH "int TQAsciiCache::maxCost () const"
Returns the maximum allowed total cost of the cache.
.PP
@@ -131,13 +131,13 @@ Returns the item with key \fIk\fR, or 0 if \fIk\fR does not exist in the cache,
.PP
If there are two or more items with equal keys, the one that was inserted last 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 TQAsciiCache::remove ( const char * k )"
-Removes the item with key \fIk\fR and returns TRUE if the item was present in the cache; otherwise returns FALSE.
+Removes the item with key \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 last is removed.
.PP