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

Subversion Repositories w11

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

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

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

powered by: WebSVN 2.1.0

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