NAME Convert

This package is part of the DBMDatabase manpage. For more information on the database see the DBMDatabase::Overview.

Copyright &copy 1997 Curtis E. Dyreson. All rights reserved. Please be aware of the DBMDatabase::Licence and DBMDatabase::Version.


DESCRIPTION

This class provides conversion routines, for use in the DBMDatabase::Database. For efficiency, strings are mapped to DBMDatabase::Ids. That mapping is done by the conversion routines in this class.


PUBLIC METHODS


new(string $databaseName)

Initialize the conversion tools


toString(Id $key)

Convert an DBMDatabase::Id to a String by doing a table lookup. This returns the string.


toId(string $key)

Convert a string to a DBMDatabase::Id by doing a table lookup. This returns the DBMDatabase::Id.


save()

Close the mapping tables (is this needed?) Deprecated...


PRIVATE METHODS


_stringToIdMapping(string $s)

Add a new mapping to the string to Id table. This returns an DBMDatabase::Id.