w11 - cpp 0.794
Backend server for Rlink and w11
Loading...
Searching...
No Matches
RtclRw11VirtDiskOver.cpp
Go to the documentation of this file.
1// $Id: RtclRw11VirtDiskOver.cpp 1186 2019-07-12 17:49:59Z mueller $
2// SPDX-License-Identifier: GPL-3.0-or-later
3// Copyright 2013-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// 2017-03-11 859 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("flush", bind(&RtclRw11VirtDiskOver::M_flush, this, _1));
39 AddMeth("list", bind(&RtclRw11VirtDiskOver::M_list, this, _1));
40}
41
42//------------------------------------------+-----------------------------------
44
46{}
47
48//------------------------------------------+-----------------------------------
50
52{
53 if (!args.AllDone()) return kERR;
54
55 // synchronize with server thread
56 lock_guard<RlinkConnect> lock(Obj().Cpu().Connect());
57 RerrMsg emsg;
58 if (!Obj().Flush(emsg)) return args.Quit(emsg);
59 return kOK;
60}
61
62//------------------------------------------+-----------------------------------
64
66{
67 if (!args.AllDone()) return kERR;
68 ostringstream sos;
69
70 // synchronize with server thread
71 lock_guard<RlinkConnect> lock(Obj().Cpu().Connect());
72 Obj().List(sos);
73 args.SetResult(sos);
74 return kOK;
75}
76
77} // end namespace Retro
FIXME_docs.
Definition: RerrMsg.hpp:25
FIXME_docs.
Definition: RtclArgs.hpp:41
int Quit(const std::string &str)
FIXME_docs.
Definition: RtclArgs.ipp:157
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.
int M_flush(RtclArgs &args)
FIXME_docs.
int M_list(RtclArgs &args)
FIXME_docs.
RtclRw11VirtDiskOver(Rw11VirtDiskOver *pobj)
Constructor.
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