![]() |
|
Class for ensuring that variable of type D remains within limits of type S. More...
#include <TypeUtils.h>
Public Types | |
| typedef D(* | value_t) (D) |
| Definition that simplifies. | |
Static Public Member Functions | |
| template<class S , class T > | |
| static T | callback () |
Static Protected Member Functions | |
| template<class S , class T > | |
| static T | limitInteger (T x) |
| template<class S , class T > | |
| static T | limitFloat (T x) |
Class for ensuring that variable of type D remains within limits of type S.
Returns a function pointer of type typeLimiter::value_t .
With images of type drain::image::Image, use convenient function:
|
inlinestatic |
| S | - type selector |
| T | - destination type |
|
inlinestaticprotected |
| S | - type selector |
| T | - target value type (float or double) |
|
inlinestaticprotected |
| S | - type selector |
| T | - target value type (integer type) |
Note: expecting T > S, ie. S is a narrower basetype.
1.9.8