Boost logo

Boost :

From: Thorsten Ottosen (thorsten.ottosen_at_[hidden])
Date: 2006-04-26 12:29:00


SeskaPeel wrote:
> Hi list,
>
>
>
> I'm looking for a "multi-class container", with access to sub-containers of
> elements depending on their class. All elements are derived from the same
> base class, and I want to have "views" of containers of final classes, or
> even intermediate classes. This container would be associative, like a map.
>
> As instance if I have
>
>
>
> // Base class
>
> class A {} ;
>
>
>
> // Intermediate classes
>
> class B : public A {} ;
>
>
>
> // Final classes
>
> class C : public B {} ;
>
> class D : public B {} ;
>
> class E : public A {} ;
>
>
>
> I want a container that can hold any A-derived class,

That is easy.

>on which I could have
> views of sub containers of class C, D or E, and even a sub container of
> intermediate class B.

It's really hard to parse your requirements, Could you out-line the
datastructure in code, please?

-Thorsten


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