OpendTect  6.6
Typedefs | Functions
genc.h File Reference
Include dependency graph for genc.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Typedefs

typedef void(* PtrAllVoidFn) (void)
 
typedef void(* ProgramRestartFn) ()
 

Functions

const char * GetProjectVersionName (void)
 
int GetPID (void)
 
const char * GetLocalHostName (void)
 
const char * GetLocalAddress (bool ipv4only=true)
 
const char * GetFullExecutablePath (void)
 
const char * GetExecutableName (void)
 
const char * GetOSIdentifier (void)
 
bool isProcessAlive (int pid)
 
const char * getProcessNameForPID (int pid)
 
int ExitProgram (int ret)
 
bool IsExiting ()
 
void NotifyExitProgram (PtrAllVoidFn)
 
bool StartProgramCopy ()
 
void SetProgramRestarter (ProgramRestartFn)
 
ProgramRestartFn GetBasicProgramRestarter ()
 
void RestartProgram ()
 
void PutIsLittleEndian (unsigned char *)
 
void SwapBytes (void *, int nbytes)
 
int InSysAdmMode (void)
 
void sleepSeconds (double)
 
const char * GetVCSVersion (void)
 
const char * GetLastSystemErrorMessage (void)
 
void ForkProcess (void)
 
void SetInSysAdmMode (void)
 
void EmptyFunction ()
 
bool SetBindings (const char *odbindir, int argc, char **argv, bool needdatabase)
 
bool InitBindings (const char **moddeps, bool forgui=false)
 
void CloseBindings ()
 
void DisableAutoSleep ()
 
void EnableAutoSleep ()
 
void SetProgramArgs (int argc, char **argv, bool require_valid_dataroot=true)
 
bool AreProgramArgsSet (void)
 
char ** GetArgV (void)
 
int & GetArgC (void)
 
bool NeedDataBase ()
 

Typedef Documentation

◆ ProgramRestartFn

typedef void(* ProgramRestartFn) ()

The default function restart starts a copy, notifies and exits. od_main sets a new one to do user interaction if needed. Code after this call should handle the case that the restart failed.

◆ PtrAllVoidFn

typedef void(* PtrAllVoidFn) (void)

Function Documentation

◆ AreProgramArgsSet()

bool AreProgramArgsSet ( void  )

◆ CloseBindings()

void CloseBindings ( )

If you no longer need bindings to OpendTect, this will make OpendTect cleanup and release the libraries if possible

◆ DisableAutoSleep()

void DisableAutoSleep ( )

◆ EmptyFunction()

void EmptyFunction ( )
inline

◆ EnableAutoSleep()

void EnableAutoSleep ( )

◆ ExitProgram()

int ExitProgram ( int  ret)

Win32: kills progam itself and ignores ret. Unix: uses exit(ret). Return value is convenience only, so you can use like: return exitProgram( retval );

◆ ForkProcess()

void ForkProcess ( void  )

◆ GetArgC()

int& GetArgC ( void  )

◆ GetArgV()

char** GetArgV ( void  )

◆ GetBasicProgramRestarter()

ProgramRestartFn GetBasicProgramRestarter ( )

if StartProgramCopy succeeds, calls ExitProgram.

◆ GetExecutableName()

const char* GetExecutableName ( void  )

returns name of the executable. setProgramArgs must be called for it to work.

◆ GetFullExecutablePath()

const char* GetFullExecutablePath ( void  )

returns full path to executable. setProgramArgs must be called for it to work.

◆ GetLastSystemErrorMessage()

const char* GetLastSystemErrorMessage ( void  )

◆ GetLocalAddress()

const char* GetLocalAddress ( bool  ipv4only = true)

returns (as expected) local host IP address Implemented in Network, thus only available if you link (and init) the Network lib

◆ GetLocalHostName()

const char* GetLocalHostName ( void  )

returns (as expected) local host name

◆ GetOSIdentifier()

const char* GetOSIdentifier ( void  )

◆ GetPID()

int GetPID ( void  )

returns process ID

◆ getProcessNameForPID()

const char* getProcessNameForPID ( int  pid)

returns null if process not found, otherwise returns the executable name

◆ GetProjectVersionName()

const char* GetProjectVersionName ( void  )

"dTect Vx.x"

◆ GetVCSVersion()

const char* GetVCSVersion ( void  )

Returns Subversion revision number or git commit hash

◆ InitBindings()

bool InitBindings ( const char **  moddeps,
bool  forgui = false 
)

Initialised the basic modules, and auto-loads plugins if needed, providing that ALO files exists.

◆ InSysAdmMode()

int InSysAdmMode ( void  )

returns 0 unless in sysadm mode

◆ IsExiting()

bool IsExiting ( )

Returns if ExitProgram is called

◆ isProcessAlive()

bool isProcessAlive ( int  pid)

returns 1 if the process is still running

◆ NeedDataBase()

bool NeedDataBase ( )

◆ NotifyExitProgram()

void NotifyExitProgram ( PtrAllVoidFn  )

Function will be called on 'ExitProgram'

◆ PutIsLittleEndian()

void PutIsLittleEndian ( unsigned char *  )

Puts into 1 byte: 0=SunSparc/SGI (big), 1=PC (little)

◆ RestartProgram()

void RestartProgram ( )

Uses the active ProgramRestartFn to make a copy and exit. If copy fails, the function will return.

◆ SetBindings()

bool SetBindings ( const char *  odbindir,
int  argc,
char **  argv,
bool  needdatabase 
)

Sets the Basic library, one must provide a valid path to the folder containing the OpendTect binaries. Additional arguments can be provided, for instance to set the dataroot and survey: –dataroot "C:\\surveys" –survey F3_Demo

◆ SetInSysAdmMode()

void SetInSysAdmMode ( void  )

◆ SetProgramArgs()

void SetProgramArgs ( int  argc,
char **  argv,
bool  require_valid_dataroot = true 
)

◆ SetProgramRestarter()

void SetProgramRestarter ( ProgramRestartFn  )

Sets another active ProgramRestartFn called by RestartProgram is called

◆ sleepSeconds()

void sleepSeconds ( double  )

puts current thread to sleep for (fraction of) seconds

◆ StartProgramCopy()

bool StartProgramCopy ( )

Starts another instance with original arguments. If it returns false, there is no new program; deal with it.

◆ SwapBytes()

void SwapBytes ( void *  ,
int  nbytes 
)

nbytes=2,4,... e.g. nbytes=4: abcd becomes cdab


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