[Developers] For help

Bert Bril bert at opendtect.org
Wed Dec 2 11:01:27 CET 2009


Ygh (?),


> i am a novice to your wonderful software (i.e opendTect), and i have a
> stupid question to ask after i skim over some of the source code under
> the src directory . I didn't find the main function entry just like a
> normal c or c++ program .

This uncovers a very important point about OpendTect development: make 
sure you have *good* text searching tools.

There are many main's in the source tree, but the 'real' top level of 
odmain(.exe) is in the directory uiODMain, file odmain.cc (well, who 
would have thought that!).

Basically, there are 3 types of programs:

1) odmain itself is a full-GUI program that manages many things, a.o. 
the loading of plugins.

2) programs of the type 'BatchProgram'. These do not have their own 
main(), which can be found in the 'Batch' directory. These programs 
expect the first (normal) argument to be a file name - the 'parameter 
file'. If you make such a program, you will have to make a function 
'BatchProgram::go(std::ostream& logfile)'. Examples can be found in the 
spec/ODSeisBP directory. Also src/Attributes/process_attrib.cc is a 
BatchProgram.

3) Other special-purpose programs are more 'normal' with just a simple 
main function, some with GUI, others without. Example:
src/uiSeis/SEGYExaminer.cc


Bert

-- 
-- Bert Bril / OpendTect developer at dGB
-- mailto:Bert.Bril at opendtect.org , http://opendtect.org





More information about the Developers mailing list