next up previous contents index
Next: Key Mappers ( Keymapper Up: Pre- and Postconditions Previous: Pre- and Postconditions   Contents   Index


Keys ( AgdKey )

Definition

An instance k of type AgdKey is a key, which stands for a string stored in a keymapper. If a key is stored in a keymapper mapper, it is assigned a unique index, which, e.g., can be used for realizing arrays indexed by keys in mapper. We call a key a nil key if it has no corresponding string (similar like a nil pointer).

#include < AGD/AgdKey.h >

Creation

AgdKey k creates a nil key.

AgdKey k(key::Predefined k) converts k into a key using the default keymapper of AGD.

AgdKey k(const leda_string& str) converts str into a key using the default keymapper of AGD.

Operations

const leda_string& k.info() returns the string corresponding to k.

int k.index() returns the index corresponding to k.

bool k.valid() returns true iff k is not a nil key.

ostream& ostream& os << const AgdKey& k
    writes s to the output stream os if k points to (s, i).


next up previous contents index
Next: Key Mappers ( Keymapper Up: Pre- and Postconditions Previous: Pre- and Postconditions   Contents   Index

© Copyright 1998-2001, Algorithmic Solutions Software GmbH. All rights reserved.
2001-08-13