OpenCores
URL https://opencores.org/ocsvn/w11/w11/trunk

Subversion Repositories w11

[/] [w11/] [tags/] [w11a_V0.7/] [tools/] [src/] [librlinktpp/] [Rlinktpp_Init.cpp] - Blame information for rev 36

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 27 wfjm
// $Id: Rlinktpp_Init.cpp 584 2014-08-22 19:38:12Z mueller $
2 10 wfjm
//
3 27 wfjm
// Copyright 2011-2014 by Walter F.J. Mueller <W.F.J.Mueller@gsi.de>
4 10 wfjm
//
5
// This program is free software; you may redistribute and/or modify it under
6
// the terms of the GNU General Public License as published by the Free
7
// Software Foundation, either version 2, or at your option any later version.
8
//
9
// This program is distributed in the hope that it will be useful, but
10
// WITHOUT ANY WARRANTY, without even the implied warranty of MERCHANTABILITY
11
// or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
12
// for complete details.
13
// 
14
// Revision History: 
15
// Date         Rev Version  Comment
16 27 wfjm
// 2014-08-22   584   1.0.6  use nullptr
17 19 wfjm
// 2013-02-10   485   1.0.5  remove Tcl_InitStubs()
18
// 2013-01-27   478   1.0.4  add rlinkport
19
// 2013-01-12   474   1.0.3  add rlinkserver
20 10 wfjm
// 2011-03-20   372   1.0.2  renamed ..tcl -> ..tpp
21
// 2011-03-19   371   1.0.1  moved Bvi into librtoolstcl
22 19 wfjm
// 2011-03-14   370   1.0    Initial version
23 10 wfjm
// 2011-02-11   360   0.1    First draft
24
// ---------------------------------------------------------------------------
25
 
26
/*!
27
  \file
28 27 wfjm
  \version $Id: Rlinktpp_Init.cpp 584 2014-08-22 19:38:12Z mueller $
29 10 wfjm
  \brief   Implemenation of Rlinktpp_Init .
30
*/
31
 
32
#include "tcl.h"
33
 
34
#include <stdexcept>
35
 
36
#include "librtcltools/RtclClassOwned.hpp"
37 19 wfjm
#include "RtclRlinkPort.hpp"
38 10 wfjm
#include "RtclRlinkConnect.hpp"
39 19 wfjm
#include "RtclRlinkServer.hpp"
40 10 wfjm
 
41
using namespace std;
42
using namespace Retro;
43
 
44
//------------------------------------------+-----------------------------------
45
extern "C" int Rlinktpp_Init(Tcl_Interp* interp)
46
{
47
  int irc;
48
 
49
  // declare package name and version
50
  irc = Tcl_PkgProvide(interp, "rlinktpp", "1.0.0");
51
  if (irc != TCL_OK) return irc;
52
 
53
  try {
54
    // register class commands
55 19 wfjm
    RtclClassOwned<RtclRlinkPort>::CreateClass(interp, "rlinkport",
56
                                               "RlinkPort");
57 10 wfjm
    RtclClassOwned<RtclRlinkConnect>::CreateClass(interp, "rlinkconnect",
58
                                                  "RlinkConnect");
59 19 wfjm
    RtclClassOwned<RtclRlinkServer>::CreateClass(interp, "rlinkserver",
60
                                                 "RlinkServer");
61 10 wfjm
    return TCL_OK;
62
 
63
  } catch (exception& e) {
64 19 wfjm
    Tcl_AppendResult(interp, "-E: exception caught in Rlinktpp_Init: '",
65 27 wfjm
                     e.what(), "'", nullptr);
66 10 wfjm
  }
67
  return TCL_ERROR;
68
}
69
 

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.