Boost logo

Boost :

From: Philippe A. Bouchard (philippe_at_[hidden])
Date: 2003-07-28 09:26:45


E. Gladyshev wrote:

[...]

> Should we expose the gui structure as a set of direct
> STL data types or should we define separate GUI data
> types that will behave like the STL containers
> (iterator-like interface). In other words
>
> ** Option 1 (compile-time structure)
> typedef std::list< boost::entry<lineEdit,
> std::string> > listbox;
>
> typedef std::list< list<...> > listboxN;

[...]

I would like better the first alternative because you can easily use other
containers for the widget you wish to represent:

typedef std::vector<...> fast_listbox;
typedef std::list<...> small_listbox;
typedef std::map<...> medium_listbox;
typedef a::sql<...> huge_listbox;

You will be able to use future containers without changing anything in the
Boost Library. Better lifetime.

-- 
Philippe A. Bouchard

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