MarketDefaults::Range< T, low, high > Class Template Reference

template<class T, int low, int high>
class MarketDefaults::Range< T, low, high >

#include <marketDefaults.h>

Inheritance diagram for MarketDefaults::Range< T, low, high >:
Inheritance graph
[legend]

List of all members.

Static Public Member Functions

static bool  CheckII (T &val)
static bool  CheckEI (T &val)
static bool  CheckIE (T &val)
static bool  CheckEE (T &val)
static bool  Correct (T &val)
static bool  CorrectHigh (T &val)
static bool  CorrectLow (T &val)

Member Function Documentation

bool CheckII ( T &  val ) [static]
{
    return val >= T(low) && val <= T(high);
}
bool CheckEI ( T &  val ) [static]
{
    return val > T(low) && val <= T(high);
}
bool CheckIE ( T &  val ) [static]
{
    return val >= T(low) && val < T(high);
}
bool CheckEE ( T &  val ) [static]
{
    return val > T(low) && val < T(high);
}
bool Correct ( T &  val ) [static]
{
    if (val < T(low))
        val = T(low);
    else if (val > T(high))
        val = T(high);
    return true;
}
bool CorrectHigh ( T &  val ) [static]
{
    if (val < T(low))
        return false;
    if (val > T(high))
        val = T(high);
    return true;
}
bool CorrectLow ( T &  val ) [static]
{
    if (val > T(high))
        return false;
    if (val < T(low))
        val = T(low);
    return true;
}