w11 - cpp 0.794
Backend server for Rlink and w11
Loading...
Searching...
No Matches
RtclProxyBase.hpp
Go to the documentation of this file.
1// $Id: RtclProxyBase.hpp 1186 2019-07-12 17:49:59Z mueller $
2// SPDX-License-Identifier: GPL-3.0-or-later
3// Copyright 2011-2013 by Walter F.J. Mueller <W.F.J.Mueller@gsi.de>
4//
5// Revision History:
6// Date Rev Version Comment
7// 2013-02-09 485 1.4.2 add CommandName()
8// 2013-02-05 483 1.4.1 ClassCmdConfig: use RtclArgs
9// 2013-02-02 480 1.4 factor out RtclCmdBase base class
10// 2013-02-01 479 1.3 add DispatchCmd(), support $unknown method
11// 2011-07-31 401 1.2 add ctor(type,interp,name) for direct usage
12// 2011-04-23 380 1.1 use boost/function instead of RmethDsc
13// use boost::noncopyable (instead of private dcl's)
14// 2011-02-20 363 1.0 Initial version
15// 2011-02-11 360 0.1 First draft
16// ---------------------------------------------------------------------------
17
22#ifndef included_Retro_RtclProxyBase
23#define included_Retro_RtclProxyBase 1
24
25#include "tcl.h"
26
27#include <string>
28#include <map>
29
30#include "RtclCmdBase.hpp"
31
32#include "RtclArgs.hpp"
33
34namespace Retro {
35
36 class RtclProxyBase : public RtclCmdBase {
37 public:
38
39 explicit RtclProxyBase(const std::string& type = std::string());
40 RtclProxyBase(const std::string& type, Tcl_Interp* interp,
41 const char* name);
42 virtual ~RtclProxyBase();
43
44 virtual int ClassCmdConfig(RtclArgs& args);
45
46 const std::string& Type() const;
47 Tcl_Command Token() const;
48 std::string CommandName() const;
49
50 protected:
51 void SetType(const std::string& type);
52
53 void CreateObjectCmd(Tcl_Interp* interp, const char* name);
54
55 int TclObjectCmd(Tcl_Interp* interp, int objc,
56 Tcl_Obj* const objv[]);
57
58 static int ThunkTclObjectCmd(ClientData cdata, Tcl_Interp* interp,
59 int objc, Tcl_Obj* const objv[]);
60 static void ThunkTclCmdDeleteProc(ClientData cdata);
61 static void ThunkTclExitProc(ClientData cdata);
62
63 protected:
64 std::string fType;
65 Tcl_Interp* fInterp;
66 Tcl_Command fCmdToken;
67 };
68
69} // end namespace Retro
70
71#include "RtclProxyBase.ipp"
72
73#endif
FIXME_docs.
Definition: RtclArgs.hpp:41
void CreateObjectCmd(Tcl_Interp *interp, const char *name)
FIXME_docs.
Tcl_Interp * fInterp
tcl interpreter
virtual int ClassCmdConfig(RtclArgs &args)
FIXME_docs.
void SetType(const std::string &type)
FIXME_docs.
Tcl_Command fCmdToken
cmd token for object command
std::string fType
proxied type name
virtual ~RtclProxyBase()
Destructor.
Tcl_Command Token() const
FIXME_docs.
static int ThunkTclObjectCmd(ClientData cdata, Tcl_Interp *interp, int objc, Tcl_Obj *const objv[])
FIXME_docs.
std::string CommandName() const
FIXME_docs.
static void ThunkTclCmdDeleteProc(ClientData cdata)
FIXME_docs.
int TclObjectCmd(Tcl_Interp *interp, int objc, Tcl_Obj *const objv[])
FIXME_docs.
const std::string & Type() const
FIXME_docs.
static void ThunkTclExitProc(ClientData cdata)
FIXME_docs.
Declaration of class ReventLoop.
Definition: ReventLoop.cpp:47