w11 - cpp 0.794
Backend server for Rlink and w11
Loading...
Searching...
No Matches
Rlinktpp_Init.cpp
Go to the documentation of this file.
1// $Id: Rlinktpp_Init.cpp 1186 2019-07-12 17:49:59Z mueller $
2// SPDX-License-Identifier: GPL-3.0-or-later
3// Copyright 2011-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.6 use nullptr
8// 2013-02-10 485 1.0.5 remove Tcl_InitStubs()
9// 2013-01-27 478 1.0.4 add rlinkport
10// 2013-01-12 474 1.0.3 add rlinkserver
11// 2011-03-20 372 1.0.2 renamed ..tcl -> ..tpp
12// 2011-03-19 371 1.0.1 moved Bvi into librtoolstcl
13// 2011-03-14 370 1.0 Initial version
14// 2011-02-11 360 0.1 First draft
15// ---------------------------------------------------------------------------
16
21#include "tcl.h"
22
23#include <stdexcept>
24
26#include "RtclRlinkPort.hpp"
27#include "RtclRlinkConnect.hpp"
28#include "RtclRlinkServer.hpp"
29
30using namespace std;
31using namespace Retro;
32
33extern "C" int Rlinktpp_Init(Tcl_Interp* interp); // -Wmissing-prototypes fix
34
35//------------------------------------------+-----------------------------------
36extern "C" int Rlinktpp_Init(Tcl_Interp* interp)
37{
38 int irc;
39
40 // declare package name and version
41 irc = Tcl_PkgProvide(interp, "rlinktpp", "1.0.0");
42 if (irc != TCL_OK) return irc;
43
44 try {
45 // register class commands
47 "RlinkPort");
49 "RlinkConnect");
51 "RlinkServer");
52 return TCL_OK;
53
54 } catch (exception& e) {
55 Tcl_AppendResult(interp, "-E: exception caught in Rlinktpp_Init: '",
56 e.what(), "'", nullptr);
57 }
58 return TCL_ERROR;
59}
60
int Rlinktpp_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