w11 - cpp 0.794
Backend server for Rlink and w11
Loading...
Searching...
No Matches
Rtcl.hpp
Go to the documentation of this file.
1// $Id: Rtcl.hpp 1186 2019-07-12 17:49:59Z mueller $
2// SPDX-License-Identifier: GPL-3.0-or-later
3// Copyright 2011-2018 by Walter F.J. Mueller <W.F.J.Mueller@gsi.de>
4//
5// Revision History:
6// Date Rev Version Comment
7// 2013-01-06 473 1.0.4 add NewListIntObj(const uint(8|16)_t, ...)
8// 2011-03-13 369 1.0.3 add NewListIntObj(vector<uint8_t>)
9// 2011-03-12 368 1.0.2 use namespace Rtcl
10// 2011-03-05 366 1.0.1 add AppendResultNewLines()
11// 2011-02-26 364 1.0 Initial version
12// 2011-02-18 362 0.1 First draft
13// ---------------------------------------------------------------------------
14
19#ifndef included_Retro_Rtcl
20#define included_Retro_Rtcl 1
21
22#include "tcl.h"
23
24#include <cstddef>
25#include <string>
26#include <sstream>
27#include <vector>
28
29namespace Retro {
30
31 namespace Rtcl {
32 Tcl_Obj* NewLinesObj(const std::string& str);
33 Tcl_Obj* NewLinesObj(std::ostringstream& sos);
34
35 Tcl_Obj* NewListIntObj(const uint8_t* data, size_t size);
36 Tcl_Obj* NewListIntObj(const uint16_t* data, size_t size);
37 Tcl_Obj* NewListIntObj(const std::vector<uint8_t>& vec);
38 Tcl_Obj* NewListIntObj(const std::vector<uint16_t>& vec);
39
40 bool SetVar(Tcl_Interp* interp,
41 const std::string& varname, Tcl_Obj* pobj);
42 bool SetVarOrResult(Tcl_Interp* interp,
43 const std::string& varname, Tcl_Obj* pobj);
44
45 void AppendResultNewLines(Tcl_Interp* interp);
46
47 void SetResult(Tcl_Interp* interp, const std::string& str);
48 void SetResult(Tcl_Interp* interp, std::ostringstream& sos);
49 }
50
51} // end namespace Retro
52
53#include "Rtcl.ipp"
54
55#endif
FIXME_docs.
void SetResult(Tcl_Interp *interp, const std::string &str)
bool SetVarOrResult(Tcl_Interp *interp, const std::string &varname, Tcl_Obj *pobj)
void AppendResultNewLines(Tcl_Interp *interp)
Tcl_Obj * NewLinesObj(const std::string &str)
bool SetVar(Tcl_Interp *interp, const std::string &varname, Tcl_Obj *pobj)
Tcl_Obj * NewListIntObj(const uint8_t *data, size_t size)
Declaration of class ReventLoop.
Definition: ReventLoop.cpp:47