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

Subversion Repositories w11

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

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

Line No. Rev Author Line
1 10 wfjm
// $Id: Rlinktpp_Init.cpp 375 2011-04-02 07:56:47Z mueller $
2
//
3
// Copyright 2011- by Walter F.J. Mueller <W.F.J.Mueller@gsi.de>
4
//
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
// 2011-03-20   372   1.0.2  renamed ..tcl -> ..tpp
17
// 2011-03-19   371   1.0.1  moved Bvi into librtoolstcl
18
// 2011-02-11   360   0.1    First draft
19
// ---------------------------------------------------------------------------
20
 
21
/*!
22
  \file
23
  \version $Id: Rlinktpp_Init.cpp 375 2011-04-02 07:56:47Z mueller $
24
  \brief   Implemenation of Rlinktpp_Init .
25
*/
26
 
27
#include "tcl.h"
28
 
29
#include <stdexcept>
30
 
31
#include "librtcltools/RtclClassOwned.hpp"
32
#include "RtclRlinkConnect.hpp"
33
 
34
using namespace std;
35
using namespace Retro;
36
 
37
//------------------------------------------+-----------------------------------
38
extern "C" int Rlinktpp_Init(Tcl_Interp* interp)
39
{
40
  int irc;
41
 
42
  // use stubs
43
  const char* vers = Tcl_InitStubs(interp, TCL_VERSION, 0);
44
  if (vers == NULL) return TCL_ERROR;
45
 
46
  // declare package name and version
47
  irc = Tcl_PkgProvide(interp, "rlinktpp", "1.0.0");
48
  if (irc != TCL_OK) return irc;
49
 
50
  try {
51
    // register class commands
52
    RtclClassOwned<RtclRlinkConnect>::CreateClass(interp, "rlinkconnect",
53
                                                  "RlinkConnect");
54
    return TCL_OK;
55
 
56
  } catch (exception& e) {
57
    Tcl_AppendResult(interp, "-E: exception caught in Rlinktpp_Init: \"",
58
                     e.what(), "\"", NULL);
59
  }
60
  return TCL_ERROR;
61
}
62
 

powered by: WebSVN 2.1.0

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