19 #define __mUndefDValue 1e30 20 #define __mUndefFValue 1e30f 21 #define __mIsUndefinedD(x) (((x)>9.99999e29)&&((x)<1.00001e30)) 23 #define __mIsUndefinedF(x) (((x)>9.99999e29f)&&((x)<1.00001e30f)) 24 #define __mUndefIntVal 2109876543 26 #define __mUndefIntVal64 9223344556677889900LL 69 static od_int16
val() {
return 32766; }
70 static bool hasUdf() {
return false; }
71 static bool isUdf( od_int16 i ) {
return i == 32766; }
72 static void setUdf( od_int16& i ) { i = 32766; }
84 static od_uint16
val() {
return 65534; }
85 static bool hasUdf() {
return false; }
159 static bool val() {
return false; }
161 static bool isUdf(
bool b ) {
return false; }
162 static void setUdf(
bool& b ) { b =
false; }
204 static const char*
val() {
return ""; }
206 static bool isUdf(
const char* s ) {
return !s || !*s; }
219 static const char*
val() {
return ""; }
221 static bool isUdf(
const char* s ) {
return !s || !*s; }
222 static void setUdf(
char*& s ) {
if ( s ) *s =
'\0'; }
234 static char val() {
return -127; }
236 static bool isUdf(
const char s ) {
return s==-127; }
237 static void setUdf(
char& s ) { s = -127; }
242 template <
class T>
inline 248 template <
class T>
inline 255 template <
class T>
inline 261 template <
class T>
inline 272 #define mUdf(type) Values::Undef<type>::val() 273 #define mSetUdf(val) Values::setUdf(val) 287 # define mIsUdf(val) isUdfImpl(val) 294 #define mFastMaxReasonableFloat 1e20f 295 #define mFastIsFloatDefined(fval) \ 296 ( (fval>-mFastMaxReasonableFloat && fval<mFastMaxReasonableFloat) || \ 297 (!__mIsUndefinedF(fval) && Math::IsNormalNumber(fval)) ) static bool hasUdf()
Definition: undefval.h:160
static double val()
Definition: undefval.h:189
static bool isUdf(int64_t i)
Definition: undefval.h:131
static bool val()
Definition: undefval.h:159
Templatized undefined and initialisation (i.e. null) values.
Definition: color.h:106
static bool isUdf(float f)
Definition: undefval.h:176
bool hasUdf()
Definition: undefval.h:256
#define mGlobal(module)
Definition: commondefs.h:163
#define od_int64
Definition: plftypes.h:36
static void setUdf(unsigned int &i)
Definition: undefval.h:117
#define mDefineStaticLocalObject(type, var, init)
Definition: commondefs.h:196
static void setUdf(short &i)
Definition: undefval.h:72
bool isUdfImpl(T val)
Definition: undefval.h:279
static bool hasUdf()
Definition: undefval.h:235
static void setUdf(uint64_t &i)
Definition: undefval.h:147
static bool hasUdf()
Definition: undefval.h:175
static bool isUdf(short i)
Definition: undefval.h:71
#define __mIsUndefinedF(x)
Definition: undefval.h:23
static void setUdf(char &s)
Definition: undefval.h:237
static bool hasUdf()
Definition: undefval.h:145
static unsigned short val()
Definition: undefval.h:84
static bool isUdf(unsigned int i)
Definition: undefval.h:86
static int val()
Definition: undefval.h:99
static bool isUdf(unsigned int i)
Definition: undefval.h:116
static bool hasUdf()
Definition: undefval.h:70
#define __mUndefIntVal
Almost MAXINT so unlikely, but not MAXINT to avoid that.
Definition: undefval.h:25
static bool hasUdf()
Definition: undefval.h:190
#define od_uint32
Definition: plftypes.h:32
static bool isUdf(int i)
Definition: undefval.h:101
static const char * val()
Definition: undefval.h:219
static void setUdf(const char *&)
Definition: undefval.h:207
static const char * val()
Definition: undefval.h:204
static void setUdf(double &d)
Definition: undefval.h:192
static float val()
Definition: undefval.h:174
static bool hasUdf()
Definition: undefval.h:85
static bool isUdf(uint64_t i)
Definition: undefval.h:146
static unsigned int val()
Definition: undefval.h:114
#define od_int16
Definition: plftypes.h:27
static char val()
Definition: undefval.h:234
#define od_uint64
Definition: plftypes.h:37
static bool hasUdf()
Definition: undefval.h:220
const T & udfVal(const T &t)
Definition: undefval.h:249
#define od_int32
Definition: plftypes.h:31
static bool hasUdf()
Definition: undefval.h:205
static bool isUdf(const char *s)
Definition: undefval.h:206
static void setUdf(unsigned int &i)
Definition: undefval.h:87
static bool isUdf(const char s)
Definition: undefval.h:236
static void setUdf(int64_t &i)
Definition: undefval.h:132
static bool isUdf(double d)
Definition: undefval.h:191
T & setUdf(T &u)
Definition: undefval.h:262
#define __mUndefDValue
Undefined value. IEEE gives NaN but that's not exactly what we want.
Definition: undefval.h:19
#define od_uint16
Definition: plftypes.h:28
static void setUdf(int &i)
Definition: undefval.h:102
static void setUdf(bool &b)
Definition: undefval.h:162
static bool hasUdf()
Definition: undefval.h:115
static bool isUdf(const char *s)
Definition: undefval.h:221
#define __mIsUndefinedD(x)
Check on undefined. Also works when double converted to float and vv.
Definition: undefval.h:22
static void setUdf(char *&s)
Definition: undefval.h:222
static bool isUdf(bool b)
Definition: undefval.h:161
#define __mUndefFValue
Definition: undefval.h:20
static bool hasUdf()
Definition: undefval.h:100
#define mClass(module)
Definition: commondefs.h:164
bool isUdf(const T &t)
Definition: undefval.h:243
static short val()
Definition: undefval.h:69
#define __mUndefIntVal64
Almost MAXINT64 therefore unlikely.
Definition: undefval.h:27
static uint64_t val()
Definition: undefval.h:144
static void setUdf(float &f)
Definition: undefval.h:177
static int64_t val()
Definition: undefval.h:129
Templatized undefined values.
Definition: undefval.h:51
static bool hasUdf()
Definition: undefval.h:130