w11 - cpp 0.794
Backend server for Rlink and w11
Loading...
Searching...
No Matches
Rwxxtpp_Init.cpp
Go to the documentation of this file.
1// $Id: Rwxxtpp_Init.cpp 1186 2019-07-12 17:49:59Z mueller $
2// SPDX-License-Identifier: GPL-3.0-or-later
3// Copyright 2013-2018 by Walter F.J. Mueller <W.F.J.Mueller@gsi.de>
4//
5// Revision History:
6// Date Rev Version Comment
7// 2014-08-22 584 1.0.1 use nullptr
8// 2013-02-10 485 1.0 Initial version
9// 2013-01-27 478 0.1 First draft
10// ---------------------------------------------------------------------------
11
16#include "tcl.h"
17
18#include <stdexcept>
19
21#include "RtclRw11.hpp"
22
23using namespace std;
24using namespace Retro;
25
26extern "C" int Rwxxtpp_Init(Tcl_Interp* interp); // -Wmissing-prototypes fix
27
28//------------------------------------------+-----------------------------------
29extern "C" int Rwxxtpp_Init(Tcl_Interp* interp)
30{
31 int irc;
32
33 // declare package name and version
34 irc = Tcl_PkgProvide(interp, "rwxxtpp", "1.0.0");
35 if (irc != TCL_OK) return irc;
36
37 try {
38 // register class commands
39 RtclClassOwned<RtclRw11>::CreateClass(interp, "rw11", "Rw11");
40 return TCL_OK;
41
42 } catch (exception& e) {
43 Tcl_AppendResult(interp, "-E: exception caught in Rwxxtpp_Init: '",
44 e.what(), "'", nullptr);
45 }
46 return TCL_ERROR;
47}
48
int Rwxxtpp_Init(Tcl_Interp *interp)
static void CreateClass(Tcl_Interp *interp, const char *name, const std::string &type)
FIXME_docs.
Declaration of class ReventLoop.
Definition: ReventLoop.cpp:47