libzypp
12.16.5
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
Collector.h
Go to the documentation of this file.
1
/*---------------------------------------------------------------------\
2
| ____ _ __ __ ___ |
3
| |__ / \ / / . \ . \ |
4
| / / \ V /| _/ _/ |
5
| / /__ | | | | | | |
6
| /_____||_| |_| |_| |
7
| |
8
\---------------------------------------------------------------------*/
12
#ifndef ZYPP_BASE_COLLECTOR_H
13
#define ZYPP_BASE_COLLECTOR_H
14
16
namespace
zypp
17
{
18
19
namespace
functor
20
{
21
23
//
24
// CLASS NAME : _Collector<_OutputIterator>
25
//
36
template
<
class
_OutputIterator>
37
struct
_Collector
38
{
39
_Collector
( _OutputIterator iter_r ) :
_iter
( iter_r ) {}
40
41
template
<
class
_Tp>
42
bool
operator()
(
const
_Tp & value_r )
const
43
{
44
*
_iter
++ = value_r;
45
return
true
;
46
}
47
48
private
:
49
mutable
_OutputIterator
_iter
;
50
};
52
54
template
<
class
_OutputIterator>
55
inline
_Collector<_OutputIterator>
Collector( _OutputIterator iter_r )
56
{
return
_Collector<_OutputIterator>
( iter_r ); }
57
59
61
}
// namespace functor
64
}
// namespace zypp
66
#endif // ZYPP_BASE_COLLECTOR_H
zypp
base
Collector.h
Generated by
1.8.2