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

Go to the source code of this file.

Classes

class  CmdDrive::Classifier
 
class  CmdDrive::CmdComposer
 

Namespaces

 CmdDrive
 Command Drive
 

Macros

#define mDeclClassifierClass(callerclass)
 
#define mStartDeclComposerClassNoAccept(mod, cmdkey, parentclass)
 
#define mStartDeclComposerClass(mod, cmdkey, parentclass, callerclass)
 
#define mStartDeclComposerClassWithInit(mod, cmdkey, parentclass, callerclass)
 
#define mEndDeclComposerClass   };
 
#define mRefuseAndQuit()
 
#define mCompleteAndQuitIfEventNested(ev, notifierstr)
 
#define mNotifyTest(objclass, uiobject, notifiername)
 
#define mGetInputString(inpptr, txt, haschanged)
 
#define mWriteInputCmd(haschanged, txt, enter)
 
#define mGetItemName(uiobj, sizefunc, textfunc, curitemidx, curitemname, casedep)
 

Macro Definition Documentation

#define mCompleteAndQuitIfEventNested (   ev,
  notifierstr 
)
Value:
\
if ( quitflag_ ) \
return true; \
else if ( ev.begin_ && !stackwasempty_ && \
stringEndsWithCI(notifierstr,ev.msg_) ) \
{ \
ignoreflag_ = false; \
quitflag_ = true; \
}
bool stringEndsWithCI(const char *, const char *)
#define mDeclClassifierClass (   callerclass)
Value:
\
class callerclass##Classifier : public Classifier \
{ \
public: \
\
static const char* className() { return #callerclass; } \
const char* name() const { return className(); } \
\
bool approved(const CallBacker* caller) const \
{ return dynamic_cast<const callerclass*>(caller); } \
};
To be able to send and/or receive CallBacks, inherit from this class.
Definition: callback.h:272
const char * className(const T &t)
Definition: errmsg.h:23
#define mEndDeclComposerClass   };
#define mGetInputString (   inpptr,
  txt,
  haschanged 
)
Value:
\
BufferString inpstr; \
char* inpptr = inpstr.getCStr(); \
if ( haschanged ) \
{ \
inpstr = " "; inpstr += txt; \
mSkipBlanks( inpptr ); \
char* endptr; \
strtod( inpptr, &endptr ); \
const char* nextword = endptr; \
mSkipBlanks( nextword ); \
if ( inpptr!=endptr && !*nextword ) \
{ \
*endptr = '\0'; \
inpstr += " "; \
} \
else \
{ \
mDressUserInputString( inpstr, sInputStr ); \
IdentifierManager().tryFilePathPlaceholders( inpstr ); \
inpstr += "\" "; \
inpptr = inpstr.getCStr(); \
*inpptr = '"'; \
} \
}
if(!noudf_ &&(mIsUdf(inpval)))
Definition: arrayndalgo.h:1662
#define mSkipBlanks(ptr)
Advances given pointer to first non-whitespace.
Definition: string2.h:81
#define mGetItemName (   uiobj,
  sizefunc,
  textfunc,
  curitemidx,
  curitemname,
  casedep 
)
Value:
\
BufferString curitemname = uiobj->textfunc( curitemidx ); \
mDressNameString( curitemname, sItemName ); \
bool casedep = false; \
{ \
int nrmatches = 0; \
int selnr = 0; \
\
for ( int itmidx=0; itmidx<uiobj->sizefunc(); itmidx++ ) \
{ \
const char* itmtxt = uiobj->textfunc( itmidx ); \
if ( SearchKey(curitemname,false).isMatching(itmtxt) ) \
{ \
if ( SearchKey(curitemname,true).isMatching(itmtxt) ) \
{ \
nrmatches++; \
if ( itmidx == curitemidx ) \
selnr = nrmatches; \
} \
else \
casedep = true; \
} \
} \
if ( selnr && nrmatches>1 ) \
{ \
curitemname += "#"; curitemname += selnr; \
} \
}
if(!noudf_ &&(mIsUdf(inpval)))
Definition: arrayndalgo.h:1662
#define mNotifyTest (   objclass,
  uiobject,
  notifiername 
)
Value:
{ \
mDynamicCastGet( objclass*, uiclassobj, uiobject ); \
if ( uiclassobj ) \
uiclassobj->notifiername.notify( mCB(this,CmdComposer,testCB) ); \
}
#define mCB(obj, clss, fn)
To make your CallBack. Used in many places, especially the UI.
Definition: callback.h:42
#define mRefuseAndQuit ( )
Value:
{ \
quitflag_ = true; \
if ( stackwasempty_ ) \
refuseAndQuitDone(); \
\
return false; \
}
#define mStartDeclComposerClass (   mod,
  cmdkey,
  parentclass,
  callerclass 
)
Value:
\
mStartDeclComposerClassNoAccept(mod,cmdkey,parentclass) \
mDeclClassifierClass(callerclass) \
\
virtual bool accept(const CmdRecEvent&); \
\
static CmdComposer* createInstance(CmdRecorder& cmdrec) \
{ return new cmdkey##CmdComposer(cmdrec); } \
static void initClass() \
{ factory().addCreator( createInstance, \
createFactoryKey(new callerclass##Classifier(), \
keyWord()) ); }
static void initClass()
#define mStartDeclComposerClassNoAccept (   mod,
  cmdkey,
  parentclass 
)
Value:
mExpClass(mod) cmdkey##CmdComposer : public parentclass \
{ \
public: \
cmdkey##CmdComposer(CmdRecorder& cmdrec) \
: parentclass(cmdrec) \
{ init(); } \
\
static const char* keyWord() { return #cmdkey; } \
virtual const char* name() { return keyWord(); } \
#define mExpClass(module)
Definition: commondefs.h:160
#define mStartDeclComposerClassWithInit (   mod,
  cmdkey,
  parentclass,
  callerclass 
)
Value:
mStartDeclComposerClass(mod,cmdkey,parentclass,callerclass) \
virtual void init();
bool init()
#define mStartDeclComposerClass(mod, cmdkey, parentclass, callerclass)
Definition: cmdcomposer.h:131
#define mWriteInputCmd (   haschanged,
  txt,
  enter 
)
Value:
{ \
mGetInputString( inpptr, txt, haschanged ); \
if ( haschanged || enter ) \
{ \
insertWindowCaseExec( *eventlist_[0] ); \
mRecOutStrm << "Input \"" << eventlist_[0]->keystr_ << "\" " \
<< inpptr << (enter ? "Enter" : "Hold") << od_endl; \
} \
}
od_ostream & od_endl(od_ostream &strm)
Definition: od_ostream.h:111
#define mRecOutStrm
Definition: cmdrecorder.h:31

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