libzypp
17.31.23
Counter.h
Go to the documentation of this file.
1
/*---------------------------------------------------------------------\
2
| ____ _ __ __ ___ |
3
| |__ / \ / / . \ . \ |
4
| / / \ V /| _/ _/ |
5
| / /__ | | | | | | |
6
| /_____||_| |_| |_| |
7
| |
8
\---------------------------------------------------------------------*/
12
#ifndef ZYPP_BASE_COUNTER_H
13
#define ZYPP_BASE_COUNTER_H
14
15
#include <iosfwd>
16
18
namespace
zypp
19
{
20
22
//
23
// CLASS NAME : Counter
24
//
27
template
<
class
TInt>
28
class
Counter
29
{
30
public
:
31
Counter
( TInt value_r = TInt(0) )
32
:
_value
( TInt( value_r ) )
33
{}
34
35
operator
TInt &()
36
{
return
_value
; }
37
38
operator
const
TInt &()
const
39
{
return
_value
; }
40
41
public
:
42
TInt
_value
;
43
};
45
47
}
// namespace zypp
49
#endif
// ZYPP_BASE_COUNTER_H
zypp::Counter
Integral type with initial value 0.
Definition:
Counter.h:29
zypp::Counter::_value
TInt _value
Definition:
Counter.h:42
zypp::Counter::Counter
Counter(TInt value_r=TInt(0))
Definition:
Counter.h:31
zypp
Easy-to use interface to the ZYPP dependency resolver.
Definition:
CodePitfalls.doc:2
zypp
base
Counter.h
Generated by
1.9.6