WWC snapshot of http://www.alw.nih.gov/Docs/NIHCL/nihcl_4.html taken on Sat Jun 10 19:13:32 1995

Go to the previous, next section.

Assoc--Association of Object Pointers

SYNOPSIS

#include <nihcl/Assoc.h>

BASE CLASS

LookupKey

DERIVED CLASSES

None

RELATED CLASSES

Dictionary, IdentDict, KeySortCltn

DESCRIPTION

Class Assoc is derived from class LookupKey, and provides a pointer of type Object* to the value object of an association. Class Assoc implements the value() virtual functions, declared in class LookupKey, to access and change the value object pointer.

Instances of class Assoc are used by classes Dictionary, IdentDict, and KeySortCltn.

CONSTRUCTORS

Assoc(Object& newKey =*nil, Object& newValue =*nil)
Constructs an Assoc between the key object newKey and the value object newValue.

ACCESSING ASSOCIATIONS

virtual Object* value()
virtual const Object* value() const
Returns a pointer to the value object of this Assoc.

virtual Object* value(Object& newValue)
Sets the value object pointer of this Assoc to newValue, and returns the previous value object pointer.

COPYING ASSOCIATIONS

virtual void deepenShallowCopy()
Converts this shallow copy to a deep copy by applying deepCopy() to the key and value object pointers of this Assoc, replacing them by pointers to their copies.

PROTECTED MEMBERS

Object I/O

virtual void storer(OIOofd& fd) const
virtual void storer(OIOout& strm) const
Stores the key and value objects of this LookupKey to fd or strm by applying storeOn() to the key and value objects.

EXCEPTIONS RAISED

None

Go to the previous, next section.