Boost logo

Boost Users :

From: David Abrahams (david.abrahams_at_[hidden])
Date: 2002-06-03 23:05:46


"Duane Murphy" <duanemurphy_at_[hidden]> wrote in message
news:20020603191155.29997_at_mail.murphyslogic.com...
> --- At Mon, 3 Jun 2002 14:09:07 -0400, David Abrahams wrote:
>
> >> Take a look at the documentation and implementation where it talks
about
> >> default_iterator_policies. This shows you the functions that have to be
> >> implemented by your base iterator class.
> >
> >This statement is a bit misleading. It shows the functions that your
> >Policies class must implement.
>
> Ah, what I was meaning was to look at the implementations of the
> functions in default_iterator_policies. The implementation shows what
> this policy calls and what default_iterator_policies expectes the base
> iterator to be able to do. I have found it easier to write a simple
> "iterator like" class and use the default_iterator_policies than to write
> both an iterator and a policy.

That's a pretty wacky idea! You're putting the behaviors in the Base object,
but the library "intends" for behaviors to be specified by the Policies.

In other words, the "normal" approach is to treat the Base object as raw
data, and while the policies implement the operations on that data.

-Dave


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net