OpendTect-6_4  6.4
Classes | Namespaces | Macros
command.h File Reference
Include dependency graph for command.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  CmdDrive::Command
 
class  CmdDrive::UiObjectCmd
 
class  CmdDrive::UiObjQuestionCmd
 
class  CmdDrive::StealthCmd
 
class  CmdDrive::Activator
 
class  CmdDrive::CloseActivator
 
class  CmdDrive::CloseQDlgActivator
 
class  CmdDrive::MenuTracer
 

Namespaces

 CmdDrive
 Command Drive
 

Macros

#define mStartDeclCmdClassNoActNoEntry(mod, cmdkey, parentclass)
 
#define mStartDeclCmdClassNoAct(mod, cmdkey, parentclass)
 
#define mStartDeclCmdClassNoEntry(mod, cmdkey, parentclass)
 
#define mStartDeclCmdClass(mod, cmdkey, parentclass)
 
#define mEndDeclCmdClass   };
 
#define mParDQuoted(argnm, parstr, parnext, argstr, emptycheck, optional)
 
#define mParDisambiguatorRet(argnm, str, selnr, retfld)
 
#define mParDisambiguator(argnm, str, selnr)   mParDisambiguatorRet( argnm, str, selnr, false )
 
#define mParStrErrRet(objnm, nrfound, nrgrey, str, selnr, strnm, ambicheck, retfld)
 
#define mKeepSelection(objsfound, selnr)
 
#define mParStrPreRet(objnm, objsfound, nrgrey, str, selnr, strnm, ambicheck, retfld)
 
#define mParStrPre(objnm, objsfound, nrgrey, str, selnr, strnm, ambicheck)   mParStrPreRet(objnm, objsfound, nrgrey, str, selnr, strnm, ambicheck, false)
 
#define mDisabilityCheck(objnm, nrobjs, disabled)
 
#define mParKeyStrInit(objnm, parstr, parnext, keys, selnr)
 
#define mParKeyStrPre(objnm, objsfound, nrgrey, keys, selnr)
 
#define mParOptPathStrInit(objnm, parstr, parnext, path, optional)
 
#define mParPathStrInit(objnm, parstr, parnext, path)   mParOptPathStrInit( objnm, parstr, parnext, path, false )
 
#define mParWinStrInit(objnm, parstr, parnext, winstr, selnr, optional)
 
#define mParWinStrPre(windowlist, winstr, selnr, errorcheck)
 
#define mParItemSelInit(objnm, parstr, parnext, itemstr, itemnr, optional)
 
#define mParOnOffInit(parstr, parnext, onoff)
 
#define mParOnOffPre(objnm, onoff, checked, checkable)
 
#define mParOnOffPost(objnm, onoff, checked)
 
#define mParInputStr(objnm, parstr, parnext, inpstr, optional)
 
#define mParSteps(parstr, parnext, nrsteps, minval, defval)
 
#define mPopUpWinInLoopCheck(prevwin)
 
#define mMatchMouseTag(tag, mousetagptr, clicktags)
 
#define mParMouse(parstr, parnext, clicktags, defaulttag)
 
#define mButtonCmdMouseTagCheck(clicktags)
 
#define mParExpr(isarg, identnm, parstr, parnext, valstr, prescan)
 
#define mParIdentInit(parstr, parnext, identnm, allowdummy)
 
#define mParEscIdentPost(identnm, val, args, addesc)
 
#define mParIdentPost(identnm, val, args)   mParEscIdentPost( identnm, val, args, true )
 
#define mParCase(parstr, parnext, casesensitive, optional)
 
#define mParExtraFormInit(parstr, parnext, form, extrastr)
 
#define mParFormInit(parstr, parnext, form)   mParExtraFormInit( parstr, parnext, form, "Number" )
 
#define mParForm(answer, form, text, other)
 
#define mParExtraForm(answer, form, extratag, extra)
 
#define mParFramed(parstr, parnext, framed)
 
#define mParTail(partail)
 
#define mFindMenuItem(menupath, startmenu, curitem)
 
#define mGetMenuInfo(menupath, allowroot, startmenu, mnuinfo)
 
#define mFindObjs3Base(objsfound, objcls1, objcls2, objcls3, keys, warn)
 
#define mFindObjs2Base(objsfound, objcls1, objcls2, keys, warn)   mFindObjs3Base( objsfound, objcls1, objcls1, objcls2, keys, warn )
 
#define mFindObjsBase(objsfound, objclass, keys)   mFindObjs2Base( objsfound, objclass, objclass, keys, true )
 
#define mFindObjects3(objsfound, objcls1, objcls2, objcls3, keys, nrgrey)
 
#define mFindObjects2(objsfound, objcls1, objcls2, keys, nrgrey)
 
#define mFindObjects(objsfound, objclass, keys, nrgrey)
 
#define mFindListTableObjs(objnm, objsfound, objclass, keys, nrgrey)
 
#define mActivateInGUIThread(cb, busywait)
 
#define mActInGUIThread(typ, constructorcall, waitclear)
 
#define mActivate(acttyp, constructorcall)   mActInGUIThread( acttyp, constructorcall, true )
 
#define mActivateNoClearance(acttyp, constructorcall)   mActInGUIThread( acttyp, constructorcall, false )
 

Macro Definition Documentation

#define mActInGUIThread (   typ,
  constructorcall,
  waitclear 
)
Value:
{ \
typ##Activator* activator = new typ##constructorcall; \
if ( prepareActivate(activator) ) \
{ \
CallBack cb = mCB( activator, typ##Activator, actCB ); \
mActivateInGUIThread( cb, false ); \
finishActivate(); \
if ( waitclear ) \
waitForClearance(); \
} \
else \
delete activator; \
}
#define mActivateInGUIThread(cb, busywait)
Definition: command.h:800
if(!noudf_ &&(mIsUdf(inpval)))
Definition: arrayndalgo.h:1662
#define mCB(obj, clss, fn)
To make your CallBack. Used in many places, especially the UI.
Definition: callback.h:42
#define mActivate (   acttyp,
  constructorcall 
)    mActInGUIThread( acttyp, constructorcall, true )
#define mActivateInGUIThread (   cb,
  busywait 
)
Value:
{ \
uiMainWin* applwin = applWin(); \
if ( applwin ) \
applwin->activateInGUIThread( cb, busywait ); \
}
#define mActivateNoClearance (   acttyp,
  constructorcall 
)    mActInGUIThread( acttyp, constructorcall, false )
#define mButtonCmdMouseTagCheck (   clicktags)
Value:
\
if ( clicktags.isPresent("Right") || clicktags.isPresent("Double") ) \
{ \
mParseWarnStrm << "Double or Right mouse-click has no (lasting) " \
<< "effect on check-box" << od_endl; \
}
od_ostream & od_endl(od_ostream &strm)
Definition: od_ostream.h:111
#define mParseWarnStrm
Definition: cmddriver.h:52
#define mDisabilityCheck (   objnm,
  nrobjs,
  disabled 
)
Value:
\
if ( goingToChangeUiObj() && (disabled) ) \
{ \
mWinErrStrm << (nrobjs>1 ? "Some s" : "S") << "elected " \
<< objnm << (nrobjs>1 ? "s are" : " is") \
<< " disabled for manipulation" << od_endl; \
return false; \
}
od_ostream & od_endl(od_ostream &strm)
Definition: od_ostream.h:111
#define mEndDeclCmdClass   };
#define mFindListTableObjs (   objnm,
  objsfound,
  objclass,
  keys,
  nrgrey 
)
Value:
\
mFindObjsBase( objsfound, objclass, keys ); \
mFindObjs2Base( objsfound2, objclass, uiTreeView, keys, false ); \
const bool uilviewonly = objsfound.isEmpty() && !objsfound2.isEmpty(); \
const bool uilviewcloser = !objsfound.isEmpty() && \
objsfound2.indexOf(objsfound[0])<0; \
if ( uilviewonly || uilviewcloser ) \
{ \
mWinWarnStrm << "Skipped " << objsfound2.size() << " tree(s) " \
<< (uilviewcloser ? "more closely" : "") \
<< " defined by key(s): \"" << keys.buf() \
<< "\". Possibly resembling a " << objnm \
<< ", but requiring a \"Tree\"-command" << od_endl; \
} \
const int nrgrey = ObjectFinder::deleteGreys(objsfound, greyOutsSkipped());
od_ostream & od_endl(od_ostream &strm)
Definition: od_ostream.h:111
Definition: uitreeview.h:33
#define mWinWarnStrm
Definition: cmddriver.h:60
#define mFindMenuItem (   menupath,
  startmenu,
  curitem 
)
Value:
\
const uiAction* curitem; \
if ( !MenuTracer(startmenu,drv_).findItem(menupath,curitem) ) \
return false;
#define mFindObjects (   objsfound,
  objclass,
  keys,
  nrgrey 
)
Value:
mFindObjsBase( objsfound, objclass, keys ); \
const int nrgrey = ObjectFinder::deleteGreys(objsfound, greyOutsSkipped());
#define mFindObjsBase(objsfound, objclass, keys)
Definition: command.h:765
#define mFindObjects2 (   objsfound,
  objcls1,
  objcls2,
  keys,
  nrgrey 
)
Value:
mFindObjs2Base( objsfound, objcls1, objcls2, keys, true ); \
const int nrgrey = ObjectFinder::deleteGreys(objsfound, greyOutsSkipped());
#define mFindObjs2Base(objsfound, objcls1, objcls2, keys, warn)
Definition: command.h:762
#define mFindObjects3 (   objsfound,
  objcls1,
  objcls2,
  objcls3,
  keys,
  nrgrey 
)
Value:
mFindObjs3Base( objsfound, objcls1, objcls2, objcls3, keys, true ); \
const int nrgrey = ObjectFinder::deleteGreys(objsfound, greyOutsSkipped());
#define mFindObjs3Base(objsfound, objcls1, objcls2, objcls3, keys, warn)
Definition: command.h:733
#define mFindObjs2Base (   objsfound,
  objcls1,
  objcls2,
  keys,
  warn 
)    mFindObjs3Base( objsfound, objcls1, objcls1, objcls2, keys, warn )
#define mFindObjs3Base (   objsfound,
  objcls1,
  objcls2,
  objcls3,
  keys,
  warn 
)
Value:
\
ObjectSet<const CallBacker> objsfound; \
{ \
ObjectFinder objfinder( *curWin(), isCaseSensitive() ); \
if ( localSearchEnv() ) \
objfinder.findNodes( localSearchEnv(), &objsfound ); \
else \
objfinder.findNodes( ObjectFinder::Everything, &objsfound ); \
\
for ( int idx=objsfound.size()-1; idx>=0; idx-- ) \
{ \
mDynamicCastGet( const objcls1*, uiobj1, objsfound[idx] ); \
mDynamicCastGet( const objcls2*, uiobj2, objsfound[idx] ); \
mDynamicCastGet( const objcls3*, uiobj3, objsfound[idx] ); \
if ( !uiobj1 && !uiobj2 && !uiobj3 ) \
objsfound.removeSingle( idx ); \
} \
\
int errkeyidx; \
const bool dowarn = (warn); \
if ( !objfinder.selectNodes(objsfound, keys, &errkeyidx) && dowarn ) \
{ \
mWinWarnStrm << "No object with key \"" << keys[errkeyidx] << "\" in " \
<< ( localSearchEnv() ? "local search environment" \
: "current window" ) << od_endl; \
} \
}
if(!noudf_ &&(mIsUdf(inpval)))
Definition: arrayndalgo.h:1662
od_ostream & od_endl(od_ostream &strm)
Definition: od_ostream.h:111
#define mDynamicCastGet(typ, out, in)
Definition: commondefs.h:131
#define mWinWarnStrm
Definition: cmddriver.h:60
#define mFindObjsBase (   objsfound,
  objclass,
  keys 
)    mFindObjs2Base( objsfound, objclass, objclass, keys, true )
#define mGetMenuInfo (   menupath,
  allowroot,
  startmenu,
  mnuinfo 
)
Value:
\
MenuInfo mnuinfo; \
if ( !MenuTracer(startmenu,drv_).getMenuInfo(menupath,allowroot,mnuinfo) ) \
return false;
#define mKeepSelection (   objsfound,
  selnr 
)
Value:
{ \
if ( selnr ) \
{ \
const int selidx = selnr>0 ? selnr-1 : selnr+objsfound.size(); \
for ( int idx=objsfound.size()-1; idx>=0; idx-- ) \
{ \
if ( idx != selidx ) \
objsfound.removeSingle( idx ); \
} \
} \
}
#define mMatchMouseTag (   tag,
  mousetagptr,
  clicktags 
)
Value:
\
if ( FixedString(mousetagptr).startsWith(tag) ) \
{ \
clicktags.add( tag ); \
mousetagptr += strlen( tag ); \
}
OD::String that holds an existing text string.
Definition: fixedstring.h:29
#define mParCase (   parstr,
  parnext,
  casesensitive,
  optional 
)
Value:
\
BufferString argword; \
const char* parnext = getNextWord( parstr, argword.getCStr() ); \
bool casesensitive = false; \
if ( mMatchCI(argword,"Sensitive") ) \
casesensitive = true; \
else if ( !mMatchCI(argword,"Insensitive") ) \
{ \
if ( !optional ) \
{ \
mParseErrStrm << "Case-argument not in {Sensitive, Insensitive}" \
<< od_endl; \
return false; \
} \
parnext = parstr; \
}
if(!noudf_ &&(mIsUdf(inpval)))
Definition: arrayndalgo.h:1662
od_ostream & od_endl(od_ostream &strm)
Definition: od_ostream.h:111
const char * getNextWord(const char *, char *)
#define mMatchCI(expr1, expr2)
Definition: searchkey.h:24
#define mParDisambiguator (   argnm,
  str,
  selnr 
)    mParDisambiguatorRet( argnm, str, selnr, false )
#define mParDisambiguatorRet (   argnm,
  str,
  selnr,
  retfld 
)
Value:
int selnr = StringProcessor(str).removeNumAppendix(); \
if ( mIsUdf(selnr) ) \
{ \
mParseErrStrm << "Non-zero integer required to disambiguate " \
<< argnm << ": \"" << str << "\"" << od_endl; \
return retfld; \
}
#define mIsUdf(val)
Use mIsUdf to check for undefinedness of simple types.
Definition: undefval.h:287
#define mParseErrStrm
Definition: cmddriver.h:51
od_ostream & od_endl(od_ostream &strm)
Definition: od_ostream.h:111
#define mParDQuoted (   argnm,
  parstr,
  parnext,
  argstr,
  emptycheck,
  optional 
)
Value:
\
BufferString argstr; \
const char* parnext = StringProcessor(parstr).parseDQuoted( argstr ); \
if ( (!optional && !parnext) || (emptycheck && parnext && !*argstr) ) \
{ \
mParseErrStrm << (parnext ? "Empty " : "No ") << argnm \
<< " specified" << od_endl; \
return false; \
} \
if ( !parnext ) \
parnext = parstr;
#define mParseErrStrm
Definition: cmddriver.h:51
od_ostream & od_endl(od_ostream &strm)
Definition: od_ostream.h:111
#define mParEscIdentPost (   identnm,
  val,
  args,
  addesc 
)
Value:
{ \
mSkipBlanks( args ); \
identifierMan().set( identnm, val ); \
BufferString valstr = identifierMan().getValue( identnm ); \
StringProcessor strproc( valstr ); \
if ( addesc ) \
strproc.addCmdFileEscapes(StringProcessor::sAllEscSymbols()); \
\
identifierMan().set( identnm, strproc.buf() ); \
const char* quote = strproc.convertToDouble() ? "" : "\""; \
mTimeStrm << "Q&A: " << name() << (*args ? " " : "") << args \
<< " -->> " << identnm << " = " << quote << strproc.buf() \
<< quote << od_endl; \
}
od_ostream & od_endl(od_ostream &strm)
Definition: od_ostream.h:111
#define mParExpr (   isarg,
  identnm,
  parstr,
  parnext,
  valstr,
  prescan 
)
Value:
\
BufferString valstr; \
const char* parnext = exprInterpreter().process( parstr, valstr, isarg ); \
if ( !parnext || (!(prescan) && *exprInterpreter().errMsg()) ) \
{ \
mTimeStrm << "EVAL: " << exprInterpreter().breakPrefix(); \
mLogStrm << " ..." << od_endl; \
if ( exprInterpreter().isParseError() ) \
{ \
mParseErrStrm << exprInterpreter().errMsg() << od_endl; \
} \
else \
mWinErrStrm << exprInterpreter().errMsg() << od_endl; \
\
return false; \
} \
if ( !(prescan) && ((isarg) || !exprInterpreter().isResultTrivial()) ) \
{ \
mTimeStrm << "EVAL: " << exprInterpreter().parsedExpr(); \
StringProcessor strproc( valstr ); \
const char* quote = strproc.convertToDouble() ? "" : "\""; \
mLogStrm << " -->> " << identnm << (isarg ? "'" : "") \
<< (FixedString(identnm).isEmpty() ? "" : " = " ) \
<< quote << valstr << quote << od_endl; \
}
uiString errMsg() const
see also below.
if(!noudf_ &&(mIsUdf(inpval)))
Definition: arrayndalgo.h:1662
OD::String that holds an existing text string.
Definition: fixedstring.h:29
od_ostream & od_endl(od_ostream &strm)
Definition: od_ostream.h:111
bool isEmpty() const
Definition: odstring.h:51
#define mTimeStrm
Definition: cmddriver.h:43
const char * errMsg() const
Definition: horizontracker.h:61
#define mLogStrm
Definition: cmddriver.h:40
#define mParExtraForm (   answer,
  form,
  extratag,
  extra 
)
Value:
\
if ( form == extratag ) \
answer = extra;
#define mParExtraFormInit (   parstr,
  parnext,
  form,
  extrastr 
)
Value:
\
BufferString formword; \
FileMultiString fms( extrastr ); \
const char* parnext = getNextWord( parstr, formword.getCStr() ); \
FormTag form = NoForm; \
if ( mMatchCI(formword,"Text") ) \
form = Text; \
if ( mMatchCI(formword,"Number") && fms.indexOf("Number")>=0 ) \
form = Number; \
if ( mMatchCI(formword,"Color") && fms.indexOf("Color")>=0 ) \
form = Colour; \
if ( mMatchCI(formword,"Value") && fms.indexOf("Value")>=0 ) \
form = Value; \
if ( mMatchCI(formword,"Angle") && fms.indexOf("Angle")>=0 ) \
form = Angle; \
if ( mMatchCI(formword,"Minimum") && fms.indexOf("Minimum")>=0 ) \
form = Minimum; \
if ( mMatchCI(formword,"Maximum") && fms.indexOf("Maximum")>=0 ) \
form = Maximum; \
if ( mMatchCI(formword,"Step") && fms.indexOf("Step")>=0 ) \
form = Step; \
if ( mMatchCI(formword,"Percentage") && fms.indexOf("Percentage")>=0 ) \
form = Percentage; \
if ( mMatchCI(formword,"FilePath") && fms.indexOf("FilePath")>=0 ) \
form = FilePath; \
if ( form == NoForm ) \
parnext = parstr;
Definition: file.h:99
const char * getNextWord(const char *, char *)
#define mMatchCI(expr1, expr2)
Definition: searchkey.h:24
FixedString Minimum()
Definition: keystrs.h:167
Definition: angles.h:24
File pathname tools.
Definition: filepath.h:34
FixedString Value()
Definition: keystrs.h:145
FixedString Maximum()
Definition: keystrs.h:165
#define mParForm (   answer,
  form,
  text,
  other 
)
Value:
\
BufferString answer; \
if ( form==NoForm || form==Text ) \
{ \
answer = text; \
StringProcessor(answer).cleanUp(); \
} \
else \
answer = other;
Definition: file.h:99
#define mParFormInit (   parstr,
  parnext,
  form 
)    mParExtraFormInit( parstr, parnext, form, "Number" )
#define mParFramed (   parstr,
  parnext,
  framed 
)
Value:
\
BufferString frameword; \
const char* parnext = getNextWord( parstr, frameword.getCStr() ); \
bool framed = true; \
if ( mMatchCI(frameword,"Selected") ) \
framed = false; \
else if ( !mMatchCI(frameword,"Framed") ) \
parnext = parstr;
const char * getNextWord(const char *, char *)
#define mMatchCI(expr1, expr2)
Definition: searchkey.h:24
#define mParIdentInit (   parstr,
  parnext,
  identnm,
  allowdummy 
)
Value:
\
BufferString firstarg, identnm; \
const char* parnext = getNextWord( parstr, firstarg.getCStr() ); \
if ( firstarg != "_dummyvar" ) \
parnext = StringProcessor(parstr).parseIdentifier( identnm ); \
else if ( allowdummy ) \
identnm = firstarg; \
else \
{ \
mParseErrStrm << "Missing identifier" << od_endl; \
return false; \
} \
if ( parnext && *parnext == '[' ) \
{ \
mParseErrStrm << "If an array variable a[i] was intended, " \
<< "use index substitution a_$i$ instead" << od_endl; \
return false; \
} \
if ( !parnext || firstarg!=identnm ) \
{ \
mParseErrStrm << "Invalid identifier: " << firstarg << od_endl; \
return false; \
} \
if ( identifierMan().isPredefined(identnm) ) \
{ \
mParseWarnStrm << "Reassigning a predefined identifier: " \
<< identnm << od_endl; \
}
#define mParseErrStrm
Definition: cmddriver.h:51
if(!noudf_ &&(mIsUdf(inpval)))
Definition: arrayndalgo.h:1662
od_ostream & od_endl(od_ostream &strm)
Definition: od_ostream.h:111
const char * getNextWord(const char *, char *)
#define mParseWarnStrm
Definition: cmddriver.h:52
#define mParIdentPost (   identnm,
  val,
  args 
)    mParEscIdentPost( identnm, val, args, true )
#define mParInputStr (   objnm,
  parstr,
  parnext,
  inpstr,
  optional 
)
#define mParItemSelInit (   objnm,
  parstr,
  parnext,
  itemstr,
  itemnr,
  optional 
)
Value:
\
mParDQuoted( BufferString(objnm," name"), parstr, parnext, itemstr, \
false, true ); \
mParDisambiguator( BufferString(objnm," name"), itemstr, itemnr ); \
if ( parnext == parstr ) \
{ \
const int num = strtol( parstr, const_cast<char**>(&parnext), 0 ); \
if ( num || (optional && parnext==parstr) ) \
{ \
itemnr = !num ? mUdf(int) : num; \
itemstr = "\a"; \
} \
else \
{ \
mParseErrStrm << "Name or non-zero integer needed to select " \
<< objnm << od_endl; \
return false; \
} \
}
if(!noudf_ &&(mIsUdf(inpval)))
Definition: arrayndalgo.h:1662
od_ostream & od_endl(od_ostream &strm)
Definition: od_ostream.h:111
#define mUdf(type)
Use this macro to get the undefined for simple types.
Definition: undefval.h:272
OD::String with its own variable length buffer. The buffer has a guaranteed minimum size...
Definition: bufstring.h:40
#define mParKeyStrInit (   objnm,
  parstr,
  parnext,
  keys,
  selnr 
)
Value:
\
mParDQuoted(objnm " keystring", parstr, parnext, keys##str, false, false); \
mParDisambiguator( objnm " keystring", keys##str, selnr ); \
mGetEscConvertedFMS( keys, keys##str, false );
#define mParKeyStrPre (   objnm,
  objsfound,
  nrgrey,
  keys,
  selnr 
)
Value:
mParStrPre( objnm, objsfound, nrgrey, keys.buf(), selnr, "key(s)", true ); \
mDisabilityCheck( objnm, 1, !UIEntity(objsfound[0]).sensitive() ); \
ObjectFinder wcmobjfinder( *curWin(), isCaseSensitive(), &wildcardMan() ); \
wcmobjfinder.selectNodes( objsfound, keys );
#define mParStrPre(objnm, objsfound, nrgrey, str, selnr, strnm, ambicheck)
Definition: command.h:321
#define mParMouse (   parstr,
  parnext,
  clicktags,
  defaulttag 
)
Value:
\
mSkipBlanks( parstr ); \
BufferStringSet clicktags; \
const char* parnext = parstr; \
mMatchMouseTag( "Ctrl", parnext, clicktags ); \
mMatchMouseTag( "Double", parnext, clicktags ); \
mMatchMouseTag( "Left", parnext, clicktags ) \
else mMatchMouseTag( "Right", parnext, clicktags ) \
else \
clicktags.add( clicktags.isEmpty() ? defaulttag : "Left" ); \
if ( *parnext && !iswspace(*parnext) ) \
parnext = parstr; \
if(!noudf_ &&(mIsUdf(inpval)))
Definition: arrayndalgo.h:1662
#define mMatchMouseTag(tag, mousetagptr, clicktags)
Definition: command.h:512
#define mParOnOffInit (   parstr,
  parnext,
  onoff 
)
Value:
\
BufferString onoffword; \
const char* parnext = getNextWord( parstr, onoffword.getCStr() ); \
mSkipBlanks( parnext ); \
\
int onoff = 0; \
if ( onoffword=="1" || mMatchCI(onoffword,"On") ) \
onoff = 1; \
if ( onoffword=="0" || mMatchCI(onoffword,"Off") ) \
onoff = -1; \
if ( !onoff ) \
parnext = parstr; \
const char * getNextWord(const char *, char *)
#define mMatchCI(expr1, expr2)
Definition: searchkey.h:24
#define mParOnOffPost (   objnm,
  onoff,
  checked 
)
Value:
{ \
const bool ischecked = (checked); \
if ( onoff == (ischecked ? -1 : 1) ) \
{ \
mWinWarnStrm << "Switching " << (onoff==1 ? "on" : "off") \
<< " this " << objnm << " has been overruled" \
<< od_endl; \
} \
}
od_ostream & od_endl(od_ostream &strm)
Definition: od_ostream.h:111
#define mWinWarnStrm
Definition: cmddriver.h:60
#define mParOnOffPre (   objnm,
  onoff,
  checked,
  checkable 
)
Value:
{ \
const bool ischeckable = (checkable); \
if ( onoff!=0 && !ischeckable ) \
{ \
mWinWarnStrm << "This " << objnm << " has no on/off switch" \
<< od_endl; \
onoff = 0; \
} \
\
const bool ischecked = (checked); \
if ( onoff == (ischecked ? 1 : -1) ) \
{ \
mWinErrStrm << "This " << objnm << " was switched " \
<< (onoff==1 ? "on" : "off") << " already" << od_endl; \
setRecoveryStep( CmdDriver::NextCmd ); \
return false; \
} \
}
od_ostream & od_endl(od_ostream &strm)
Definition: od_ostream.h:111
#define mWinErrStrm
Definition: cmddriver.h:59
#define mWinWarnStrm
Definition: cmddriver.h:60
#define mParOptPathStrInit (   objnm,
  parstr,
  parnext,
  path,
  optional 
)
Value:
mParDQuoted( objnm " path", parstr, parnext, path##str, false, optional ); \
mGetEscConvertedFMS( path, path##str, false );
#define mParDQuoted(argnm, parstr, parnext, argstr, emptycheck, optional)
Definition: command.h:249
#define mParPathStrInit (   objnm,
  parstr,
  parnext,
  path 
)    mParOptPathStrInit( objnm, parstr, parnext, path, false )
#define mParSteps (   parstr,
  parnext,
  nrsteps,
  minval,
  defval 
)
Value:
\
char* parnext; \
int nrsteps = strtol( parstr, &parnext, 0 ); \
if ( parnext!=parstr && nrsteps<minval ) \
{ \
mParseWarnStrm << "Number of steps should be at least " << minval \
<< od_endl; \
} \
if ( parnext==parstr || nrsteps<minval ) \
nrsteps = defval;
od_ostream & od_endl(od_ostream &strm)
Definition: od_ostream.h:111
#define mParseWarnStrm
Definition: cmddriver.h:52
#define mParStrErrRet (   objnm,
  nrfound,
  nrgrey,
  str,
  selnr,
  strnm,
  ambicheck,
  retfld 
)
Value:
\
const int overflow = (!selnr ? 1 : abs(selnr)) - nrfound; \
if ( overflow>0 || (!selnr && ambicheck && nrfound>1) ) \
{ \
if ( nrfound && overflow>0 ) \
mWinErrStrm << "Impossible to select " << objnm << ": #" << selnr \
<< od_endl; \
\
BufferString dispstr = str; \
dispstr.replace( "\a", "*" ); \
mWinErrStrm << "Found " << nrfound \
<< (greyOutsSkipped() ? " enabled " : " ") << objnm \
<< "(s) defined by " << strnm << ": \"" << dispstr \
<< "\"" << od_endl; \
if ( greyOutsSkipped() && overflow>0 && overflow<=nrgrey ) \
mWinWarnStrm << "Did find " << nrgrey << " disabled " << objnm \
<< "(s) defined by " << strnm << ": \"" << dispstr \
<< "\"" << od_endl; \
\
return retfld; \
}
if(!noudf_ &&(mIsUdf(inpval)))
Definition: arrayndalgo.h:1662
od_ostream & od_endl(od_ostream &strm)
Definition: od_ostream.h:111
#define mWinErrStrm
Definition: cmddriver.h:59
#define mParStrPre (   objnm,
  objsfound,
  nrgrey,
  str,
  selnr,
  strnm,
  ambicheck 
)    mParStrPreRet(objnm, objsfound, nrgrey, str, selnr, strnm, ambicheck, false)
#define mParStrPreRet (   objnm,
  objsfound,
  nrgrey,
  str,
  selnr,
  strnm,
  ambicheck,
  retfld 
)
Value:
{ \
const int nrfound = objsfound.size(); \
mParStrErrRet( objnm,nrfound,nrgrey,str,selnr,strnm,ambicheck,retfld ) \
mKeepSelection( objsfound, selnr ); \
} \
#define mParTail (   partail)
Value:
\
mSkipBlanks( partail ); \
if ( (partail) && *(partail) ) \
{ \
mParseErrStrm << "Command line ends with unexpected argument(s): " \
<< (partail) << od_endl; \
return false; \
}
#define mParseErrStrm
Definition: cmddriver.h:51
od_ostream & od_endl(od_ostream &strm)
Definition: od_ostream.h:111
#define mParWinStrInit (   objnm,
  parstr,
  parnext,
  winstr,
  selnr,
  optional 
)
Value:
mParDQuoted( objnm " name", parstr, parnext, winstr, true, optional ); \
mParDisambiguator( objnm " name", winstr, selnr );
#define mParDQuoted(argnm, parstr, parnext, argstr, emptycheck, optional)
Definition: command.h:249
#define mParWinStrPre (   windowlist,
  winstr,
  selnr,
  errorcheck 
)
Value:
\
ObjectSet<uiMainWin> windowlist; \
mSearchKey(winstr).getMatchingWindows( applWin(), windowlist ); \
if ( errorcheck ) \
{ \
mParStrPre( "window", windowlist, 0, winstr, selnr, "string", true ) \
mSearchKey(winstr).getMatchingWindows( applWin(), windowlist, \
&wildcardMan() ); \
} \
mKeepSelection( windowlist, selnr );
#define mSearchKey(expr)
Definition: searchkey.h:26
#define mParStrPre(objnm, objsfound, nrgrey, str, selnr, strnm, ambicheck)
Definition: command.h:321
#define mKeepSelection(objsfound, selnr)
Definition: command.h:301
#define mPopUpWinInLoopCheck (   prevwin)
Value:
\
if ( openQDlg() || curWin()!=prevwin ) \
{ \
mWinErrStrm << "Next step blocked by popped-up modal window" \
<< od_endl; \
return false; \
}
od_ostream & od_endl(od_ostream &strm)
Definition: od_ostream.h:111
#define mWinErrStrm
Definition: cmddriver.h:59
#define mStartDeclCmdClass (   mod,
  cmdkey,
  parentclass 
)
Value:
mStartDeclCmdClassNoAct(mod,cmdkey,parentclass) \
virtual bool act(const char* parstr);
#define mStartDeclCmdClassNoAct(mod, cmdkey, parentclass)
Definition: command.h:134
#define mStartDeclCmdClassNoAct (   mod,
  cmdkey,
  parentclass 
)
Value:
\
mStartDeclCmdClassNoActNoEntry(mod,cmdkey,parentclass) \
\
static Command* createInstance(CmdDriver& cmddrv) \
{ return new cmdkey##Cmd(cmddrv); } \
static void initClass() \
{ factory().addCreator( createInstance, \
createFactoryKey(keyWord()) ); }
static void initClass()
#define mStartDeclCmdClassNoActNoEntry (   mod,
  cmdkey,
  parentclass 
)
Value:
mExpClass(mod) cmdkey##Cmd : public parentclass \
{ mODTextTranslationClass(cmdkey##Cmd); \
public: \
cmdkey##Cmd(CmdDriver& cmddrv) \
: parentclass(cmddrv) \
{} \
\
static const char* keyWord() { return #cmdkey; } \
virtual const char* name() const { return keyWord(); }
#define mExpClass(module)
Definition: commondefs.h:160
#define mStartDeclCmdClassNoEntry (   mod,
  cmdkey,
  parentclass 
)
Value:
mStartDeclCmdClassNoActNoEntry(mod,cmdkey,parentclass) \
virtual bool act(const char* parstr);
#define mStartDeclCmdClassNoActNoEntry(mod, cmdkey, parentclass)
Definition: command.h:122

Generated at for the OpendTect seismic interpretation project. Copyright (C): dGB Beheer B. V. 2019