Boost logo

Boost :

From: Geoff Leyland (geoff.leyland_at_[hidden])
Date: 2002-08-12 02:16:41


On Lundi, août 12, 2002, at 07:52 , "Dylan Cuthbert" <dylan_at_[hidden]>
wrote:

> We have a similar system implemented here, using map<string,any> as the
> container for the variables and supporting nested structures in the
> same way
> you are.

Oh hey,

I'd kind of shut up about that, because no-one seemed that interested,
*but*, if anyone is...
I've got the same thing as you, with a few differences, and maybe a few
additions (or maybe you just didn't mention them).

Firstly, it doesn't use any (it should, I know, but I'm waiting for the
next version of boost to see what the new version of any is like).

Then, it also understands array syntax, so there's no only a
whatever_map, also a whatever_vector, and you can go

a["one.two[3].four"]
(which is the same as a["one.two"].vector()[3]["four"])

And finally, I tacked on a little lexer/parser so that it reads text
files - this is really cool. Unfortunately, since there isn't a parser
library in Boost (is Spirit coming?) and I'd normally do it in antlr,
which has quite a big run-time, I wrote it by hand, which was probably a
bit silly.

Anyway, I find it incredibly useful - especially now that the parser
(and a few other handy things like merging maps is done). If boost is
interested I'd be very happy to do what it takes to get it together.

The directions that need to be taken on my code are :
tidying
documenting (is doxygen ok?)
exception safety (though, given that that's been talked about for
variant at the moment, maybe I should wait. Is there a type_trait
that'll tell me about trivial constructors and destructors?)
getting other people's input
using any (or ideally, parameterising the contained type)
writing the parser with a more sensible tool
arranging nice interfaces to scripting languages (MATLAB, python, I
don't know what else)

If anyone wants a look I could put it somewhere accessible (or is it ok
to put it on the files area of the mailing list?). I certainly wouldn't
recommend it as an implementation at the moment, but it is a kind of
"working demonstration" of the functionality that I think would be nice.

No takers for Sobol sequences? Anyone want an explanation of what they
might be good for?

cheers,
goof

--
Geoff Leyland, Village Idiot
Laboratoire d'energetique industrielle
LENI-DGM-EPFL, CH-1015, Lausanne, Switzerland
Phone: +41 (21) 693 3505, Fax: +41 (21) 693 35 02

Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk