w11 - cpp 0.794
Backend server for Rlink and w11
Loading...
Searching...
No Matches
RtclRw11VirtDiskRam.cpp
Go to the documentation of this file.
1// $Id: RtclRw11VirtDiskRam.cpp 1186 2019-07-12 17:49:59Z mueller $
2// SPDX-License-Identifier: GPL-3.0-or-later
3// Copyright 2018-2019 by Walter F.J. Mueller <W.F.J.Mueller@gsi.de>
4//
5// Revision History:
6// Date Rev Version Comment
7// 2019-02-23 1114 1.0.3 use std::bind instead of lambda
8// 2018-12-17 1087 1.0.2 use std::lock_guard instead of boost
9// 2018-12-15 1082 1.0.1 use lambda instead of boost::bind
10// 2018-10-28 1063 1.0 Initial version
11// ---------------------------------------------------------------------------
12
17#include <functional>
18
20
21using namespace std;
22using namespace std::placeholders;
23
29// all method definitions in namespace Retro
30namespace Retro {
31
32//------------------------------------------+-----------------------------------
34
37{
38 AddMeth("list", bind(&RtclRw11VirtDiskRam::M_list, this, _1));
39}
40
41//------------------------------------------+-----------------------------------
43
45{}
46
47//------------------------------------------+-----------------------------------
49
51{
52 if (!args.AllDone()) return kERR;
53 ostringstream sos;
54
55 // synchronize with server thread
56 lock_guard<RlinkConnect> lock(Obj().Cpu().Connect());
57 Obj().List(sos);
58 args.SetResult(sos);
59 return kOK;
60}
61
62} // end namespace Retro
FIXME_docs.
Definition: RtclArgs.hpp:41
void SetResult(const std::string &str)
FIXME_docs.
Definition: RtclArgs.ipp:76
bool AllDone()
FIXME_docs.
Definition: RtclArgs.cpp:447
void AddMeth(const std::string &name, methfo_t &&methfo)
FIXME_docs.
Implemenation (all inline) of RtclRw11VirtBase.
RtclRw11VirtDiskRam(Rw11VirtDiskRam *pobj)
Constructor.
int M_list(RtclArgs &args)
FIXME_docs.
void List(std::ostream &os) const
FIXME_docs.
Declaration of class ReventLoop.
Definition: ReventLoop.cpp:47
static const int kERR
Definition: RtclBvi.cpp:38
static const int kOK
Definition: RtclBvi.cpp:37