Boost logo

Boost :

From: Jan Langer (jan_at_[hidden])
Date: 2002-02-26 16:06:26


On Tue, 26 Feb 2002, Stewart, Robert wrote:
>That works for setting attributes, but what about when reading attributes?
>It would be nice to specify that you want to read some set of attributes
>before reading any in order to gain performance on those systems which can
>spend the time retrieving only what is desired and can skip retrieving what
>isn't desired. Thus:
>
> a.read<owner>();
> a.read<group>();
> // reads all desired attributes and then returns owner
> a.get<owner>();
> a.get<group>(); // returns group
> a.read<size>();
> // rereads attributes, including size, then returns group
> a.get<group>();
> a.get<size>(); // returns size
>
>IOW, calling get() checks to see if the set of attributes to load is dirty,
>reading them if so, then returns the requested attribute. The downside is
>that this approach gets quite verbose.

its already implemented as require<attribute>() (at least in my
posix-test-version) and behaves exactly as you described it. although it
does nothing for my current attribute set.

-- 
jan langer ... jan_at_[hidden]
"pi ist genau drei"

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