Easy.h File Reference

Go to the source code of this file.

Namespaces

namespace  zypp

Defines

#define for_(IT, BEG, END)   for ( typeof(BEG) IT = BEG, _for_end = END; IT != _for_end; ++IT )
 Convenient for-loops using iterator.
#define arrayBegin(A)   (&A[0])
 Simple C-array iterator.
#define arrayEnd(A)   (&A[0] + (sizeof(A)/sizeof(*A)))


Detailed Description

Definition in file Easy.h.


Define Documentation

#define for_ IT,
BEG,
END   )     for ( typeof(BEG) IT = BEG, _for_end = END; IT != _for_end; ++IT )
 

Convenient for-loops using iterator.

  std::set<std::string> _store;
  for_( it, _store.begin(), _store.end() )
  {
    cout << *it << endl;
  }

Definition at line 24 of file Easy.h.

Referenced by zypp::media::ProxyInfo::Impl::useProxyFor().

#define arrayBegin  )     (&A[0])
 

Simple C-array iterator.

  const char * defstrings[] = { "",  "a", "default", "two words" };
  for_( it, arrayBegin(defstrings), arrayEnd(defstrings) )
    cout << *it << endl;

Definition at line 33 of file Easy.h.

#define arrayEnd  )     (&A[0] + (sizeof(A)/sizeof(*A)))
 

Definition at line 34 of file Easy.h.


Generated on Wed Feb 16 18:51:56 2011 for zypp by  doxygen 1.4.6