Function Class

The only difference between class relation and class function is that class function does not allow multiple occurrences of a key object to be added. The declaration of class function is:

#ifndef _FUNCTION_H_
#define _FUNCTION_H_
/* - - - - - - - - - - - - - - - - - - - - - - - - - - - */

class function : public relation {
private:
public:
function();
~function();
void add(entity *ent, entity *value); //add ent,value only if ent is not already
//associated with something
void add (char * name , entity *value); //create ent with given name as key
void replace(entity *ent, entity *value); //replace current association
//of ent by a new one
void replace (char * name, entity *value);
void remove(entity *ent); // remove current association with ent
};
#endif