ZFFramework
 
Loading...
Searching...
No Matches
ZFMainEntry.h File Reference

app's main entry wrapper More...

#include "ZFObject.h"

Go to the source code of this file.

Namespaces

namespace  ZFApp
 

 

Macros

#define ZFMAIN_ENTRY()
 app's main entry wrapper
 
#define ZFMAIN_PARAM_DISPATCH(regSig)
 util macro to register ZFApp::E_AppParamDispatch
 

Functions

zfidentity ZFApp::E_AppParamDispatch (void)
 see ZFObject::observerNotify
 
zfidentity ZFApp::E_AppEntry (void)
 see ZFObject::observerNotify
 
const ZFCoreArray< zfstring > & ZFApp::appParams ()
 get the app params
 
void ZFApp::appExitCode (zfint exitCode)
 exit code for app, 0 by default
 
zfint ZFApp::appExitCode ()
 exit code for app, 0 by default
 

Detailed Description

app's main entry wrapper

Macro Definition Documentation

◆ ZFMAIN_ENTRY

#define ZFMAIN_ENTRY ( )

app's main entry wrapper

typical usage:

// in your main.cpp
// params hold the params from certain app routine,
// it's not ensured each implementation would have same params format
// do your work,
// which usually is creating your main window
// specify exit code if necessary
}
#define ZFMAIN_ENTRY()
app's main entry wrapper
Definition ZFMainEntry.h:38
light weight array
Definition ZFCoreArray.h:331
zfint appExitCode()
exit code for app, 0 by default
const ZFCoreArray< zfstring > & appParams()
get the app params

advanced:

◆ ZFMAIN_PARAM_DISPATCH

#define ZFMAIN_PARAM_DISPATCH ( regSig)

util macro to register ZFApp::E_AppParamDispatch

ZFMAIN_PARAM_DISPATCH(MyDispatch) {
if(xxx) {
zfargs.eventFiltered(zftrue);
doSomething();
}
}
#define zftrue
bool true type
Definition ZFCoreTypeDef_CoreType.h:107
#define ZFMAIN_PARAM_DISPATCH(regSig)
util macro to register ZFApp::E_AppParamDispatch
Definition ZFMainEntry.h:59