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

Subversion Repositories w11

[/] [w11/] [tags/] [w11a_V0.6/] [tools/] [src/] [librtcltools/] [RtclClassOwned.ipp] - 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: RtclClassOwned.ipp 488 2013-02-16 18:49:47Z mueller $
2 10 wfjm
//
3 19 wfjm
// Copyright 2011-2013 by Walter F.J. Mueller 
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-01-13   474   1.0.1  ClassCmdCreate(): fix configuration failed logic
17 10 wfjm
// 2011-02-20   363   1.0    Initial version
18
// 2011-02-11   360   0.1    First draft
19
// ---------------------------------------------------------------------------
20
 
21
/*!
22
  \file
23 19 wfjm
  \version $Id: RtclClassOwned.ipp 488 2013-02-16 18:49:47Z mueller $
24 10 wfjm
  \brief   Implemenation (inline) of class RtclClassOwned.
25
*/
26
 
27
#include 
28 19 wfjm
#include 
29 10 wfjm
 
30
#include "RtclProxyBase.hpp"
31 19 wfjm
#include "RtclArgs.hpp"
32 10 wfjm
 
33
/*!
34
  \class Retro::RtclClassOwned
35
  \brief FIXME_docs
36
*/
37
 
38 19 wfjm
// all method definitions in namespace Retro
39 10 wfjm
namespace Retro {
40
 
41
//------------------------------------------+-----------------------------------
42
//! Default constructor
43
 
44
template 
45 19 wfjm
inline RtclClassOwned::RtclClassOwned(const std::string& type)
46 10 wfjm
  : RtclClassBase(type)
47
{}
48
 
49
//------------------------------------------+-----------------------------------
50
//! Destructor
51
 
52
template 
53 19 wfjm
inline RtclClassOwned::~RtclClassOwned()
54 10 wfjm
{}
55
 
56
//------------------------------------------+-----------------------------------
57
//! FIXME_docs
58
 
59
template 
60
inline int RtclClassOwned::ClassCmdCreate(Tcl_Interp* interp, int objc,
61
                                              Tcl_Obj* const objv[])
62
{
63 19 wfjm
  RtclArgs  args(interp, objc, objv, 1);
64
  std::string name;
65
  if (!args.GetArg("name", name)) return kERR;
66
 
67
  // create new proxy object
68
  TP* pobj = new TP(interp, name.c_str());
69
  // execute configure, delete command in case configure failed
70
  //   Note: deleting the command will implicitely delete the object..
71
  if (pobj->ClassCmdConfig(args) != kOK) {
72
    ClassCmdDelete(interp, name.c_str());
73 10 wfjm
    return kERR;
74
  }
75
  return kOK;
76
}
77
 
78
//------------------------------------------+-----------------------------------
79
//! FIXME_docs
80
 
81
template 
82
inline void RtclClassOwned::CreateClass(Tcl_Interp* interp,
83
                                            const char* name,
84
                                            const std::string& type)
85
{
86
  RtclClassOwned* p = new RtclClassOwned(type);
87
  p->CreateClassCmd(interp, name);
88
  return;
89
}
90
 
91
} // end namespace Retro

powered by: WebSVN 2.1.0

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