OpendTect  6.6
prog.h
Go to the documentation of this file.
1 #pragma once
2 
3 /*+
4 ________________________________________________________________________
5 
6  (C) dGB Beheer B.V.; (LICENSE) http://opendtect.org/OpendTect_license.txt
7  Author: A.H. Bril
8  Date: 5-12-1995
9  RCS: $Id$
10 ________________________________________________________________________
11 
12  Include this file in any executable program you make.
13 
14 -*/
15 
16 #include "debug.h"
17 #include "genc.h"
18 #include "od_ostream.h"
19 #include "odruncontext.h"
20 #include "plugins.h"
21 
22 
23 // Use this in stand-alone program
24 # define mProgMainFnName doMain
25 
26 int doMain( int, char** );
27 
28 # ifndef mMainIsDefined
29 # define mMainIsDefined
30 int main( int argc, char** argv )
31 {
32  ExitProgram( doMain(argc,argv) );
33 }
34 # endif
35 
36 # define mInitProg( ctxt ) \
37  OD::SetRunContext( ctxt ); \
38 
39 
40 static inline mUsedVar od_ostream& gtStream( bool err=false )
41 {
42  return err ? od_ostream::logStream()
44 }
45 
47 {
48  return gtStream( false );
49 }
50 
52 {
53  return gtStream( true );
54 }
logStream
static mUnusedVar od_ostream & logStream()
Definition: prog.h:46
main
int main(int argc, char **argv)
Definition: prog.h:30
ExitProgram
int ExitProgram(int ret)
od_ostream.h
errStream
static mUnusedVar od_ostream & errStream()
Definition: prog.h:51
od_ostream::nullStream
static od_ostream & nullStream()
genc.h
plugins.h
odruncontext.h
mUnusedVar
#define mUnusedVar
Definition: plfdefs.h:210
od_ostream::logStream
static od_ostream & logStream()
used by ErrMsg and UsrMsg
gtStream
static mUsedVar od_ostream & gtStream(bool err=false)
Definition: prog.h:40
od_ostream
OD class for stream write common access to the user log file, or std::cout in other than od_main.
Definition: od_ostream.h:26
doMain
int doMain(int, char **)
debug.h

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