Source: src/iterators.h


Annotated List
Files
Globals
Hierarchy
Index
/***************************************************************************
	vim:tabstop=4
						iterators.h  -  description
                        	-------------------
	Template class to manage a list of pointer with Counter.
	begin				: Sat Nov 24 2001
	copyright			: (C) 2001 by Francois Biot
	email				: fbiot@free.fr
 ***************************************************************************
 *                                                                         *
 *   This program is free software; you can redistribute it and/or modify  *
 *   it under the terms of the GNU General Public License as published by  *
 *   the Free Software Foundation; either version 2 of the License, or     *
 *   (at your option) any later version.                                   *
 *                                                                         *
 ***************************************************************************/

#ifndef	_iterators_h_
#define	_iterators_h_

// Adds const iterators for TContainer
#define	ITERATORS_CONST(mlst)	\
	typedef	TContainer::const_iterator			const_iterator;					\
	typedef	TContainer::const_reverse_iterator	const_reverse_iterator;			\
	const_iterator			begin	()	const	{	return	mlst.begin	();	};	\
	const_iterator			end		()	const	{	return	mlst.end	();	};	\
	const_reverse_iterator	rbegin	()	const	{	return	mlst.rbegin	();	};	\
	const_reverse_iterator	rend	()	const	{	return	mlst.rend	();	};

#define ITERATORS_NONCONST(mlst) \
	typedef	TContainer::iterator				iterator;				\
	typedef	TContainer::reverse_iterator		reverse_iterator;		\
	iterator				begin	()	{	return	mlst.begin	();	};	\
	iterator				end		()	{	return	mlst.end	();	};	\
	reverse_iterator		rbegin	()	{	return	mlst.rbegin	();	};	\
	reverse_iterator		rend  	()	{	return	mlst.rend	();	};

#define	ITERATORS_ALL(mlst)		\
	ITERATORS_CONST(mlst)	;	\
	ITERATORS_NONCONST(mlst);


#endif

Generated by: saturn on FrancoisLinux on Sun Feb 3 20:01:44 2002, using kdoc 2.0a53.