main.cpp File Reference

ENTRY POINT. More...

#include <getopt.h>
#include <cstring>
#include <cstdlib>
#include "executor.h"
#include "version.h"
#include "debug.h"
#include "invalidargumentexception.h"
#include "stringdefs.h"

Include dependency graph for main.cpp:

Go to the source code of this file.


Classes

struct  descriptions

Namespaces

namespace  std
 STL namespace.

Enumerations

enum  short_opts {
  opt_iqstream = '1', opt_ixstream = '2', opt_oestream = '3', opt_odstream = '4',
  opt_query_arg = 'q', opt_xml_arg = 'x', opt_eout_arg = 'e', opt_dout_arg = 'o',
  opt_debug = 'd', opt_streamdebug = 's', opt_streamnodebug = 'b', opt_fragmentxq = 'f',
  opt_version = 'v', opt_about = 'a', opt_help = 'h'
}

Functions

void printFragmentXQ ()
 Prints supported XQuery fragment (XQ).
void printVersionNumber ()
 Prints current version number and compile flags.
void printAbout ()
 Prints about (license and author) informations.
void invalidCall (const char *exec_name)
 Prints all available application call parameters.
ISTREAM_TYPE getInputStreamType (const char *arg)
 Returns the input stream type from a string (application call parameter).
OSTREAM_TYPE getOutputStreamType (const char *arg)
 Returns the output stream type from a string (application call parameter).
void executeOnExit ()
 Method, which is always invoked/executed on exit.
int main (int argc, char **argv)
 MAIN.

Variables

Executorexec = NULL
static struct option long_options []
int val
const char * desc
 options_descriptions []


Detailed Description

ENTRY POINT.

ENTRY POINT OF THIS APPLICATION.

Author:
Michael Schmidt

Gunnar Jehl

Version:
2.1
License:
Software License Agreement (BSD License)

Definition in file main.cpp.


Enumeration Type Documentation

enum short_opts

Short options definition.

Definition at line 117 of file main.cpp.


Function Documentation

void executeOnExit (  ) 

Method, which is always invoked/executed on exit.

Method, which is always invoked/executed on exit.

Return values:
void 

Definition at line 422 of file main.cpp.

Referenced by main().

ISTREAM_TYPE getInputStreamType ( const char *  arg  ) 

Returns the input stream type from a string (application call parameter).

Returns the input stream type from a string (application call parameter).

Parameters:
[in] arg Pointer to a char object (application call parameter), which should be checked for matching.
Return values:
ISTREAM_TYPE. 

Definition at line 387 of file main.cpp.

Referenced by main().

OSTREAM_TYPE getOutputStreamType ( const char *  arg  ) 

Returns the output stream type from a string (application call parameter).

Returns the output stream type from a string (application call parameter).

Parameters:
[in] arg Pointer to a char object (application call parameter), which should be checked for matching.
Return values:
OSTREAM_TYPE. 

Definition at line 405 of file main.cpp.

Referenced by main().

void invalidCall ( const char *  exec_name  ) 

Prints all available application call parameters.

Prints all available application call parameters, if application was called with none or wrong parameters.

Parameters:
[in] exec_name Name of the application.
Return values:
void 

Definition at line 294 of file main.cpp.

References desc.

Referenced by main().

int main ( int  argc,
char **  argv 
)

MAIN.

MAIN.

Parameters:
[in] argc Number of entered application call parameters.
[in] argv All entered application call parameters.
Return values:
int EXIT_FAILURE or 1 in case of an error, EXIT_SUCCESS or 0 if application terminated with success.

Definition at line 436 of file main.cpp.

References CmdLine::checkIntegrity(), executeOnExit(), Exception::getDebugMsg(), getInputStreamType(), getOutputStreamType(), invalidCall(), printAbout(), printFragmentXQ(), printVersionNumber(), and Executor::start().

void printAbout (  ) 

Prints about (license and author) informations.

Prints about (license and author) informations.

Return values:
void 

Definition at line 274 of file main.cpp.

References LICENSE_TXT.

Referenced by main().

void printFragmentXQ (  ) 

Prints supported XQuery fragment (XQ).

Prints supported XQuery fragment (XQ).

Return values:
void 

Definition at line 222 of file main.cpp.

References FRAGMENT_TXT.

Referenced by main().

void printVersionNumber (  ) 

Prints current version number and compile flags.

Prints current version number and compile flags.

Return values:
void 

Definition at line 231 of file main.cpp.

References VERSION_NUMBER.

Referenced by main().


Variable Documentation

const char * desc

The option description.

Definition at line 197 of file main.cpp.

Referenced by invalidCall().

Executor * exec = NULL

The Executor.

Definition at line 111 of file main.cpp.

struct option long_options[] [static]

Initial value:

 {
    
    {"iqstream", required_argument, 0, opt_iqstream},
    {"ixstream", required_argument, 0, opt_ixstream},
    {"oestream", required_argument, 0, opt_oestream},
    {"odstream", required_argument, 0, opt_odstream},
    {"query", required_argument, 0, opt_query_arg},
    {"xml", required_argument, 0, opt_xml_arg},
    {"eout", required_argument, 0, opt_eout_arg},
    {"dout", required_argument, 0, opt_dout_arg},
    
    {"debug", no_argument, 0, opt_debug},
    
    {"streamdebug", no_argument, 0, opt_streamdebug},
    {"streamnodebug", no_argument, 0, opt_streamnodebug},
    
    {"fragmentxq", no_argument, 0, opt_fragmentxq},
    
    {"version", no_argument, 0, opt_version},
    {"about", no_argument, 0, opt_about},
    {"help", no_argument, 0, opt_help},
    {0, 0, 0, 0}
}

Definition at line 144 of file main.cpp.

int val

The option index.

Definition at line 191 of file main.cpp.


Generated on Sun May 24 20:20:09 2009 for G(arbage) C(ollected) X(Query) Engine by  doxygen 1.5.9