|
OpendTect-6_4
6.4
|
Go to the documentation of this file. 17 #define mSetFloatInterval( str, newval ) \ 19 mDynamicCastGet(Attrib::FloatGateParam*,param,desc.getParam(str)) \ 20 const Interval<float> oldval( param->getFValue(0), param->getFValue(1) ); \ 21 if ( chtr_.set(oldval,newval) ) param->setValue( newval ); \ 24 #define mSetFloat( str, newval ) \ 26 Attrib::ValParam* param = desc.getValParam( str ); \ 27 const float oldval = param->getFValue(); \ 28 if ( chtr_.set(oldval,newval) ) \ 29 param->setValue( newval ); \ 32 #define mSetDouble( str, newval ) \ 34 Attrib::ValParam* param = desc.getValParam( str ); \ 35 const double oldval = param->getDValue(); \ 36 if ( chtr_.set(oldval,newval) ) \ 37 param->setValue( newval ); \ 40 #define mSetInt( str, newval ) \ 42 Attrib::ValParam* param = desc.getValParam( str ); \ 43 const int oldval = param->getIntValue(); \ 44 if ( chtr_.set(oldval,newval) ) \ 45 param->setValue( newval ); \ 48 #define mSetBool( str, newval ) \ 50 mDynamicCastGet(Attrib::BoolParam*,param,desc.getValParam(str)) \ 51 const bool oldval = param->getBoolValue(); \ 52 if ( chtr_.set(oldval,newval) ) \ 53 param->setValue( newval ); \ 58 #define mSetEnum( str, newval ) \ 60 mDynamicCastGet(Attrib::EnumParam*,param,desc.getValParam(str)) \ 61 const int oldval = param->getIntValue(); \ 62 if ( chtr_.set(oldval,newval) ) \ 63 param->setValue( newval ); \ 68 #define mSetBinID( str, newval ) \ 70 mDynamicCastGet(Attrib::BinIDParam*,param,desc.getValParam(str)) \ 71 const BinID oldval = param->getValue(); \ 72 if ( chtr_.set(oldval,newval) ) \ 73 { param->setValue( newval.inl(), 0 ); param->setValue( newval.crl(), 1 ); } \ 77 #define mSetString( str, newval ) \ 79 Attrib::ValParam* param = desc.getValParam( str ); \ 80 BufferString oldval = param->getStringValue(); \ 81 if ( chtr_.set(oldval,newval) ) \ 82 param->setValue( newval ); \ 88 #define mIfGetBool( str, var, setfunc ) \ 89 Attrib::ValParam* valparam##var = \ 90 const_cast<Attrib::ValParam*>(desc.getValParam(str));\ 91 mDynamicCastGet(Attrib::BoolParam*,boolparam##var,valparam##var);\ 92 if ( boolparam##var ) \ 95 if ( boolparam##var->isSet() )\ 96 var = boolparam##var->getBoolValue(0);\ 98 var = boolparam##var->getDefaultBoolValue(0);\ 102 #define mIfGetFloat( str, var, setfunc ) \ 103 if ( desc.getValParam(str) ) \ 105 float var = desc.getValParam(str)->getFValue(0);\ 107 var = desc.getValParam(str)->getDefaultfValue(0);\ 111 #define mIfGetDouble( str, var, setfunc ) \ 112 if ( desc.getValParam(str) ) \ 114 double var = desc.getValParam(str)->getDValue(0);\ 116 var = desc.getValParam(str)->getDefaultdValue(0);\ 120 #define mIfGetInt( str, var, setfunc ) \ 121 if ( desc.getValParam(str) ) \ 123 int var = desc.getValParam(str)->getIntValue(0);\ 125 var = desc.getValParam(str)->getDefaultIntValue(0);\ 129 #define mIfGetEnum( str, var, setfunc ) \ 130 Attrib::ValParam* valparam##var = \ 131 const_cast<Attrib::ValParam*>(desc.getValParam(str));\ 132 mDynamicCastGet(Attrib::EnumParam*,enumparam##var,valparam##var);\ 133 if ( enumparam##var ) \ 136 if ( enumparam##var->isSet() )\ 137 var = enumparam##var->getIntValue(0);\ 139 var = enumparam##var->getDefaultIntValue(0);\ 143 #define mIfGetString( str, var, setfunc ) \ 144 if ( desc.getValParam(str) ) \ 146 BufferString var = desc.getValParam(str)->getStringValue(0); \ 147 if ( var.isEmpty() ) \ 148 var = desc.getValParam(str)->getDefaultStringValue(0); \ 152 #define mIfGetBinID( str, var, setfunc ) \ 153 Attrib::ValParam* valparam##var = \ 154 const_cast<Attrib::ValParam*>(desc.getValParam(str));\ 155 mDynamicCastGet(Attrib::BinIDParam*,binidparam##var,valparam##var);\ 156 if ( binidparam##var ) \ 159 var = binidparam##var->getValue(); \ 160 if ( mIsUdf(var.inl()) || mIsUdf(var.crl()) )\ 161 var = binidparam##var->getDefaultBinIDValue();\ 165 #define mIfGetFloatInterval( str, var, setfunc ) \ 166 Attrib::ValParam* valparam##var =\ 167 const_cast<Attrib::ValParam*>(desc.getValParam(str));\ 168 if ( valparam##var ) \ 170 Interval<float> var; \ 171 var.start = valparam##var->getFValue(0); \ 172 var.stop = valparam##var->getFValue(1); \ 173 if ( mIsUdf(var.start) || mIsUdf(var.stop) )\ 175 mDynamicCastGet(Attrib::FloatGateParam*,gateparam##var,valparam##var);\ 176 if ( gateparam##var ) \ 177 var = gateparam##var->getDefaultGateValue();\
Generated at
for the OpendTect
seismic interpretation project.
Copyright (C): dGB Beheer B. V. 2019