BALL 1.5.0
Macros
DATATYPE/forEach.h File Reference
#include <BALL/common.h>

Go to the source code of this file.

Macros

#define BALL_FOREACH(container, element_iterator)
 

Macro Definition Documentation

◆ BALL_FOREACH

#define BALL_FOREACH (   container,
  element_iterator 
)
Value:
for (element_iterator = container.begin(); \
!element_iterator.isEnd(); \
++element_iterator)

Container Iteration Macro. Use this macro for convenient iteration over BALL container classes.

Example:
    HashMap<int,int> hm;
    HashMap<int,int>::Iterator it;
    BALL_FOREACH(p,it)
    {
      cout << it->first << endl;
    }
@param container an instance of a BALL container class
@param element_iterator an iterator of the container class

\ingroup  DatatypeMiscellaneous

Definition at line 29 of file DATATYPE/forEach.h.