w11 - cpp 0.794
Backend server for Rlink and w11
Loading...
Searching...
No Matches
RtclContext.hpp
Go to the documentation of this file.
1// $Id: RtclContext.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// 2018-12-16 1084 1.0.5 use =delete for noncopyable instead of boost
8// 2017-02-04 866 1.0.4 rename fMapContext -> fContextMap
9// 2013-01-12 474 1.0.3 add FindProxy() method
10// 2011-04-24 380 1.0.2 use boost::noncopyable (instead of private dcl's)
11// 2011-03-12 368 1.0.1 drop fExitSeen, get exit handling right
12// 2011-02-18 362 1.0 Initial version
13// 2011-02-18 362 0.1 First draft
14// ---------------------------------------------------------------------------
15
20#ifndef included_Retro_RtclContext
21#define included_Retro_RtclContext 1
22
23#include "tcl.h"
24
25#include <string>
26#include <set>
27#include <map>
28
29#include "RtclClassBase.hpp"
30#include "RtclProxyBase.hpp"
31
32namespace Retro {
33
35 public:
36 typedef std::set<RtclClassBase*> cset_t;
37 typedef std::set<RtclProxyBase*> pset_t;
38 typedef std::map<Tcl_Interp*, RtclContext*> xmap_t;
39
40 explicit RtclContext(Tcl_Interp* interp);
41 virtual ~RtclContext();
42
43 RtclContext(const RtclContext&) = delete; // noncopyable
44 RtclContext& operator=(const RtclContext&) = delete; // noncopyable
45
46 void RegisterClass(RtclClassBase* pobj);
48
49 void RegisterProxy(RtclProxyBase* pobj);
51 bool CheckProxy(RtclProxyBase* pobj);
52 bool CheckProxy(RtclProxyBase* pobj, const std::string& type);
53
54 void ListProxy(std::vector<RtclProxyBase*>& list,
55 const std::string& type);
56 RtclProxyBase* FindProxy(const std::string& type,
57 const std::string& name);
58
59 static RtclContext& Find(Tcl_Interp* interp);
60
61 static void ThunkTclExitProc(ClientData cdata);
62
63 protected:
64
65 Tcl_Interp* fInterp;
68
70 };
71
72} // end namespace Retro
73
74//#include "RtclContext.ipp"
75
76#endif
void UnRegisterClass(RtclClassBase *pobj)
FIXME_docs.
Definition: RtclContext.cpp:70
std::set< RtclProxyBase * > pset_t
Definition: RtclContext.hpp:37
cset_t fSetClass
set for Class objects
Definition: RtclContext.hpp:66
RtclContext(const RtclContext &)=delete
void RegisterProxy(RtclProxyBase *pobj)
FIXME_docs.
Definition: RtclContext.cpp:79
virtual ~RtclContext()
Destructor.
Definition: RtclContext.cpp:52
void ListProxy(std::vector< RtclProxyBase * > &list, const std::string &type)
FIXME_docs.
RtclProxyBase * FindProxy(const std::string &type, const std::string &name)
FIXME_docs.
bool CheckProxy(RtclProxyBase *pobj)
FIXME_docs.
RtclContext & operator=(const RtclContext &)=delete
Tcl_Interp * fInterp
associated tcl interpreter
Definition: RtclContext.hpp:65
std::set< RtclClassBase * > cset_t
Definition: RtclContext.hpp:36
void UnRegisterProxy(RtclProxyBase *pobj)
FIXME_docs.
Definition: RtclContext.cpp:91
static xmap_t fContextMap
map of contexts
Definition: RtclContext.hpp:69
static RtclContext & Find(Tcl_Interp *interp)
FIXME_docs.
pset_t fSetProxy
set for Proxy objects
Definition: RtclContext.hpp:67
static void ThunkTclExitProc(ClientData cdata)
FIXME_docs.
void RegisterClass(RtclClassBase *pobj)
FIXME_docs.
Definition: RtclContext.cpp:58
std::map< Tcl_Interp *, RtclContext * > xmap_t
Definition: RtclContext.hpp:38
Declaration of class ReventLoop.
Definition: ReventLoop.cpp:47