Go to the source code of this file.
◆ 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) |
◆ AreProgramArgsSet()
| bool AreProgramArgsSet |
( |
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()
◆ 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()
◆ GetArgV()
◆ 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()
◆ getProcessNameForPID()
| const char* getProcessNameForPID |
( |
int |
pid | ) |
|
returns null if process not found, otherwise returns the executable name
◆ GetProjectVersionName()
| const char* GetProjectVersionName |
( |
void |
| ) |
|
◆ 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()
Returns if ExitProgram is called
◆ isProcessAlive()
| bool isProcessAlive |
( |
int |
pid | ) |
|
returns 1 if the process is still running
◆ NeedDataBase()
◆ NotifyExitProgram()
Function will be called on 'ExitProgram'
◆ PutIsLittleEndian()
| void PutIsLittleEndian |
( |
unsigned char * |
| ) |
|
Puts into 1 byte: 0=SunSparc/SGI (big), 1=PC (little)
◆ 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()
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