|
@@ -157,6 +157,9 @@ If not enough memory is available, an 'out of memory' error will occur.
|
|
\seep{DisposeStr}
|
|
\seep{DisposeStr}
|
|
\end{function}
|
|
\end{function}
|
|
|
|
|
|
|
|
+\latex{\inputlisting{objectex/ex40.pp}}
|
|
|
|
+\html{\input{objectex/ex40.tex}}
|
|
|
|
+
|
|
\begin{procedure}{DisposeStr}
|
|
\begin{procedure}{DisposeStr}
|
|
\Declaration
|
|
\Declaration
|
|
Procedure DisposeStr (P: PString);
|
|
Procedure DisposeStr (P: PString);
|
|
@@ -168,6 +171,7 @@ None.
|
|
\seef{NewStr}
|
|
\seef{NewStr}
|
|
\end{procedure}
|
|
\end{procedure}
|
|
|
|
|
|
|
|
+For an example, see \seef{NewStr}.
|
|
|
|
|
|
\begin{procedure}{Abstract}
|
|
\begin{procedure}{Abstract}
|
|
\Declaration
|
|
\Declaration
|
|
@@ -1409,6 +1413,8 @@ error.
|
|
\seepl{Insert}{TCollection.Insert}
|
|
\seepl{Insert}{TCollection.Insert}
|
|
\end{function}
|
|
\end{function}
|
|
|
|
|
|
|
|
+\latex{\inputlisting{objectex/ex23.pp}}
|
|
|
|
+\html{\input{objectex/ex23.tex}}
|
|
|
|
|
|
\begin{function}{TCollection.IndexOf}
|
|
\begin{function}{TCollection.IndexOf}
|
|
\Declaration
|
|
\Declaration
|
|
@@ -1482,6 +1488,8 @@ None.
|
|
\seepl{SetLimit}{TCollection.SetLimit}
|
|
\seepl{SetLimit}{TCollection.SetLimit}
|
|
\end{procedure}
|
|
\end{procedure}
|
|
|
|
|
|
|
|
+\latex{\inputlisting{objectex/ex26.pp}}
|
|
|
|
+\html{\input{objectex/ex26.tex}}
|
|
|
|
|
|
\begin{procedure}{TCollection.FreeAll}
|
|
\begin{procedure}{TCollection.FreeAll}
|
|
\Declaration
|
|
\Declaration
|
|
@@ -1496,6 +1504,10 @@ does set \var{Count} to zero.
|
|
\end{procedure}
|
|
\end{procedure}
|
|
|
|
|
|
|
|
|
|
|
|
+\latex{\inputlisting{objectex/ex28.pp}}
|
|
|
|
+\html{\input{objectex/ex28.tex}}
|
|
|
|
+
|
|
|
|
+
|
|
\begin{procedure}{TCollection.DeleteAll}
|
|
\begin{procedure}{TCollection.DeleteAll}
|
|
\Declaration
|
|
\Declaration
|
|
Procedure TCollection.DeleteAll;
|
|
Procedure TCollection.DeleteAll;
|
|
@@ -1510,6 +1522,9 @@ None.
|
|
\seepl{FreeAll}{TCollection.FreeAll}, \seepl{Delete}{TCollection.Delete}
|
|
\seepl{FreeAll}{TCollection.FreeAll}, \seepl{Delete}{TCollection.Delete}
|
|
\end{procedure}
|
|
\end{procedure}
|
|
|
|
|
|
|
|
+\latex{\inputlisting{objectex/ex29.pp}}
|
|
|
|
+\html{\input{objectex/ex29.tex}}
|
|
|
|
+
|
|
|
|
|
|
\begin{procedure}{TCollection.Free}
|
|
\begin{procedure}{TCollection.Free}
|
|
\Declaration
|
|
\Declaration
|
|
@@ -1525,6 +1540,9 @@ If the \var{Item} is not in the collection, \var{Error} will be called with
|
|
\end{procedure}
|
|
\end{procedure}
|
|
|
|
|
|
|
|
|
|
|
|
+\latex{\inputlisting{objectex/ex30.pp}}
|
|
|
|
+\html{\input{objectex/ex30.tex}}
|
|
|
|
+
|
|
\begin{procedure}{TCollection.Insert}
|
|
\begin{procedure}{TCollection.Insert}
|
|
\Declaration
|
|
\Declaration
|
|
Procedure TCollection.Insert (Item: Pointer); Virtual;
|
|
Procedure TCollection.Insert (Item: Pointer); Virtual;
|
|
@@ -1554,6 +1572,9 @@ If the \var{Item} is not in the collection, \var{Error} will be called with
|
|
\end{procedure}
|
|
\end{procedure}
|
|
|
|
|
|
|
|
|
|
|
|
+\latex{\inputlisting{objectex/ex31.pp}}
|
|
|
|
+\html{\input{objectex/ex31.tex}}
|
|
|
|
+
|
|
\begin{procedure}{TCollection.AtFree}
|
|
\begin{procedure}{TCollection.AtFree}
|
|
\Declaration
|
|
\Declaration
|
|
Procedure TCollection.AtFree (Index: Sw\_Integer);
|
|
Procedure TCollection.AtFree (Index: Sw\_Integer);
|
|
@@ -1567,12 +1588,18 @@ with \var{CoIndexError}.
|
|
\seepl{Free}{TCollection.Free}, \seepl{AtDelete}{TCollection.AtDelete}
|
|
\seepl{Free}{TCollection.Free}, \seepl{AtDelete}{TCollection.AtDelete}
|
|
\end{procedure}
|
|
\end{procedure}
|
|
|
|
|
|
|
|
+\latex{\inputlisting{objectex/ex32.pp}}
|
|
|
|
+\html{\input{objectex/ex32.tex}}
|
|
|
|
+
|
|
|
|
|
|
\begin{procedure}{TCollection.FreeItem}
|
|
\begin{procedure}{TCollection.FreeItem}
|
|
\Declaration
|
|
\Declaration
|
|
Procedure TCollection.FreeItem (Item: Pointer); Virtual;
|
|
Procedure TCollection.FreeItem (Item: Pointer); Virtual;
|
|
\Description
|
|
\Description
|
|
\var{FreeItem} calls the destructor of \var{Item} if it is not nil.
|
|
\var{FreeItem} calls the destructor of \var{Item} if it is not nil.
|
|
|
|
+
|
|
|
|
+This function is used internally by the TCollection object, and should not be
|
|
|
|
+called directly.
|
|
\Errors
|
|
\Errors
|
|
None.
|
|
None.
|
|
\SeeAlso
|
|
\SeeAlso
|
|
@@ -1594,6 +1621,9 @@ with \var{CoIndexError}.
|
|
\end{procedure}
|
|
\end{procedure}
|
|
|
|
|
|
|
|
|
|
|
|
+\latex{\inputlisting{objectex/ex33.pp}}
|
|
|
|
+\html{\input{objectex/ex33.tex}}
|
|
|
|
+
|
|
\begin{procedure}{TCollection.ForEach}
|
|
\begin{procedure}{TCollection.ForEach}
|
|
\Declaration
|
|
\Declaration
|
|
Procedure TCollection.ForEach (Action: Pointer);
|
|
Procedure TCollection.ForEach (Action: Pointer);
|
|
@@ -1610,6 +1640,10 @@ None.
|
|
\end{procedure}
|
|
\end{procedure}
|
|
|
|
|
|
|
|
|
|
|
|
+\latex{\inputlisting{objectex/ex21.pp}}
|
|
|
|
+\html{\input{objectex/ex21.tex}}
|
|
|
|
+
|
|
|
|
+
|
|
\begin{procedure}{TCollection.SetLimit}
|
|
\begin{procedure}{TCollection.SetLimit}
|
|
\Declaration
|
|
\Declaration
|
|
Procedure TCollection.SetLimit (ALimit: Sw\_Integer); Virtual;
|
|
Procedure TCollection.SetLimit (ALimit: Sw\_Integer); Virtual;
|
|
@@ -1623,6 +1657,7 @@ None.
|
|
\seepl{Init}{TCollection.Init}
|
|
\seepl{Init}{TCollection.Init}
|
|
\end{procedure}
|
|
\end{procedure}
|
|
|
|
|
|
|
|
+For an example, see \seepl{Pack}{TCollection.Pack}.
|
|
|
|
|
|
\begin{procedure}{TCollection.Error}
|
|
\begin{procedure}{TCollection.Error}
|
|
\Declaration
|
|
\Declaration
|
|
@@ -1631,11 +1666,14 @@ Procedure TCollection.Error (Code, Info: Integer); Virtual;
|
|
\var{Error} is called by the various \var{TCollection} methods
|
|
\var{Error} is called by the various \var{TCollection} methods
|
|
in case of an error condition. The default behaviour is to make
|
|
in case of an error condition. The default behaviour is to make
|
|
a call to \var{RunError} with an error of \var{212-Code}.
|
|
a call to \var{RunError} with an error of \var{212-Code}.
|
|
|
|
+
|
|
|
|
+This method can be overridden by descendent objects to implement
|
|
|
|
+a different error-handling.
|
|
\Errors
|
|
\Errors
|
|
\SeeAlso
|
|
\SeeAlso
|
|
|
|
+\seep{Abstract}
|
|
\end{procedure}
|
|
\end{procedure}
|
|
|
|
|
|
-
|
|
|
|
\begin{procedure}{TCollection.AtPut}
|
|
\begin{procedure}{TCollection.AtPut}
|
|
\Declaration
|
|
\Declaration
|
|
Procedure TCollection.AtPut (Index: Sw\_Integer; Item: Pointer);
|
|
Procedure TCollection.AtPut (Index: Sw\_Integer; Item: Pointer);
|
|
@@ -1648,6 +1686,7 @@ with \var{CoIndexError}.
|
|
\SeeAlso
|
|
\SeeAlso
|
|
\end{procedure}
|
|
\end{procedure}
|
|
|
|
|
|
|
|
+For an example, see \seepl{Pack}{TCollection.Pack}.
|
|
|
|
|
|
\begin{procedure}{TCollection.AtInsert}
|
|
\begin{procedure}{TCollection.AtInsert}
|
|
\Declaration
|
|
\Declaration
|
|
@@ -1665,6 +1704,9 @@ with \var{CoIndexError}. If the collection fails to expand, then
|
|
\end{procedure}
|
|
\end{procedure}
|
|
|
|
|
|
|
|
|
|
|
|
+\latex{\inputlisting{objectex/ex34.pp}}
|
|
|
|
+\html{\input{objectex/ex34.tex}}
|
|
|
|
+
|
|
\begin{procedure}{TCollection.Store}
|
|
\begin{procedure}{TCollection.Store}
|
|
\Declaration
|
|
\Declaration
|
|
Procedure TCollection.Store (Var S: TStream);
|
|
Procedure TCollection.Store (Var S: TStream);
|
|
@@ -1681,19 +1723,21 @@ Errors returned are those by \seep{TStream.Put}.
|
|
\seepl{Load}{TCollection.Load}, \seepl{PutItem}{TCollection.PutItem}
|
|
\seepl{Load}{TCollection.Load}, \seepl{PutItem}{TCollection.PutItem}
|
|
\end{procedure}
|
|
\end{procedure}
|
|
|
|
|
|
|
|
+For an example, see seepl{Load}{TCollection.Load}.
|
|
|
|
|
|
\begin{procedure}{TCollection.PutItem}
|
|
\begin{procedure}{TCollection.PutItem}
|
|
\Declaration
|
|
\Declaration
|
|
Procedure TCollection.PutItem (Var S: TStream; Item: Pointer); Virtual;
|
|
Procedure TCollection.PutItem (Var S: TStream; Item: Pointer); Virtual;
|
|
\Description
|
|
\Description
|
|
-\var{PutItem} writes \var{Item} to stream \var{S}.
|
|
|
|
|
|
+\var{PutItem} writes \var{Item} to stream \var{S}. This method is used
|
|
|
|
+internaly by the \var{TCollection} object, and should not be called
|
|
|
|
+directly.
|
|
\Errors
|
|
\Errors
|
|
Errors are those returned by \seep{TStream.Put}.
|
|
Errors are those returned by \seep{TStream.Put}.
|
|
\SeeAlso
|
|
\SeeAlso
|
|
\seepl{Store}{TCollection.Store}, \seefl{GetItem}{TCollection.GetItem}.
|
|
\seepl{Store}{TCollection.Store}, \seefl{GetItem}{TCollection.GetItem}.
|
|
\end{procedure}
|
|
\end{procedure}
|
|
|
|
|
|
-
|
|
|
|
\section{TSortedCollection}
|
|
\section{TSortedCollection}
|
|
\label{se:TSortedCollection}
|
|
\label{se:TSortedCollection}
|
|
|
|
|
|
@@ -1731,6 +1775,12 @@ TYPE
|
|
PSortedCollection = ^TSortedCollection;
|
|
PSortedCollection = ^TSortedCollection;
|
|
\end{verbatim}
|
|
\end{verbatim}
|
|
|
|
|
|
|
|
+In the subsequent examples, the following descendent of
|
|
|
|
+\var{TSortedCollection} is used:
|
|
|
|
+
|
|
|
|
+\latex{\inputlisting{objectex/mysortc.pp}}
|
|
|
|
+\html{\input{objectex/mysortc.tex}}
|
|
|
|
+
|
|
\begin{procedure}{TSortedCollection.Init}
|
|
\begin{procedure}{TSortedCollection.Init}
|
|
\Declaration
|
|
\Declaration
|
|
Constructor TSortedCollection.Init (ALimit, ADelta: Sw\_Integer);
|
|
Constructor TSortedCollection.Init (ALimit, ADelta: Sw\_Integer);
|
|
@@ -1747,6 +1797,8 @@ None.
|
|
\seepl{Load}{TSortedCollection.Load}, \seepl{Done}{TCollection.Done}
|
|
\seepl{Load}{TSortedCollection.Load}, \seepl{Done}{TCollection.Done}
|
|
\end{procedure}
|
|
\end{procedure}
|
|
|
|
|
|
|
|
+For an example, see
|
|
|
|
+
|
|
\begin{procedure}{TSortedCollection.Load}
|
|
\begin{procedure}{TSortedCollection.Load}
|
|
\Declaration
|
|
\Declaration
|
|
Constructor Load (Var S: TStream);
|
|
Constructor Load (Var S: TStream);
|
|
@@ -1763,6 +1815,8 @@ None.
|
|
\seepl{Init}{TSortedCollection.Init}, \seepl{Done}{TCollection.Done}
|
|
\seepl{Init}{TSortedCollection.Init}, \seepl{Done}{TCollection.Done}
|
|
\end{procedure}
|
|
\end{procedure}
|
|
|
|
|
|
|
|
+For an example, see \seep{TCollection.Load}.
|
|
|
|
+
|
|
\begin{function}{TSortedCollection.KeyOf}
|
|
\begin{function}{TSortedCollection.KeyOf}
|
|
\Declaration
|
|
\Declaration
|
|
Function TSortedCollection.KeyOf (Item: Pointer): Pointer; Virtual;
|
|
Function TSortedCollection.KeyOf (Item: Pointer): Pointer; Virtual;
|
|
@@ -1799,6 +1853,8 @@ None.
|
|
\seefl{Compare}{TSortedCollection.Compare}.
|
|
\seefl{Compare}{TSortedCollection.Compare}.
|
|
\end{function}
|
|
\end{function}
|
|
|
|
|
|
|
|
+For an example, see \seef{TCollection.IndexOf}
|
|
|
|
+
|
|
\begin{function}{TSortedCollection.Compare}
|
|
\begin{function}{TSortedCollection.Compare}
|
|
\Declaration
|
|
\Declaration
|
|
Function TSortedCollection.Compare (Key1, Key2: Pointer): Sw\_Integer; Virtual;
|
|
Function TSortedCollection.Compare (Key1, Key2: Pointer): Sw\_Integer; Virtual;
|
|
@@ -1826,6 +1882,10 @@ An 'abstract run-time error' will be generated if you call
|
|
\seefl{Search}{TSortedCollection.Search}
|
|
\seefl{Search}{TSortedCollection.Search}
|
|
\end{function}
|
|
\end{function}
|
|
|
|
|
|
|
|
+\latex{\inputlisting{objectex/mysortc.pp}}
|
|
|
|
+\html{\input{objectex/mysortc.tex}}
|
|
|
|
+
|
|
|
|
+
|
|
\begin{function}{TSortedCollection.Search}
|
|
\begin{function}{TSortedCollection.Search}
|
|
\Declaration
|
|
\Declaration
|
|
Function TSortedCollection.Search (Key: Pointer; Var Index: Sw\_Integer): Boolean;Virtual;
|
|
Function TSortedCollection.Search (Key: Pointer; Var Index: Sw\_Integer): Boolean;Virtual;
|
|
@@ -1846,6 +1906,9 @@ None.
|
|
\seefl{IndexOf}{TCollection.IndexOf}.
|
|
\seefl{IndexOf}{TCollection.IndexOf}.
|
|
\end{function}
|
|
\end{function}
|
|
|
|
|
|
|
|
+\latex{\inputlisting{objectex/ex36.pp}}
|
|
|
|
+\html{\input{objectex/ex36.tex}}
|
|
|
|
+
|
|
\begin{procedure}{TSortedCollection.Insert}
|
|
\begin{procedure}{TSortedCollection.Insert}
|
|
\Declaration
|
|
\Declaration
|
|
Procedure TSortedCollection.Insert (Item: Pointer); Virtual;
|
|
Procedure TSortedCollection.Insert (Item: Pointer); Virtual;
|
|
@@ -1863,6 +1926,9 @@ None.
|
|
\seepl{AtInsert}{TCollection.AtInsert}
|
|
\seepl{AtInsert}{TCollection.AtInsert}
|
|
\end{procedure}
|
|
\end{procedure}
|
|
|
|
|
|
|
|
+\latex{\inputlisting{objectex/ex35.pp}}
|
|
|
|
+\html{\input{objectex/ex35.tex}}
|
|
|
|
+
|
|
\begin{procedure}{TSortedCollection.Store}
|
|
\begin{procedure}{TSortedCollection.Store}
|
|
\Declaration
|
|
\Declaration
|
|
Procedure TSortedCollection.Store (Var S: TStream);
|
|
Procedure TSortedCollection.Store (Var S: TStream);
|
|
@@ -1879,6 +1945,8 @@ Errors can be those of \seep{TStream.Put}.
|
|
\seepl{Load}{TSortedCollection.Load}
|
|
\seepl{Load}{TSortedCollection.Load}
|
|
\end{procedure}
|
|
\end{procedure}
|
|
|
|
|
|
|
|
+For an example, see \seep{TCollection.Load}.
|
|
|
|
+
|
|
\section{TStringCollection}
|
|
\section{TStringCollection}
|
|
\label{se:TStringCollection}
|
|
\label{se:TStringCollection}
|
|
|
|
|
|
@@ -1900,7 +1968,6 @@ TYPE
|
|
PStringCollection = ^TStringCollection;
|
|
PStringCollection = ^TStringCollection;
|
|
\end{verbatim}
|
|
\end{verbatim}
|
|
|
|
|
|
-
|
|
|
|
\begin{function}{TStringCollection.GetItem}
|
|
\begin{function}{TStringCollection.GetItem}
|
|
\Declaration
|
|
\Declaration
|
|
Function TStringCollection.GetItem (Var S: TStream): Pointer; Virtual;
|
|
Function TStringCollection.GetItem (Var S: TStream): Pointer; Virtual;
|
|
@@ -1935,6 +2002,9 @@ None.
|
|
\seef{TSortedCollection.Compare}
|
|
\seef{TSortedCollection.Compare}
|
|
\end{function}
|
|
\end{function}
|
|
|
|
|
|
|
|
+\latex{\inputlisting{objectex/ex37.pp}}
|
|
|
|
+\html{\input{objectex/ex37.tex}}
|
|
|
|
+
|
|
\begin{procedure}{TStringCollection.FreeItem}
|
|
\begin{procedure}{TStringCollection.FreeItem}
|
|
\Declaration
|
|
\Declaration
|
|
Procedure TStringCollection.FreeItem (Item: Pointer); Virtual;
|
|
Procedure TStringCollection.FreeItem (Item: Pointer); Virtual;
|
|
@@ -2020,6 +2090,11 @@ None.
|
|
\seef{TSortedCollection.Compare}
|
|
\seef{TSortedCollection.Compare}
|
|
\end{function}
|
|
\end{function}
|
|
|
|
|
|
|
|
+
|
|
|
|
+\latex{\inputlisting{objectex/ex38.pp}}
|
|
|
|
+\html{\input{objectex/ex38.tex}}
|
|
|
|
+
|
|
|
|
+
|
|
\begin{procedure}{TStrCollection.FreeItem}
|
|
\begin{procedure}{TStrCollection.FreeItem}
|
|
\Declaration
|
|
\Declaration
|
|
Procedure TStrCollection.FreeItem (Item: Pointer); Virtual;
|
|
Procedure TStrCollection.FreeItem (Item: Pointer); Virtual;
|
|
@@ -2079,6 +2154,9 @@ strings.
|
|
\SeeAlso
|
|
\SeeAlso
|
|
\end{procedure}
|
|
\end{procedure}
|
|
|
|
|
|
|
|
+\latex{\inputlisting{objectex/ex39.pp}}
|
|
|
|
+\html{\input{objectex/ex39.tex}}
|
|
|
|
+
|
|
\section{TResourceCollection}
|
|
\section{TResourceCollection}
|
|
\label{se:TResourceCollection}
|
|
\label{se:TResourceCollection}
|
|
|
|
|
|
@@ -2330,7 +2408,6 @@ Errors returned may be those by \seep{TStream.Put} and \var{TStream.Seek}
|
|
\seefl{Get}{TResourceFile.Get}
|
|
\seefl{Get}{TResourceFile.Get}
|
|
\end{procedure}
|
|
\end{procedure}
|
|
|
|
|
|
-
|
|
|
|
\section{TStringList}
|
|
\section{TStringList}
|
|
\label{se:TStringList}
|
|
\label{se:TStringList}
|
|
|
|
|