Cryptography Reference
In-Depth Information
CHAPTER 15
The LINT Public
Interface: Members
and Friends
Please accept my resignation. I don't want to belong to any club that will
accept me as a member.
—Groucho Marx
Every time I paint a portrait I lose a friend
—John Singer Sargent
I N ADDITION TO THE CONSTRUCTOR functions and operators already discussed,
there exist further LINT functions that make the C functions developed in Part I
available to LINT objects. In the following discussion we make a rough separation
of the functions into the categories “arithmetic” and “number-theoretic.” The
implementation of the functions will be discussed together with examples;
otherwise, we shall restrict ourselves to a table of information needed for their
proper use. We shall give more extensive treatment in the following sections to
the functions for the formatted output of LINT objects, for which we shall make
use of the properties of the stream classes contained in the C++ standard library.
Possible applications, in particular for formatted output of objects of user-defined
classes, are given rather short shrift in many C++ textbooks, and we are going
to take the opportunity to explicate the construction of the functions needed to
output our LINT objects.
15.1 Arithmetic
The following member functions implement the fundamental arithmetic
operations as well as modular operations for calculation in residue class rings
over the integers as accumulator operations: The object to which a called function
belongs contains the function result as implicit argument after its termination.
Accumulator functions are efficient, since they operate to the greatest extent
 
Search WWH ::




Custom Search