Index

C++ Code Documentation

base::System

File: BASE/base/System.H

public:
  • static int run( int (*main)(int argc , char* argv[]), int argc, char *argv[] );
  • System();
    Constructor.
  • char const *version() const;
  • void print_version() const;
    Print an app version message to std::cout.
  • void help() const;
    Print a help message to std::cout.
  • void usage( char option = 0, int error_type = 0 ) const;
    Print a usage message to std::cout. option == 0: Print a simple usage message. option != 0 and error_type == 1: Print an "unknown option" message. option != 0 and error_type == 2: Print an "missing argument to option" message.
  • void version(char const *s);
    Set the app version number to s.
  • void copyright(char const *s);
    Set the copyright message to s.
  • void usage(char const *s);
    Set the usage message to s.
  • void options(char const *s);
    Set the options informational message to s.
  • char const *name() const;
    Returns the app's name
  • void name( char const *name );
    Set the app's name
  • void file( char const *file, int line, char const *function );
    Set the file and line number information. Used by the WARN and DIE macros.
  • void warn( bool flag=true ) const;
  • void warn( char const *format, ... ) const;
  • void warn( bool flag, char const *format, ... ) const;
  • void die( bool flag=true ) const;
  • void die( char const *format, ... ) const;
  • void die( bool flag, char const *format, ... ) const;
  • void trace() const;
  • void warn( bool flag=true ) const;
  • void warn( char const *format, ... ) const;
  • void warn( bool flag, char const *format, ... ) const;
  • void die( bool flag=true ) const;
  • void die( char const *format, ... ) const;
  • void die( bool flag, char const *format, ... ) const;
  • void trace() const;
protected:
private:
  • void print() const;
  • void getdate( char date[7] );
  • char const *_name;
    App name.
  • char _version[7];
    App version number.
  • char const *_copyright;
    Copyright message.
  • char const *_usage;
    App usage message.
  • char const *_options;
    Options info message.
  • char const *_file;
    Filename.
  • int _line;
    File line number.
  • char const *_function;
    Function name.
  • static void newhandler();
    Catch out-of-memory errors.
  • static void terminate();
    Catch top-level exceptions.


base::System GANG