Jpp
Main Page
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Pages
software
JLang
JSampler.hh
Go to the documentation of this file.
1
#ifndef __JLANG__JSAMPLER__
2
#define __JLANG__JSAMPLER__
3
4
#include "
JLang/JObjectIterator.hh
"
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
*/
26
JSampler
()
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::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::JSampler
Template class for sampling from a JRewindableObjectIterator.
Definition:
JSampler.hh:22
JLANG::skip_type
unsigned int skip_type
Type definition for number of objects to skip.
Definition:
JObjectIterator.hh:25
JLANG::JSampler::JSampler
JSampler()
Default constructor.
Definition:
JSampler.hh:26
JObjectIterator.hh
Generated by
1.8.5