libzypp  13.10.6
Easy.h File Reference
#include <cstdio>

Go to the source code of this file.

Namespaces

 zypp
 Easy-to use interface to the ZYPP dependency resolver.
 

Macros

#define for_(IT, BEG, END)   for ( typeof(BEG) IT = BEG, _for_end = END; IT != _for_end; ++IT )
 Convenient for-loops using iterator. More...
 
#define for_each_(IT, CONT)   for_( IT, CONT.begin(), CONT.end() )
 
#define arrayBegin(A)   (&A[0])
 Simple C-array iterator. More...
 
#define arraySize(A)   (sizeof(A)/sizeof(*A))
 
#define arrayEnd(A)   (&A[0] + arraySize(A))
 
#define defConstStr(FNC, STR)   inline const std::string & FNC { static const std::string val( STR ); return val; }
 
#define GCC_VERSION   (__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__)
 
#define nullptr   NULL
 
#define NON_COPYABLE(CLASS)
 Delete copy ctor and copy assign. More...
 
#define DEFAULT_COPYABLE(CLASS)
 Default copy ctor and copy assign. More...
 
#define NON_MOVABLE(CLASS)
 Delete move ctor and move assign. More...
 
#define DEFAULT_MOVABLE(CLASS)
 Default move ctor and move assign. More...
 
#define NON_COPYABLE_BUT_MOVE(CLASS)
 Delete copy ctor and copy assign but enable default move. More...
 
#define NON_MOVABLE_BUT_COPY(CLASS)
 Default move ctor and move assign but enable default copy. More...
 

Macro Definition 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 27 of file Easy.h.

#define for_each_ (   IT,
  CONT 
)    for_( IT, CONT.begin(), CONT.end() )

Definition at line 31 of file Easy.h.

#define arrayBegin (   A)    (&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 40 of file Easy.h.

#define arraySize (   A)    (sizeof(A)/sizeof(*A))

Definition at line 41 of file Easy.h.

#define arrayEnd (   A)    (&A[0] + arraySize(A))

Definition at line 42 of file Easy.h.

#define defConstStr (   FNC,
  STR 
)    inline const std::string & FNC { static const std::string val( STR ); return val; }
* defConstStr( strANY(), "ANY" );
* std::str str = strANY();
*

Definition at line 50 of file Easy.h.

#define GCC_VERSION   (__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__)

Definition at line 52 of file Easy.h.

#define nullptr   NULL

Definition at line 54 of file Easy.h.

#define NON_COPYABLE (   CLASS)
Value:
CLASS( const CLASS & ) = delete; \
CLASS & operator=( const CLASS & ) = delete

Delete copy ctor and copy assign.

Definition at line 58 of file Easy.h.

#define DEFAULT_COPYABLE (   CLASS)
Value:
CLASS( const CLASS & ) = default; \
CLASS & operator=( const CLASS & ) = default

Default copy ctor and copy assign.

Definition at line 63 of file Easy.h.

#define NON_MOVABLE (   CLASS)
Value:
CLASS( CLASS && ) = delete; \
CLASS & operator=( CLASS && ) = delete

Delete move ctor and move assign.

Definition at line 69 of file Easy.h.

#define DEFAULT_MOVABLE (   CLASS)
Value:
CLASS( CLASS && ) = default; \
CLASS & operator=( CLASS && ) = default

Default move ctor and move assign.

Definition at line 74 of file Easy.h.

#define NON_COPYABLE_BUT_MOVE (   CLASS)
Value:
NON_COPYABLE(CLASS); \
#define NON_COPYABLE(CLASS)
Delete copy ctor and copy assign.
Definition: Easy.h:58
#define DEFAULT_MOVABLE(CLASS)
Default move ctor and move assign.
Definition: Easy.h:74

Delete copy ctor and copy assign but enable default move.

Definition at line 83 of file Easy.h.

#define NON_MOVABLE_BUT_COPY (   CLASS)
Value:
NON_MOVABLE(CLASS); \
#define NON_MOVABLE(CLASS)
Delete move ctor and move assign.
Definition: Easy.h:69
#define DEFAULT_COPYABLE(CLASS)
Default copy ctor and copy assign.
Definition: Easy.h:63

Default move ctor and move assign but enable default copy.

Definition at line 88 of file Easy.h.