RCKit
Main Page
Classes
Files
Examples
File List
File Members
Limiter.h
1
// Limiter.h
2
//
3
// Setter class that limits its input to between specified min and max values
4
/// \author Mike McCauley (mikem@airspayce.com)
5
///
6
// Copyright (C) 2010 Mike McCauley
7
// $Id: Limiter.h,v 1.3 2012/08/25 06:18:13 mikem Exp $
8
9
#ifndef Limiter_h
10
#define Limiter_h
11
12
#include "Setter.h"
13
14
/////////////////////////////////////////////////////////////////////
15
/// \class Limiter Limiter.h <Limiter.h>
16
/// \brief Setter class that limits its output to between specified min and max values
17
///
18
/// Limiter limits its output to between specified min and max values
19
/// The resulting output value is sent to the next Setter (the target) in the chain.
20
///
21
class
Limiter
:
public
Setter
22
{
23
public
:
24
/// Constructor.
25
/// All output values will be constrained to be within min to max (inclusive)
26
Limiter
(
int
min,
int
max);
27
28
/// Input the value to be inverted
29
/// \param[in] value The input value
30
virtual
void
input
(
int
value);
31
32
protected
:
33
34
private
:
35
36
/// The minimum permitted value
37
int
_min;
38
39
/// The maximum permitted value
40
int
_max;
41
};
42
43
#endif
Generated by
1.8.1