|
Boost : |
From: Andy (atompkins_at_[hidden])
Date: 2007-05-07 13:12:12
Jared McIntyre <jmcintyre_at_[hidden]> wrote in
news:loom.20070507T004550-745_at_[hidden]:
< snip >
> I'd really like to see the MAC address + time generator. I realize
> that this might be a pain to do in a cross-platform manner, but it
> would make the library more complete in my eyes, and more likely for
> me to recommend it to my colleagues. Is there a way that the library
> could be engineered so that we could provide our own generation
> implementation?
I agree that it would be very useful to have a time based guid generator.
I will continue to look in to this. In the meantime, one could write a
function to create guids based on anything they want, eg:
boost::guid create()
{
//generate a guid or values for a guid in the way you want
//a platform specific call, MAC address+time generator function
//call a boost::guid constructor with either the values
//or a string representation of the values
boost::guid g(guid_string);
return g;
}
>
>> - What is your evaluation of the documentation?
>
> I don't like it's organization. I'd much rather see it start out with
> the Rationale section followed by a simple example of the most likely
> used scenario. I think this is what most users are expecting to see
> who haven't used the library before and want to get started quickly.
> You have to weed into the documentation a while before you run into
> the first generation examples, which is what I think most people will
> be intereste in. If you need to put the "Class guid synopsis" in the
> docs, I'd put it near the end since it is more-or-less a dump of the
> uncommented header file.
I can reorder the docs if that helps people use the library better.
>
>> - What is your evaluation of the potential usefulness of the library?
>
> A good, cross-platform, UUID library is extremely useful. Without the
> guaruntee of uniqueness provided by MAC address + time, it isn't as
> useful for my situation. We have data generated across a large number
> of disconnected computers (I highly doubt there would see a duplicate,
> but in my case, we can't take the risk).
This could also be done in a way using the name-based guid create
function.
See http://article.gmane.org/gmane.comp.lib.boost.devel/154791
< snip >
Andy.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk