Boost logo

Boost :

From: Janek Kozicki (janek_listy_at_[hidden])
Date: 2007-05-06 12:29:37

Dear Andy,

I remember that serialization library needs some sort of unique
identifier. Currently it uses a class name. But Robert said several
times that he will gladly allow using some other unique identifier.
Is your library prepared for that?

When the identifier is assigned?
- when the program starts?
- when the code is compiled?
- when an attempt to read identifier for a given class is made?

Is the identifier the same across several program runs? (serialization
library needs that to properly distinguish classes ;)

Is it possible to get an identifier of a class:

- during compilation (so it could be used in template metaprogramming,
  typedeffed enums or in #defines)

- during runtime when only a polymorphic(!) class instance is provided
  (eg. I got a class Shape and classes Square and Circle deriving from it.
   Then I want to get a unique identifier to distinguish whether a
   pointer Shape* is a Square* or a Circle*)

- during runtime when only a type is provided? Not an instance of a class.

Is it possible to tell your library to assign numbers not random, but
incrementing sequentially, starting from some given number? Maybe
that's unfeasible, why?

Is the unique identifier an 'int' number, or is it custom? Maybe a string?

If the deadline can be extended till 11 or 12 May I should be able to
write a review. Currently I completely have no time even to look at
the documentation. However I'm curious to see your answers to my
questions above.

I'm particularly interested in using your library in multimethods
(see. Andrei Alexandrescu "Modern C++ Design" to check what's that ;)
for constant time dispatch (classes will be indexed by their identifier).

best regards

Janek Kozicki                                                         |

Boost list run by bdawes at, gregod at, cpdaniel at, john at