logo       

boost::iterator_adaptor: msg#00323

lib.boost.user

Subject: boost::iterator_adaptor

Hi,

I am trying to write my own iterator - class and using for that the
boost::iterator_adaptor. I could find on the webpage several examples of how
to connect an existing iterator like std::string::iterator or a simple array
as "base-class" for my new iterator, but what can I do if I dont have any
base-iterator? In the documentation I found the following sentence:
"The Iterator Adaptor library allows you transform an arbitrary ``base''
type into a standard-conforming iterator with the behaviors you choose.
Doing so is especially easy if the ``base'' type is itself an iterator."
In my situation I dont have any base type which is an iterator, so how
should I now create such a base-type? Which are the specifications of such a
base-type? Where can I get information on how to create a new base-type?

I am trying to write an iterator which reads records from a file or a
database and always when I do the it++ the next record is read from the file
or database.

Thanks a lot in advance
Julia







------------------------ Yahoo! Groups Sponsor ---------------------~-->
Get 128 Bit SSL Encryption!
http://us.click.yahoo.com/CBxunD/vN2EAA/xGHJAA/EbFolB/TM
---------------------------------------------------------------------~->

Info: <http://www.boost.org>
Wiki: <http://www.crystalclearsoftware.com/cgi-bin/boost_wiki/wiki.pl>
Unsubscribe: <mailto:boost-users-unsubscribe@xxxxxxxxxxxxxxx>


Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/





<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise