w11 - cpp 0.794
Backend server for Rlink and w11
Loading...
Searching...
No Matches
RtclGetList.hpp
Go to the documentation of this file.
1// $Id: RtclGetList.hpp 1186 2019-07-12 17:49:59Z mueller $
2// SPDX-License-Identifier: GPL-3.0-or-later
3// Copyright 2013-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.2.3 use =delete for noncopyable instead of boost
8// 2018-12-15 1083 1.2.2 Add(): use rval ref and move semantics
9// 2018-12-14 1081 1.2.1 use std::function instead of boost
10// 2018-12-01 1076 1.2 use unique_ptr
11// 2015-01-08 631 1.1 add Clear()
12// 2013-02-12 487 1.0 Initial version
13// ---------------------------------------------------------------------------
14
19#ifndef included_Retro_RtclGetList
20#define included_Retro_RtclGetList 1
21
22#include "tcl.h"
23
24#include <cstdint>
25#include <string>
26#include <map>
27#include <memory>
28#include <functional>
29
30#include "RtclGet.hpp"
32
33namespace Retro {
34
36 public:
37 typedef std::unique_ptr<RtclGetBase> get_uptr_t;
38
40 virtual ~RtclGetList();
41
42 RtclGetList(const RtclGetList&) = delete; // noncopyable
43 RtclGetList& operator=(const RtclGetList&) = delete; // noncopyable
44
45 void Add(const std::string& name, get_uptr_t&& upget);
46
47 template <class TP>
48 void Add(const std::string& name, std::function<TP()>&& get);
49
50 void Clear();
51 int M_get(RtclArgs& args);
52
53 protected:
54 typedef std::map<std::string, get_uptr_t> map_t;
55
57 };
58
59} // end namespace Retro
60
61#include "RtclGetList.ipp"
62
63#endif
FIXME_docs.
Definition: RtclArgs.hpp:41
virtual ~RtclGetList()
FIXME_docs.
Definition: RtclGetList.cpp:46
int M_get(RtclArgs &args)
FIXME_docs.
Definition: RtclGetList.cpp:73
std::unique_ptr< RtclGetBase > get_uptr_t
Definition: RtclGetList.hpp:37
RtclGetList(const RtclGetList &)=delete
RtclGetList & operator=(const RtclGetList &)=delete
RtclGetList()
FIXME_docs.
Definition: RtclGetList.cpp:39
void Add(const std::string &name, get_uptr_t &&upget)
FIXME_docs.
Definition: RtclGetList.cpp:52
void Clear()
FIXME_docs.
Definition: RtclGetList.cpp:64
std::map< std::string, get_uptr_t > map_t
Definition: RtclGetList.hpp:54
Declaration of class ReventLoop.
Definition: ReventLoop.cpp:47