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

Subversion Repositories w11

[/] [w11/] [tags/] [w11a_V0.74/] [tools/] [src/] [librwxxtpp/] [Rwxxtpp_Init.cpp] - Blame information for rev 38

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 27 wfjm
// $Id: Rwxxtpp_Init.cpp 584 2014-08-22 19:38:12Z mueller $
2 19 wfjm
//
3 27 wfjm
// Copyright 2013-2014 by Walter F.J. Mueller <W.F.J.Mueller@gsi.de>
4 19 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.1  use nullptr
17 19 wfjm
// 2013-02-10   485   1.0    Initial version
18
// 2013-01-27   478   0.1    First draft
19
// ---------------------------------------------------------------------------
20
 
21
/*!
22
  \file
23 27 wfjm
  \version $Id: Rwxxtpp_Init.cpp 584 2014-08-22 19:38:12Z mueller $
24 19 wfjm
  \brief   Implemenation of Rwxxtpp_Init .
25
*/
26
 
27
#include "tcl.h"
28
 
29
#include <stdexcept>
30
 
31
#include "librtcltools/RtclClassOwned.hpp"
32
#include "RtclRw11.hpp"
33
 
34
using namespace std;
35
using namespace Retro;
36
 
37
//------------------------------------------+-----------------------------------
38
extern "C" int Rwxxtpp_Init(Tcl_Interp* interp)
39
{
40
  int irc;
41
 
42
  // declare package name and version
43
  irc = Tcl_PkgProvide(interp, "rwxxtpp", "1.0.0");
44
  if (irc != TCL_OK) return irc;
45
 
46
  try {
47
    // register class commands
48
    RtclClassOwned<RtclRw11>::CreateClass(interp, "rw11", "Rw11");
49
    return TCL_OK;
50
 
51
  } catch (exception& e) {
52
    Tcl_AppendResult(interp, "-E: exception caught in Rwxxtpp_Init: '",
53 27 wfjm
                     e.what(), "'", nullptr);
54 19 wfjm
  }
55
  return TCL_ERROR;
56
}
57
 

powered by: WebSVN 2.1.0

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