Boost logo

Boost :

Subject: Re: [boost] interest in properties library
From: Matt Calabrese (rivorus_at_[hidden])
Date: 2008-12-19 12:00:38


On Fri, Dec 19, 2008 at 5:50 AM, Daniel Oberhoff <
daniel.oberhoff_at_[hidden]> wrote:

> Hi,
>
> I am thinking about submitting a library proposal and would like to query
> wether there is any interest in such a library and chance of success of such
> a proposal.
>
> The basic idea is to implement the possibility to decorate a class with
> named properties, such that given a pointer to an instance properties can be
> accessed by name rather than using set/get methods. Also the type of the
> instance should not need to be known at compile time, other than that it
> derives from a suitable base class describing the property mechanisms.
>
> There is a rough implementation existing and used in a product environment.
> Setting and getting is done using appropriate boost functions. Type
> resolution is done using RTTI (especially dynamic cast). Complex inheritance
> hierarchies are supported through virtual inheritance from the base class,
> such that several classes along the hierarchy can contribute property slots.
> CRTP and static initialization is used to register properties. Convenient
> setter/getter function generators are provided as is a mechanism to access
> nested properties using dot notation.

I'm not sure I follow exactly what you mean, could you give a small example
of the interface and usage? It sounds like you are referring to something
along the lines of C# properties though I don't immediately see what you are
using dynamic casting for or what exactly this provides as a benefit over
get/set methods. Thanks.

-- 
-Matt Calabrese

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