scriptapp.h File Reference

#include "rutz/fstring.h"
#include "rutz/trace.h"
#include <exception>
#include <tcl.h>

Include dependency graph for scriptapp.h:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace  tcl

Classes

struct  tcl::package_info
class  tcl::script_app
 Use inside main() to initialize and run a scripting application. More...

Defines

#define GVX_SCRIPT_PROG_BEGIN(app, name, argc, argv)
 Call this macro at the beginning of main().
#define GVX_SCRIPT_PROG_END(app)
 Call this macro at the end of main().


Detailed Description

helper class used in main() to initialize and run a scripting application

Definition in file scriptapp.h.


Define Documentation

#define GVX_SCRIPT_PROG_BEGIN ( app,
name,
argc,
argv   ) 

Value:

try                                                   \
  {                                                     \
  GVX_TRACE(name);                                      \
                                                        \
    tcl::script_app::init_in_macro_only();              \
                                                        \
    tcl::script_app app(name, argc, argv);
Call this macro at the beginning of main().

This will define a local variable of type script tcl::script_app, whose variable name is given by app.

Definition at line 107 of file scriptapp.h.

#define GVX_SCRIPT_PROG_END ( app   ) 

Value:

return app.exit_status();                                   \
  }                                                             \
  catch (std::exception& err)                                   \
    {                                                           \
      tcl::script_app::handle_exception_in_macro_only(&err);    \
    }                                                           \
  catch (...)                                                   \
    {                                                           \
      tcl::script_app::handle_exception_in_macro_only(0);       \
    }                                                           \
  return -1;
Call this macro at the end of main().

Definition at line 118 of file scriptapp.h.


The software described here is Copyright (c) 1998-2005, Rob Peters.
This page was generated Wed Dec 3 06:52:48 2008 by Doxygen version 1.5.5.