2 * tunableConst - a system parameter that we might one to change during
3 * execution of the system.
5 * $Log: tunableConst.C,v $
6 * Revision 1.2 1994/02/28 23:58:38 hollings
7 * Changed global list to be a pointer to a list because I couldn't rely on
8 * the order of global constructors.
10 * Revision 1.1 1994/02/25 00:26:17 hollings
11 * added tuntable constants
16 #include "util/h/stringPool.h"
17 #include "util/h/tunableConst.h"
19 List<tunableConstant*> *tunableConstant::allConstants;
20 stringPool *tunableConstant::pool;
22 Boolean tunableConstant::simpleRangeCheck(float val)
24 return((val >= min) && (val <= max));
27 tunableConstant::tunableConstant(float initialValue,
30 changeValCallBackFunc cb,
38 if (!pool) pool = new(stringPool);
39 name = pool->findAndAdd(n);
40 newValueCallBack = cb;
41 if (!allConstants) allConstants = new(List<tunableConstant*>);
42 allConstants->add(this, name);
45 tunableConstant::tunableConstant(float initialValue,
47 changeValCallBackFunc cb,
52 if (!pool) pool = new(stringPool);
53 name = pool->findAndAdd(n);
56 newValueCallBack = cb;
57 if (!allConstants) allConstants = new(List<tunableConstant*>);
58 allConstants->add(this, name);