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

Subversion Repositories w11

[/] [w11/] [tags/] [w11a_V0.6/] [tools/] [src/] [librtcltools/] [Rtcl.hpp] - 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: Rtcl.hpp 486 2013-02-10 22:34:43Z 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-01-06   473   1.0.4  add NewListIntObj(const uint(8|16)_t, ...)
17 10 wfjm
// 2011-03-13   369   1.0.3  add NewListIntObj(vector<uint8_t>)
18
// 2011-03-12   368   1.0.2  use namespace Rtcl
19
// 2011-03-05   366   1.0.1  add AppendResultNewLines()
20
// 2011-02-26   364   1.0    Initial version
21
// 2011-02-18   362   0.1    First draft
22
// ---------------------------------------------------------------------------
23
 
24
/*!
25
  \file
26 19 wfjm
  \version $Id: Rtcl.hpp 486 2013-02-10 22:34:43Z mueller $
27 10 wfjm
  \brief   Declaration of class Rtcl.
28
*/
29
 
30
#ifndef included_Retro_Rtcl
31
#define included_Retro_Rtcl 1
32
 
33
#include "tcl.h"
34
 
35
#include <cstddef>
36
#include <string>
37
#include <sstream>
38
#include <vector>
39
 
40
namespace Retro {
41
 
42
  namespace Rtcl {
43
    Tcl_Obj*        NewLinesObj(const std::string& str);
44
    Tcl_Obj*        NewLinesObj(std::ostringstream& sos);
45
 
46 19 wfjm
    Tcl_Obj*        NewListIntObj(const uint8_t* data, size_t size);
47
    Tcl_Obj*        NewListIntObj(const uint16_t* data, size_t size);
48 10 wfjm
    Tcl_Obj*        NewListIntObj(const std::vector<uint8_t>& vec);
49
    Tcl_Obj*        NewListIntObj(const std::vector<uint16_t>& vec);
50
 
51
    bool            SetVar(Tcl_Interp* interp,
52
                           const std::string& varname, Tcl_Obj* pobj);
53
    bool            SetVarOrResult(Tcl_Interp* interp,
54
                                   const std::string& varname, Tcl_Obj* pobj);
55
 
56
    void            AppendResultNewLines(Tcl_Interp* interp);
57
 
58
    void            SetResult(Tcl_Interp* interp, const std::string& str);
59
    void            SetResult(Tcl_Interp* interp, std::ostringstream& sos);
60
  };
61
 
62
} // end namespace Retro
63
 
64
#include "Rtcl.ipp"
65
 
66
#endif

powered by: WebSVN 2.1.0

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