Overview     Modules     Class Hierarchy     Classes     Members  

ForEach.h File Reference

#include <assert.h>
#include <tulip/Iterator.h>
#include <tulip/StableIterator.h>

Include dependency graph for ForEach.h:

This graph shows which files directly or indirectly include this file:

Defines

  • #define forEach(A, B)   for(void *_it_foreach = tlp::_tlp_get_it(A, B); tlp::_tlp_if_test(A, _it_foreach);)
  • #define stableForEach(A, B)   for(void *_it_foreach = tlp::_tlp_get_stable_it(A, B); tlp::_tlp_if_test(A, _it_foreach);)
  • #define _delete_it_foreach   ((**((void (**) (void *)) _it_foreach))(_it_foreach))
  • #define breakForEach   {_delete_it_foreach; break;}
  • #define returnForEach(VAL)   {_delete_it_foreach; return VAL;}

Define Documentation

#define _delete_it_foreach   ((**((void (**) (void *)) _it_foreach))(_it_foreach))
 

#define breakForEach   {_delete_it_foreach; break;}
 

#define forEach A,
 )     for(void *_it_foreach = tlp::_tlp_get_it(A, B); tlp::_tlp_if_test(A, _it_foreach);)
 

Warning, do not use break or return inside a for each block; it causes a memory leak; use breakForEach pr returnForEachInstead

#define returnForEach VAL   )     {_delete_it_foreach; return VAL;}
 

#define stableForEach A,
 )     for(void *_it_foreach = tlp::_tlp_get_stable_it(A, B); tlp::_tlp_if_test(A, _it_foreach);)
 



Tulip Software by LaBRI Visualization Team    2001 - 2010