GCO4020/CSC428 - Advanced Object Oriented Techniques In C++
Reference material
GCO4020/CSC428
Glossary
- Accessor Function
- A public member function which provides the means to modify
or retrieve the value of one or more non-public data members
of a class (often a container class¤).
- Cloneable class
- A class with a virtual
clone() member which returns a
dynamically allocated copy of the original object. Such
classes can be manipulated polymorphically, yet still pass on
underlying type information to new objects. Sometimes used to
implement a simple form of virtual constructor¤.
- Closure
- A function which has access to local variables from the scope
in which it is defined. Normal C++ functions cannot be closures¤
(since they may only be defined at global scope), but non-static
member functions of local classes (which may be declared
in local scopes) can act as closures¤ if correctly set up to do so.
- Container class
- A class (or more commonly a templated class) used to store a collection
of values in some useful data structure.
- Encapsulation
- The principle and practice of restricting access to the
internal workings of a class (typically all of its data
members and any function members which implement internally
controlled operations). In C++ the protected and private
members of a class are encapsulated.
- Factory class
- A class which is used to build other objects polymorphically, based on
some form of input. Sometimes used to implement a virtual constructor¤,
or as part of a persistent class¤ hierarchy.
- Garbage Collection
- Any scheme which allows allocated dynamic memory which is no
longer required to be "reclaimed" by the dynamic memory manager.
The
new and delete operators constitute a "manual" garbage
collector. Much research is focussed on devising good "automatic"
garbage collectors, which watch the program's execution and
deduce when specific pieces of dynamically allocated memory are
no longer required (which is usually when they are no longer
accessible to the program).
- Generic
- Defined independently from a particular class. Typically
used when referring to class or function templates. Also used
to refer to pointer variables of type
void*, which can be
used to store pointers of any type.
- Idempotent
- An I/O mechanism is idempotent¤ if the output and subsequent
input of a value through that system results in no change
to the value. In general, the C++ streams are idempotent¤
for integral types (such as
bool, char and int),
but not
for other types (such as float, char* or string).
- Implementation
- The non-public "internals" of a class, which determine
how a class provides the functionality specified by its
interface¤.
- Implementation Class
- A class which exists principally (or solely) to provide the
implementation¤ for some other class.
- Inorder
- An inorder¤ traversal of a tree visits each node in the tree
exactly once. At each node, the left sub-tree is visited first
(that is, the left child is itself inorder¤ traversed),
then the node itself is visited, and finally the right sub-tree
is inorder¤ traversed.
- Interface
- The publicly assessible components of a class, which determine
what may be done with a class.
- Interface Class
- A class which exists principally (or solely) to define a
specific interface¤.
- Iterators
- Objects which act like pointers into a specific type of container class¤.
They are specifically designed to simplify the task
of sequentially stepping through each element
of a container, and are widely used in the STL¤.
- Leak
- To allocate dynamic memory during a program's execution and then
fail to deallocate it before losing access to it.
Leaking causes a program to grow in size as it executes, since the
dynamic memory manager does not know that it could
"reuse" the (now unused) memory which has been allowed to leak¤.
- Map class
- An class whose instances can be used to store one or more values of a specified type.
Each stored value has an associated key (of some specified type)
through which it is accessed. The Standard Template Library¤
provides a predefined map class¤.
- Mixin
- A class representing a specific property or behaviour, which can be
added to existing classes by means of multiple inheritance. Mixin¤
classes are typically named with adjectives (for example,
SelfLinking, Persistent, Clonable, etc.)
denoting the property they confer.
- Persistent class
- A class whose objects retain their values between executions of a
program.
- Polymorphism
- A property of class hierarchies whereby the result of calling a
specific virtual member function of an object depends on the
actual (run-time) type of the object, rather than on the
(compile-time) type of the pointer or reference through which
the call is initiated.
- Proxy
- A class (or object) which is used in place of some other
class (or object), usually to confer some special semantics
(such as persistence or access control) that the original class
(or object) did not possess.
- STL
- The usual abbreviation for the C++ Standard Template Library¤.
- Specialization
- ...of a template. A class or function
defined by providing an appropriate set of template arguments
to a template. For example, class
map<Face,Name> is a
specialization¤ of the STL¤ template class map.
- Standard Template Library
- A collection of generic¤
algorithms and data structures
provided by
all standard-conforming C++ implementations¤.
- Swizzled
- When an external representation of a name, address, or reference
is converted to an internal address (pointer) in main memory,
the pointer variable which receives the resulting address is
said to have been "swizzled¤".
- Utility function
- A (usually private) member function of a class which
implements some common functionality required by the class
public member functions. The use of utility functions¤ improves
modularity (and therefore maintainability) by eliminating
repeated sequences of code. To avoid loss of run-time
performance, utility functions¤ are often declared
inline.
- Vector
- The correct name for a C++ inbuilt array. For example, the declaration:
int marks[100];
creates a "vector¤ of int of length 100".
Somewhat confusingly, vector¤ is also the name of a basic container
class¤ template in the STL¤.
- Virtual constructor
- A theoretical C++ construct which would create objects according to the
actual type required, rather than the apparent type requested. Virtual
constructors¤ are usually simulated using a cloneable class¤ or a factory
class¤.
- Volatile
- A C++ type modifier (like
const) which indicates to the compiler
that objects of the qualified type may change value in ways that
it cannot detect (that is, without the execution of explicit program
code). More generally, the adjective "volatile¤" is used to
describe processes or objects which are subject to
unpredictable, frequent, and perhaps dramatic changes (in
size, state, value, etc).
This material is part of the GCO4020/CSC428 - Advanced Object Oriented Techniques In C++ course.
Copyright © Damian Conway, 1997. All rights reserved.
Last updated: Fri Feb 18 13:18:50 2000