OpendTect  7.0
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Static Protected Member Functions | Protected Attributes | List of all members
ServerProgTool Class Referenceabstract
Inheritance diagram for ServerProgTool:
[legend]

Public Types

typedef OD::JSON::Array JSONArray
 
typedef OD::JSON::Object JSONObject
 

Public Member Functions

virtual ~ServerProgTool ()
 
CommandLineParserclp ()
 
const CommandLineParserclp () const
 
void exitProgram (bool success) const
 
void exitWithUsage () const
 
od_istreaminStream () const
 
 mUseType (TypeSet< int >, size_type)
 
od_ostreamoutStream () const
 
void respondError (const char *) const
 
void respondError (const uiRetVal &) const
 
void respondInfo (bool success, bool exit=true) const
 
void set (const char *, const bool *, size_type, JSONObject *o=0)
 
void set (const char *keyw, bool, JSONObject *jobj=0)
 
void set (const char *keyw, const BoolTypeSet &, JSONObject *jobj=0)
 
void set (const char *keyw, const BufferStringSet &, JSONObject *jobj=0)
 
void set (const char *keyw, const char *, JSONObject *jobj=0)
 
void set (const char *keyw, const DBKey &, JSONObject *jobj=0)
 
void set (const char *keyw, const DBKeySet &, JSONObject *jobj=0)
 
void set (const char *keyw, const double *, size_type, JSONObject *jobj=0)
 
void set (const char *keyw, const float *, size_type, JSONObject *jobj=0)
 
void set (const char *keyw, const od_int16 *, size_type, JSONObject *jobj=0)
 
void set (const char *keyw, const od_int32 *, size_type, JSONObject *jobj=0)
 
void set (const char *keyw, const od_int64 *, size_type, JSONObject *jobj=0)
 
void set (const char *keyw, const od_uint16 *, size_type, JSONObject *jobj=0)
 
void set (const char *keyw, const od_uint32 *, size_type, JSONObject *jobj=0)
 
void set (const char *keyw, const TypeSet< double > &, JSONObject *jobj=0)
 
void set (const char *keyw, const TypeSet< float > &, JSONObject *jobj=0)
 
void set (const char *keyw, const TypeSet< od_int16 > &, JSONObject *jobj=0)
 
void set (const char *keyw, const TypeSet< od_int32 > &, JSONObject *jobj=0)
 
void set (const char *keyw, const TypeSet< od_int64 > &, JSONObject *jobj=0)
 
void set (const char *keyw, const TypeSet< od_uint16 > &, JSONObject *jobj=0)
 
void set (const char *keyw, const TypeSet< od_uint32 > &, JSONObject *jobj=0)
 
void set (const char *keyw, double, JSONObject *jobj=0)
 
void set (const char *keyw, float, JSONObject *jobj=0)
 
void set (const char *keyw, JSONArray *)
 
void set (const char *keyw, JSONObject *)
 
void set (const char *keyw, od_int16, JSONObject *jobj=0)
 
void set (const char *keyw, od_int32, JSONObject *jobj=0)
 
void set (const char *keyw, od_int64, JSONObject *jobj=0)
 
void set (const char *keyw, od_uint16, JSONObject *jobj=0)
 
void set (const char *keyw, od_uint32, JSONObject *jobj=0)
 
void setDBMDataSource ()
 
- Public Member Functions inherited from CallBacker
 CallBacker ()
 
 CallBacker (const CallBacker &)
 
virtual ~CallBacker ()
 
bool attachCB (const NotifierAccess &, const CallBack &, bool onlyifnew=false) const
 
bool attachCB (const NotifierAccess *notif, const CallBack &cb, bool onlyifnew=false) const
 
void detachAllNotifiers () const
 Call from the destructor of your inherited object. More...
 
void detachCB (const NotifierAccess &, const CallBack &) const
 
void detachCB (const NotifierAccess *notif, const CallBack &cb) const
 
virtual bool isCapsule () const
 
bool isNotifierAttached (const NotifierAccess *) const
 Only for debugging purposes, don't use. More...
 
void stopReceivingNotifications () const
 
virtual CallBackertrueCaller ()
 

Static Public Member Functions

static const char * sAllUsrCmd ()
 
static const char * sExistsUsrCmd ()
 
static const char * sInfoUsrCmd ()
 
static const char * sKeyTransGrp (int n=1)
 
static const char * sListSurvCmd ()
 
static const char * sListUsrCmd ()
 
- Static Public Member Functions inherited from CallBacker
static void createReceiverForCurrentThread ()
 
static void removeReceiverForCurrentThread ()
 

Protected Member Functions

 ServerProgTool (int, char **, const char *moddep)
 
void exitProgram (bool success)
 
DBKey getDBKey (const char *ky, bool mandatory=true) const
 
BufferString getKeyedArgStr (const char *ky, bool mandatory=true) const
 
virtual BufferString getSpecificUsage () const =0
 
void initParsing (int protocolnr, bool setdatasrc=true)
 
template<class T >
void setArr (const char *, const T &, JSONObject *)
 
template<class T >
void setArr (const char *, const T *, size_type, JSONObject *)
 
template<class T >
void setSingle (const char *, T, JSONObject *)
 
void setStatus (bool) const
 
void timerTickCB (CallBacker *)
 

Static Protected Member Functions

static void addToUsageStr (BufferString &, const char *flg, const char *args, bool isextra=false)
 

Protected Attributes

CommandLineParserclp_
 
IOPar iop_
 
bool jsonmode_
 
JSONObjectjsonroot_
 
int protocolnr_ = 0
 
int retval_ = -1
 
Timertimer_
 

Detailed Description

<>

Member Typedef Documentation

◆ JSONArray

◆ JSONObject

Constructor & Destructor Documentation

◆ ~ServerProgTool()

virtual ServerProgTool::~ServerProgTool ( )
virtual

◆ ServerProgTool()

ServerProgTool::ServerProgTool ( int  ,
char **  ,
const char *  moddep 
)
protected

Member Function Documentation

◆ addToUsageStr()

static void ServerProgTool::addToUsageStr ( BufferString ,
const char *  flg,
const char *  args,
bool  isextra = false 
)
staticprotected

◆ clp() [1/2]

CommandLineParser& ServerProgTool::clp ( )
inline

◆ clp() [2/2]

const CommandLineParser& ServerProgTool::clp ( ) const
inline

◆ exitProgram() [1/2]

void ServerProgTool::exitProgram ( bool  success)
protected

◆ exitProgram() [2/2]

void ServerProgTool::exitProgram ( bool  success) const

◆ exitWithUsage()

void ServerProgTool::exitWithUsage ( ) const

◆ getDBKey()

DBKey ServerProgTool::getDBKey ( const char *  ky,
bool  mandatory = true 
) const
protected

◆ getKeyedArgStr()

BufferString ServerProgTool::getKeyedArgStr ( const char *  ky,
bool  mandatory = true 
) const
protected

◆ getSpecificUsage()

virtual BufferString ServerProgTool::getSpecificUsage ( ) const
protectedpure virtual

◆ initParsing()

void ServerProgTool::initParsing ( int  protocolnr,
bool  setdatasrc = true 
)
protected

◆ inStream()

od_istream& ServerProgTool::inStream ( ) const

◆ mUseType()

ServerProgTool::mUseType ( TypeSet< int >  ,
size_type   
)

◆ outStream()

od_ostream& ServerProgTool::outStream ( ) const

◆ respondError() [1/2]

void ServerProgTool::respondError ( const char *  ) const

◆ respondError() [2/2]

void ServerProgTool::respondError ( const uiRetVal ) const

◆ respondInfo()

void ServerProgTool::respondInfo ( bool  success,
bool  exit = true 
) const

◆ sAllUsrCmd()

static const char* ServerProgTool::sAllUsrCmd ( )
inlinestatic

◆ set() [1/30]

void ServerProgTool::set ( const char *  ,
const bool *  ,
size_type  ,
JSONObject o = 0 
)

◆ set() [2/30]

void ServerProgTool::set ( const char *  keyw,
bool  ,
JSONObject jobj = 0 
)

◆ set() [3/30]

void ServerProgTool::set ( const char *  keyw,
const BoolTypeSet ,
JSONObject jobj = 0 
)

◆ set() [4/30]

void ServerProgTool::set ( const char *  keyw,
const BufferStringSet ,
JSONObject jobj = 0 
)

◆ set() [5/30]

void ServerProgTool::set ( const char *  keyw,
const char *  ,
JSONObject jobj = 0 
)

◆ set() [6/30]

void ServerProgTool::set ( const char *  keyw,
const DBKey ,
JSONObject jobj = 0 
)

◆ set() [7/30]

void ServerProgTool::set ( const char *  keyw,
const DBKeySet ,
JSONObject jobj = 0 
)

◆ set() [8/30]

void ServerProgTool::set ( const char *  keyw,
const double *  ,
size_type  ,
JSONObject jobj = 0 
)

◆ set() [9/30]

void ServerProgTool::set ( const char *  keyw,
const float *  ,
size_type  ,
JSONObject jobj = 0 
)

◆ set() [10/30]

void ServerProgTool::set ( const char *  keyw,
const od_int16 *  ,
size_type  ,
JSONObject jobj = 0 
)

◆ set() [11/30]

void ServerProgTool::set ( const char *  keyw,
const od_int32 *  ,
size_type  ,
JSONObject jobj = 0 
)

◆ set() [12/30]

void ServerProgTool::set ( const char *  keyw,
const od_int64 *  ,
size_type  ,
JSONObject jobj = 0 
)

◆ set() [13/30]

void ServerProgTool::set ( const char *  keyw,
const od_uint16 *  ,
size_type  ,
JSONObject jobj = 0 
)

◆ set() [14/30]

void ServerProgTool::set ( const char *  keyw,
const od_uint32 *  ,
size_type  ,
JSONObject jobj = 0 
)

◆ set() [15/30]

void ServerProgTool::set ( const char *  keyw,
const TypeSet< double > &  ,
JSONObject jobj = 0 
)

◆ set() [16/30]

void ServerProgTool::set ( const char *  keyw,
const TypeSet< float > &  ,
JSONObject jobj = 0 
)

◆ set() [17/30]

void ServerProgTool::set ( const char *  keyw,
const TypeSet< od_int16 > &  ,
JSONObject jobj = 0 
)

◆ set() [18/30]

void ServerProgTool::set ( const char *  keyw,
const TypeSet< od_int32 > &  ,
JSONObject jobj = 0 
)

◆ set() [19/30]

void ServerProgTool::set ( const char *  keyw,
const TypeSet< od_int64 > &  ,
JSONObject jobj = 0 
)

◆ set() [20/30]

void ServerProgTool::set ( const char *  keyw,
const TypeSet< od_uint16 > &  ,
JSONObject jobj = 0 
)

◆ set() [21/30]

void ServerProgTool::set ( const char *  keyw,
const TypeSet< od_uint32 > &  ,
JSONObject jobj = 0 
)

◆ set() [22/30]

void ServerProgTool::set ( const char *  keyw,
double  ,
JSONObject jobj = 0 
)

◆ set() [23/30]

void ServerProgTool::set ( const char *  keyw,
float  ,
JSONObject jobj = 0 
)

◆ set() [24/30]

void ServerProgTool::set ( const char *  keyw,
JSONArray  
)

◆ set() [25/30]

void ServerProgTool::set ( const char *  keyw,
JSONObject  
)

◆ set() [26/30]

void ServerProgTool::set ( const char *  keyw,
od_int16  ,
JSONObject jobj = 0 
)

◆ set() [27/30]

void ServerProgTool::set ( const char *  keyw,
od_int32  ,
JSONObject jobj = 0 
)

◆ set() [28/30]

void ServerProgTool::set ( const char *  keyw,
od_int64  ,
JSONObject jobj = 0 
)

◆ set() [29/30]

void ServerProgTool::set ( const char *  keyw,
od_uint16  ,
JSONObject jobj = 0 
)

◆ set() [30/30]

void ServerProgTool::set ( const char *  keyw,
od_uint32  ,
JSONObject jobj = 0 
)

◆ setArr() [1/2]

template<class T >
void ServerProgTool::setArr ( const char *  ,
const T &  ,
JSONObject  
)
protected

◆ setArr() [2/2]

template<class T >
void ServerProgTool::setArr ( const char *  ,
const T *  ,
size_type  ,
JSONObject  
)
protected

◆ setDBMDataSource()

void ServerProgTool::setDBMDataSource ( )

◆ setSingle()

template<class T >
void ServerProgTool::setSingle ( const char *  ,
,
JSONObject  
)
protected

◆ setStatus()

void ServerProgTool::setStatus ( bool  ) const
protected

◆ sExistsUsrCmd()

static const char* ServerProgTool::sExistsUsrCmd ( )
inlinestatic

◆ sInfoUsrCmd()

static const char* ServerProgTool::sInfoUsrCmd ( )
inlinestatic

◆ sKeyTransGrp()

static const char* ServerProgTool::sKeyTransGrp ( int  n = 1)
inlinestatic

◆ sListSurvCmd()

static const char* ServerProgTool::sListSurvCmd ( )
inlinestatic

◆ sListUsrCmd()

static const char* ServerProgTool::sListUsrCmd ( )
inlinestatic

◆ timerTickCB()

void ServerProgTool::timerTickCB ( CallBacker )
protected

Member Data Documentation

◆ clp_

CommandLineParser* ServerProgTool::clp_
protected

◆ iop_

IOPar ServerProgTool::iop_
protected

◆ jsonmode_

bool ServerProgTool::jsonmode_
protected

◆ jsonroot_

JSONObject& ServerProgTool::jsonroot_
protected

◆ protocolnr_

int ServerProgTool::protocolnr_ = 0
protected

◆ retval_

int ServerProgTool::retval_ = -1
protected

◆ timer_

Timer& ServerProgTool::timer_
protected

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