Jpp  17.3.0-rc.1
the software that should make you happy
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
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  * 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
skip_type operator()(const T &object) const
Acceptance test operator.
Definition: JSampler.hh:37
Template class for sampling from a JRewindableObjectIterator.
Definition: JSampler.hh:22
unsigned int skip_type
Type definition for number of objects to skip.
JSampler()
Default constructor.
Definition: JSampler.hh:26
do set_variable OUTPUT_DIRECTORY $WORKDIR T