summaryrefslogtreecommitdiff
path: root/utils/doc.main
diff options
context:
space:
mode:
Diffstat (limited to 'utils/doc.main')
-rw-r--r--utils/doc.main124
1 files changed, 59 insertions, 65 deletions
diff --git a/utils/doc.main b/utils/doc.main
index 5622ec3..28607a6 100644
--- a/utils/doc.main
+++ b/utils/doc.main
@@ -86,24 +86,23 @@ count of the pointed to data. This makes it easy to manage shared data structure
\item
\samepage
- {the archive file \com{libCcu.a}, which is usually instal\-led in
+ {the archive file \com{libIvl.a}, which is usually instal\-led in
\com{/usr/loc\-al/lib}, contains the library procedures. It must be loaded
with the object files which use \utils. This is usually performed
- by adding the flag \com{-lCcu} in the command line for your C++ compiler.
+ by adding the flag \com{-lIvl} in the command line for your C++ compiler.
For instance, you can type~:
\begin{center}
- \com{CC -o demo demo.C -lCcu}
+ \com{CC -o demo demo.C -lIvl}
\end{center}}
\end{enumerate}
-
\chapter{Memory allocators}
\label{Memory management}
-#class CcuAllocator
-#class CcuAllocatorOf
+#class IvlAllocator
+#class IvlAllocatorOf
\section{Allocating small objects}
When creating an instance of a C++ class, some memory is allocated for the object,
@@ -117,7 +116,7 @@ typedef int COORD;
class POINT {
private :
-static CcuAllocator* PtAlloc;
+static IvlAllocator* PtAlloc;
COORD X, Y;
public :
inline POINT (COORD, COORD) : X (x), Y (y) {}
@@ -125,14 +124,14 @@ inline POINT (COORD, COORD) : X (x), Y (y) {}
void operator delete (void*);
};
-CcuAllocator* POINT::PtAlloc = 0;
+IvlAllocator* POINT::PtAlloc = 0;
void*
POINT :: operator new (int)
{
/* Initialize the allocator for POINTs, if not done. */
if (!PtAlloc)
- PtAlloc = new CcuAllocator (sizeof (POINT));
+ PtAlloc = new IvlAllocator (sizeof (POINT));
return PtAlloc->Alloc ();
}
@@ -149,11 +148,10 @@ a class from class \typ{POINT}, if you do not overload \fun{operator new} again.
implementation would check the size argument against the size of chunks allocated
by the allocator being used.
-
\chapter{Dynamic arrays}
-#class CcuArray
-#class CcuArrayOf
+#class IvlArray
+#class IvlArrayOf
\chapter{Lists}
@@ -162,32 +160,32 @@ Arrays provide a way to do this, but are inappropriate when
these sets vary frequently and randomly, and especially when
new elements have to be inserted at any position.
-The classes \typ{CcuList} and \typ{CcuDList} are designed to manage such sets.
-\typ{CcuList} implements single linked lists, while \typ{CcuDList} implements
+The classes \typ{IvlList} and \typ{IvlDList} are designed to manage such sets.
+\typ{IvlList} implements single linked lists, while \typ{IvlDList} implements
double linked lists.
-Elements of a list can be enumerated by an iterator. The classes \typ{CcuListIter}
-and \typ{CcuDListIter} provide such iterators.
+Elements of a list can be enumerated by an iterator. The classes \typ{IvlListIter}
+and \typ{IvlDListIter} provide such iterators.
Lists can store objects of different types since the entries of the list are
of type \typ{void *}.
However you should be careful when using such heterogeneous lists.
\section {Simple lists}
-#iclass CcuList
+#iclass IvlList
\subsection {Iterating through lists}
-#iclass CcuListIter
+#iclass IvlListIter
\subsection{Generic versions}
-#iclass CcuListOf
-#iclass CcuListIterOf
+#iclass IvlListOf
+#iclass IvlListIterOf
\section {Bidirectionnal lists}
-#iclass CcuDList
+#iclass IvlDList
\subsection {Iterating}
-#iclass CcuDListIter
+#iclass IvlDListIter
\subsection{Generic versions}
-#iclass CcuDListOf
-#iclass CcuDListIterOf
+#iclass IvlDListOf
+#iclass IvlDListIterOf
\section {Example}
The following example illustrates a common usage of lists.
@@ -207,20 +205,19 @@ The following example illustrates a common usage of lists.
\chapter{Hash Tables}
-
-#iclass CcuHashTable
-#iclass CcuHashCell
+#iclass IvlHashTable
+#iclass IvlHashCell
\section{Iterating on hash tables}
-#iclass CcuHashCellIter
-#iclass CcuHashIter
+#iclass IvlHashCellIter
+#iclass IvlHashIter
\section{Strings as keys: dictionnaries}
-#iclass CcuDictionnary
+#iclass IvlDictionnary
\section{Generic classes}
-#iclass CcuHashTableOf
-#iclass CcuHashCellOf
-#iclass CcuHashCellIterOf
-#iclass CcuHashIterOf
-#iclass CcuDictionnaryOf
+#iclass IvlHashTableOf
+#iclass IvlHashCellOf
+#iclass IvlHashCellIterOf
+#iclass IvlHashIterOf
+#iclass IvlDictionnaryOf
\section{Example}
@@ -230,11 +227,11 @@ The keys are entered by the user, and the program assigns the information.
\begin{ccode}
main ()
{
- CcuDictionnary table (16);
+ IvlDictionnary table (16);
char line [256];
char *s;
int num = 0;
- CcuHashCell *h;
+ IvlHashCell *h;
int found;
table.Reset ();
@@ -315,33 +312,33 @@ main ()
\end{ccode}
\chapter{Identifier tables}
-#iclass CcuIdTable
-#iclass CcuIdIter
+#iclass IvlIdTable
+#iclass IvlIdIter
\chapter{Signal management}
-#class CcuSignalBlocker
+#class IvlSignalBlocker
-#class CcuBaseSignalHandler
-#class CcuSignalHandler
+#class IvlBaseSignalHandler
+#class IvlSignalHandler
\chapter{Time management}
\section{Measuring time}
\utils\ provides two classes for measuring time. The class
-\typ{CcuTimeStamp} provides a mean of dating events with reference to an absolute
-clock (the standard dating scheme of Unix), whereas the class \typ{CcuTime} makes it possible
+\typ{IvlTimeStamp} provides a mean of dating events with reference to an absolute
+clock (the standard dating scheme of Unix), whereas the class \typ{IvlTime} makes it possible
to measure time intervals.
-#iclass CcuTimeStamp
-#iclass CcuTime
+#iclass IvlTimeStamp
+#iclass IvlTime
\section{Timers}
-#iclass CcuCoreTimer
+#iclass IvlCoreTimer
\subsection{Signal-based timers}
-#iclass CcuBaseTimer
-#iclass CcuTimer
+#iclass IvlBaseTimer
+#iclass IvlTimer
\subsection{Example}
@@ -363,7 +360,6 @@ ding ()
write (1, "\n", 1); // change line each minute
}
-
void
done ()
{
@@ -373,9 +369,9 @@ done ()
main ()
{
- CcuTimer seconds (1000, tick);
- CcuTimer minutes (60000, ding);
- CcuTimer eggs (done, 180000, 0);
+ IvlTimer seconds (1000, tick);
+ IvlTimer minutes (60000, ding);
+ IvlTimer eggs (done, 180000, 0);
// wait for the eggs ...
// usual programs do other things meanwhile
for (;;)
@@ -386,14 +382,14 @@ main ()
\subsection{Deriving new kinds of timers}
If you have another source of interruptions than signals and
you want to map timers on it, you will need to derive a new class from
-\typ{CcuCoreTimer}. The derived class must implement the functions
+\typ{IvlCoreTimer}. The derived class must implement the functions
\fun{StartAlarm} and \fun{StopAlarm}. Its constructor must also provide a timer set
-to the constructor of \typ{CcuCoreTimer}. This timer set will hold all the timers of the
-new class. It will belong to the class \typ{CcuTimerSet}.
-#iclass CcuTimerSet
+to the constructor of \typ{IvlCoreTimer}. This timer set will hold all the timers of the
+new class. It will belong to the class \typ{IvlTimerSet}.
+#iclass IvlTimerSet
\chapter{Search paths}
-#class CcuDirPath
+#class IvlDirPath
\section{Example}
@@ -403,8 +399,7 @@ This example illustrates the use of the allocation mode with respect to
destroying the returned string.
\begin{ccode}
-CcuDirPath path;
-
+IvlDirPath path;
path.Append (".");
path.AppendEnvPath (getenv ("PATH"));
@@ -425,7 +420,7 @@ FreeString (file3); // safe (default allocation now true)
\end{ccode}
\chapter{Regular expressions}
-#class CcuRegExp
+#class IvlRegExp
\section{Example}
This procedure matches a string against a regular expression.
@@ -434,7 +429,7 @@ This procedure matches a string against a regular expression.
int
match (const char* exp, const char* s)
{
- CcuRegExp re (exp);
+ IvlRegExp re (exp);
if (!re.Compile ()) {
printf ("Cannot compile expression \"%s\"", exp);
return 0;
@@ -443,7 +438,6 @@ match (const char* exp, const char* s)
}
\end{ccode}
-
\chapter{Smart pointers}
The classes described here implement what we call smart pointers.
@@ -468,8 +462,8 @@ p = 0; // original object now unreachable
Smart pointers eliminate both problems, but of course with some run-time overhead.
-#class CcuSmartData
-#class CcuSmartPointerTo
+#class IvlSmartData
+#class IvlSmartPointerTo
\section{Example}