pkg.h File Reference

#include "tcl/makecmd.h"
#include "rutz/fileposition.h"
#include "rutz/debug.h"

Include dependency graph for pkg.h:

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

Go to the source code of this file.

Namespaces

namespace  rutz
namespace  tcl

Classes

class  tcl::pkg

Defines

#define GVX_PKG_CREATE(pkg, interp, pkgname, pkgversion)
 This macro should go at the top of each *_Init() function.
#define GVX_PKG_RETURN(pkg)
 This macro should go at the end of each *_Init() function.
#define GVX_PKG_FINISH(pkg)
 Use this instead of GVX_PKG_RETURN(pkg) if more work needs to be done after the package is initialized.

Variables

const int tcl::NO_EXPORT = 1 << 0


Detailed Description

tcl package class, holds a set of commands, wraps calls to Tcl_PkgProvide(), etc.

Definition in file pkg.h.


Define Documentation

#define GVX_PKG_CREATE ( pkg,
interp,
pkgname,
pkgversion   ) 

Value:

\
int GVX_PKG_STATUS = tcl::pkg::STATUS_ERR;                            \
{                                                                     \
  tcl::pkg* pkg = 0;                                                  \
                                                                      \
  try                                                                 \
    { pkg = tcl::pkg::create_in_macro(interp, pkgname, pkgversion); } \
  catch (...)                                                         \
    { return 1; }                                                     \
                                                                      \
  static bool recursive_initialization = false;                       \
  GVX_ASSERT(!recursive_initialization);                              \
  recursive_initialization = true;                                    \
                                                                      \
  try                                                                 \
  {
This macro should go at the top of each *_Init() function.

Constructs a tcl::pkg with a Tcl interpreter, package name, and package version. The version string should be in the form MM.mm where MM is major version, and mm is minor version. This constructor can also correctly parse a version string such as given by the RCS revision tag. If you're using svn, the suggested form is to choose a fixed major version number, and let the svn revision be the minor number, so you would pass a version string such as "4.$Revision: 10065 $".

Definition at line 329 of file pkg.h.

#define GVX_PKG_FINISH ( pkg   ) 

Value:

}                                             \
  catch(...)                                    \
  {                                             \
    pkg->handle_live_exception(SRC_POS);        \
  }                                             \
  recursive_initialization = false;             \
  GVX_PKG_STATUS = pkg->finish_init();          \
}
Use this instead of GVX_PKG_RETURN(pkg) if more work needs to be done after the package is initialized.

Definition at line 361 of file pkg.h.

#define GVX_PKG_RETURN ( pkg   ) 

Value:

}                                             \
  catch(...)                                    \
  {                                             \
    pkg->handle_live_exception(SRC_POS);        \
  }                                             \
  recursive_initialization = false;             \
  GVX_PKG_STATUS = pkg->finish_init();          \
}                                               \
return GVX_PKG_STATUS;
This macro should go at the end of each *_Init() function.

Definition at line 349 of file pkg.h.


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