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

Subversion Repositories w11

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

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 19 wfjm
// $Id: Rlinktpp_Init.cpp 504 2013-04-13 15:37:24Z mueller $
2 10 wfjm
//
3 19 wfjm
// Copyright 2011-2013 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 19 wfjm
// 2013-02-10   485   1.0.5  remove Tcl_InitStubs()
17
// 2013-01-27   478   1.0.4  add rlinkport
18
// 2013-01-12   474   1.0.3  add rlinkserver
19 10 wfjm
// 2011-03-20   372   1.0.2  renamed ..tcl -> ..tpp
20
// 2011-03-19   371   1.0.1  moved Bvi into librtoolstcl
21 19 wfjm
// 2011-03-14   370   1.0    Initial version
22 10 wfjm
// 2011-02-11   360   0.1    First draft
23
// ---------------------------------------------------------------------------
24
 
25
/*!
26
  \file
27 19 wfjm
  \version $Id: Rlinktpp_Init.cpp 504 2013-04-13 15:37:24Z mueller $
28 10 wfjm
  \brief   Implemenation of Rlinktpp_Init .
29
*/
30
 
31
#include "tcl.h"
32
 
33
#include <stdexcept>
34
 
35
#include "librtcltools/RtclClassOwned.hpp"
36 19 wfjm
#include "RtclRlinkPort.hpp"
37 10 wfjm
#include "RtclRlinkConnect.hpp"
38 19 wfjm
#include "RtclRlinkServer.hpp"
39 10 wfjm
 
40
using namespace std;
41
using namespace Retro;
42
 
43
//------------------------------------------+-----------------------------------
44
extern "C" int Rlinktpp_Init(Tcl_Interp* interp)
45
{
46
  int irc;
47
 
48
  // declare package name and version
49
  irc = Tcl_PkgProvide(interp, "rlinktpp", "1.0.0");
50
  if (irc != TCL_OK) return irc;
51
 
52
  try {
53
    // register class commands
54 19 wfjm
    RtclClassOwned<RtclRlinkPort>::CreateClass(interp, "rlinkport",
55
                                               "RlinkPort");
56 10 wfjm
    RtclClassOwned<RtclRlinkConnect>::CreateClass(interp, "rlinkconnect",
57
                                                  "RlinkConnect");
58 19 wfjm
    RtclClassOwned<RtclRlinkServer>::CreateClass(interp, "rlinkserver",
59
                                                 "RlinkServer");
60 10 wfjm
    return TCL_OK;
61
 
62
  } catch (exception& e) {
63 19 wfjm
    Tcl_AppendResult(interp, "-E: exception caught in Rlinktpp_Init: '",
64
                     e.what(), "'", NULL);
65 10 wfjm
  }
66
  return TCL_ERROR;
67
}
68
 

powered by: WebSVN 2.1.0

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