Boost logo

Boost :

Subject: Re: [boost] interest in properties library
From: Mathias Gaunard (mathias.gaunard_at_[hidden])
Date: 2008-12-20 09:13:54

Daniel Oberhoff wrote:

> HasPropertiesBase<VariantTypes> * foo = new Foo;
> foo->set_property("a", 1);
> int a = get<int>( foo->get_property( "a" ) );

And I suppose if it's not an int, it throws?
For proprieties, it might be better to provide lexical conversion to the
target type, so that it always succeeds (modulo allocation errors).

Anyway, I'm not too sure this is very useful.
It's just a std::map<std::string, some_variant_type>. Does that really
deserve its own class?

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