I am using a TClientDataSet to manage objects and to give me 'database' access to the object data. So far this works well. I have two 'special' (hidden) fields within the dataset - 'ObjectName' and 'ObjectRef'. ObjectName is a conjunctions of the category and name of the object item in the form My category.my object' and is used to get me from inside an object instance to the record number. This field is indexed. 'ObjectRef' is an integer typcast of a pointer to that object's instance and is used for all other object lifetime management.
I have had to choose a size for the 'ObjectName' field in which to fit my expected max possible category and name combination, but this is only an index and I would like to keep this size as small as possible for performance and memory reasons. Is there a 'lossless' function that I can apply to my form 'My category.my name' which would still be unique that I can use as a hash? Hash functions look clever but not being a computer science guru I am never sure how to know whether their output is unique.
Thanks