Jpp test-rotations-new
the software that should make you happy
Loading...
Searching...
No Matches
JSampler.hh
Go to the documentation of this file.
1#ifndef __JLANG__JSAMPLER__
2#define __JLANG__JSAMPLER__
3
5
6
7/**
8 * \author mdejong
9 */
10
11namespace JLANG {}
12namespace JPP { using namespace JLANG; }
13
14namespace JLANG {
15
16 /**
17 * Template class for sampling from a JRewindableObjectIterator.
18 *
19 * This class should be specialised for other samplings than complete.
20 */
21 template<class T>
22 struct JSampler {
23 /**
24 * Default constructor.
25 */
27 {}
28
29
30 /**
31 * Acceptance test operator.
32 * Return value 0 means accept and >0 number of objects to skip.
33 *
34 * \param object object
35 * \return 0
36 */
37 skip_type operator()(const T& object) const
38 {
39 return 0;
40 }
41 };
42}
43
44#endif
Auxiliary classes and methods for language specific functionality.
unsigned int skip_type
Type definition for number of objects to skip.
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).
Template class for sampling from a JRewindableObjectIterator.
Definition JSampler.hh:22
skip_type operator()(const T &object) const
Acceptance test operator.
Definition JSampler.hh:37
JSampler()
Default constructor.
Definition JSampler.hh:26