april  1.0.0
...
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
abstracta-main.cc File Reference

Contains application's entry point. More...

#include <april/april.h>
#include <april/aprillibrary.h>
#include <libbbb/2/doevents.h>
#include <QString>
#include <QTranslator>
#include <QDir>
#include <QSettings>
#include <QCoreApplication>
#include <iostream>
#include <argtable2.h>
#include <april/logic/aoutput.h>
#include <april/cmd/commandmap.h>
#include "abstractapril.h"

Macros

#define EXIT_OK   0
 the program exited normally
#define EXIT_CONTINUE   -1
 exit is ok and should continue
#define a__help   ((struct arg_lit *)argtable[ARG_HELP])
#define a__ver   ((struct arg_lit *)argtable[ARG_VER])
#define a__init   ((struct arg_file *)argtable[ARG_INIT_FILES])
#define a__cmds   ((struct arg_str *)argtable[ARG_INIT_FILES])
#define a__cmdfile   ((struct arg_str *)argtable[ARG_CMDFILE])
#define a__end   ((struct arg_end *)argtable[ARG_END])
#define ABSTRACTA_NAME   "abstracta"
#define LANG_FILE_PREFIX   ABSTRACTA_NAME "_"
#define LANG_FILE_SUFFIX   ".qm"
#define LANG_FILE(loc)   (LANG_FILE_PREFIX + loc + LANG_FILE_SUFFIX)

Enumerations

enum  ArgsTable {
  ARG_HELP = 0, ARG_VER, ARG_COMMANDS, ARG_CMDFILE,
  ARG_INIT_FILES, ARG_END, ARG_MAX, ARG_HELP = 0,
  ARG_VER, ARG_INIT_FILES, ARG_END, ARG_MAX
}
 components of the arguments table More...
enum  ExitCode {
  ExitOkBreak = -1, ExitOk = 0, ExitArgError, ExitFail,
  ExitMax
}
 exit codes used by routins in this file More...

Functions

void translatable (void)
 load proper language file based on application location and settings
int mainInit (int argc, char *argv[])
 initialisation method for the application
void mainEnd (void)
 ending function for the application
int main (int argc, char *argv[])
 application entry point

Variables

void * argtable [ARG_MAX]
 table of arguments
QStringList sl_init_load
 files to load at start-up

Detailed Description

Contains application's entry point.

Date
March 2013
Author
TNick

Macro Definition Documentation

#define a__cmdfile   ((struct arg_str *)argtable[ARG_CMDFILE])

direct access to arguments

#define a__cmds   ((struct arg_str *)argtable[ARG_INIT_FILES])

direct access to arguments

#define a__end   ((struct arg_end *)argtable[ARG_END])

direct access to arguments

#define a__help   ((struct arg_lit *)argtable[ARG_HELP])

direct access to arguments

#define a__init   ((struct arg_file *)argtable[ARG_INIT_FILES])

direct access to arguments

#define a__ver   ((struct arg_lit *)argtable[ARG_VER])

direct access to arguments

#define ABSTRACTA_NAME   "abstracta"

application macro

#define LANG_FILE (   loc)    (LANG_FILE_PREFIX + loc + LANG_FILE_SUFFIX)

application macro

#define LANG_FILE_PREFIX   ABSTRACTA_NAME "_"

application macro

#define LANG_FILE_SUFFIX   ".qm"

application macro

Enumeration Type Documentation

enum ArgsTable

components of the arguments table

Enumerator:
ARG_HELP 

present help

ARG_VER 

present version

ARG_COMMANDS 

commands to execute then exit

ARG_CMDFILE 

execute commands in file then exit

ARG_INIT_FILES 

initial files

ARG_END 

end marker

ARG_MAX 

error checking

ARG_HELP 

present help

ARG_VER 

present version

ARG_INIT_FILES 

initial files

ARG_END 

end marker

ARG_MAX 

error checking

enum ExitCode

exit codes used by routins in this file

Enumerator:
ExitOkBreak 

all went fine and should quit the program

ExitOk 

all went fine and should continue

ExitArgError 

provided arguments were wrong

ExitFail 

the command(s) failed to execute properly

ExitMax 

bounds check