1 /*---------------------------------------------------------------------\
3 | |__ / \ / / . \ . \ |
8 \---------------------------------------------------------------------*/
9 /** \file zypp/DownloadMode.cc
14 #include "zypp/base/String.h"
15 #include "zypp/DownloadMode.h"
19 ///////////////////////////////////////////////////////////////////
21 { /////////////////////////////////////////////////////////////////
23 bool deserialize( const std::string & str_r, DownloadMode & result_r )
25 #define OUTS(VAL) if ( str::compareCI( str_r, #VAL ) == 0 ) { result_r = VAL; return true; }
27 OUTS( DownloadInAdvance );
28 OUTS( DownloadInHeaps );
29 OUTS( DownloadAsNeeded );
34 std::ostream & operator<<( std::ostream & str, DownloadMode obj )
38 #define OUTS(VAL) case VAL: return str << #VAL; break
39 OUTS( DownloadDefault );
41 OUTS( DownloadInAdvance );
42 OUTS( DownloadInHeaps );
43 OUTS( DownloadAsNeeded );
46 return str << "DownloadMode(" << int(obj) << ")";
50 /////////////////////////////////////////////////////////////////
52 ///////////////////////////////////////////////////////////////////