1 /*-----------------------------------------------------------------------------+
2 Copyright (c) 2007-2009: Joachim Faulhaber
3 +------------------------------------------------------------------------------+
4 Copyright (c) 1999-2006: Cortex Software GmbH, Kantstrasse 57, Berlin
5 +------------------------------------------------------------------------------+
6    Distributed under the Boost Software License, Version 1.0.
7       (See accompanying file LICENCE.txt or copy at
8            http://www.boost.org/LICENSE_1_0.txt)
9 +-----------------------------------------------------------------------------*/
10 /*-----------------------------------------------------------------------------
11     Macro definitions for some useful notations e.g. iteration headers
12 -----------------------------------------------------------------------------*/
13 #ifndef  BOOST_ICL_DETAIL_NOTATE_HPP_JOFA_990119
14 #define  BOOST_ICL_DETAIL_NOTATE_HPP_JOFA_990119
15 
16 
17 // Iterations over stl or stl-compatible containers:
18 #define ICL_FORALL(type,iter,obj) for(type::iterator iter=(obj).begin(); (iter)!=(obj).end(); (iter)++)
19 #define ICL_const_FORALL(type,iter,obj) for(type::const_iterator iter=(obj).begin(); !((iter)==(obj).end()); (iter)++)
20 
21 #define ICL_FORALL_THIS(iter) for(iterator iter=begin(); (iter)!=end(); (iter)++)
22 #define ICL_const_FORALL_THIS(iter) for(const_iterator iter=this->begin(); (iter)!=this->end(); (iter)++)
23 
24 // Plain old array iteration (assuming member function VecT::size()!)
25 #define ICL_FORALL_VEC(idx, vec) for(int idx=0; idx<vec.size(); idx++)
26 
27 namespace boost{namespace icl
28 {
29     const int UNDEFINED_INDEX = -1;
30 }} // namespace icl boost
31 
32 
33 #endif // BOOST_ICL_DETAIL_NOTATE_HPP_JOFA_990119
34 
35 
36