-- File: Transfer_Mapper.cdl -- Created: Fri Nov 4 10:47:55 1994 -- Author: Christian CAILLET -- ---Copyright: Matra Datavision 1994 generic class Mapper from Transfer (TheKey as any; TheHasher as any; TheInfo as any) inherits Finder ---Purpose : a Mapper defines a Finder for a specific input class -- its definition includes the value of the Key to be mapped, -- and the HashCoder associated to the class of the Key -- -- TheKey defines the class to be keyed -- TheHasher is the associated Hasher -- TheInfo is an additionnal class which helps to provide -- informations on the value (template : see DataInfo) uses CString is Create (akey : any TheKey) returns mutable Mapper; ---Purpose : Creates a Mapper with a Value. This Value can then not be -- changed. It is used by the Hasher to compute the HashCode, -- which will then be stored for an immediate reading. Value (me) returns any TheKey is static; ---Purpose : Returns the contained value ---C++ : return const & Equates (me; other : Finder) returns Boolean; ---Purpose : Specific testof equallity : defined as False if has -- not the same true Type, else contents are compared (by -- C++ operator ==) ValueType (me) returns Type is redefined; ---Purpose : Returns the Type of the Value. By default, returns the -- DynamicType of , but can be redefined ValueTypeName (me) returns CString is redefined; ---Purpose : Returns the name of the Type of the Value. Default is name -- of ValueType, unless it is for a non-handled object fields theval : TheKey; end Mapper;