Jpp
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 
11 namespace JLANG {}
12 namespace JPP { using namespace JLANG; }
13 
14 namespace 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  * Get number of objects to skip at given object (0 means accept).
32  *
33  * \param object object
34  * \return 0
35  */
36  skip_type operator()(const T& object) const
37  {
38  return 0;
39  }
40  };
41 }
42 
43 #endif
JLANG::skip_type
unsigned int skip_type
Type definition for number of objects to skip.
Definition: JObjectIterator.hh:25
JObjectIterator.hh
JPP
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).
Definition: JAAnetToolkit.hh:37
JLANG::JSampler
Template class for sampling from a JRewindableObjectIterator.
Definition: JSampler.hh:22
JLANG::JSampler::JSampler
JSampler()
Default constructor.
Definition: JSampler.hh:26
JLANG::JSampler::operator()
skip_type operator()(const T &object) const
Get number of objects to skip at given object (0 means accept).
Definition: JSampler.hh:36
JLANG
Auxiliary classes and methods for language specific functionality.
Definition: JAbstractClass.hh:10