#ifndef __JLANG__JSAMPLER__ #define __JLANG__JSAMPLER__ #include "JLang/JObjectIterator.hh" /** * \author mdejong */ namespace JLANG {} namespace JPP { using namespace JLANG; } namespace JLANG { /** * Template class for sampling from a JRewindableObjectIterator. * * This class should be specialised for other samplings than complete. */ template struct JSampler { /** * Default constructor. */ JSampler() {} /** * Acceptance test operator. * Return value 0 means accept and >0 number of objects to skip. * * \param object object * \return 0 */ skip_type operator()(const T& object) const { return 0; } }; } #endif