w11 - cpp 0.794
Backend server for Rlink and w11
Loading...
Searching...
No Matches
RtclRw11UnitDisk.cpp
Go to the documentation of this file.
1// $Id: RtclRw11UnitDisk.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.2.3 use std::bind instead of lambda
8// 2018-12-15 1082 1.2.2 use lambda instead of boost::bind
9// 2018-10-06 1053 1.2.1 move using after includes (clang warning)
10// 2017-04-08 870 1.2 use Rw11UnitDisk& ObjUV(); inherit from RtclRw11Unit
11// 2015-05-14 680 1.1.1 fGets: remove enabled, now in RtclRw11UnitBase
12// 2015-03-21 659 1.1 fGets: add enabled
13// 2013-04-19 507 1.0 Initial version
14// 2013-02-22 490 0.1 First draft
15// ---------------------------------------------------------------------------
16
21#include <functional>
22
23#include "RtclRw11UnitDisk.hpp"
24
25using namespace std;
26using namespace std::placeholders;
27
33// all method definitions in namespace Retro
34namespace Retro {
35
36//------------------------------------------+-----------------------------------
38
39RtclRw11UnitDisk::RtclRw11UnitDisk(const std::string& type)
40 : RtclRw11Unit(type)
41{}
42
43//------------------------------------------+-----------------------------------
45
47{}
48
49//------------------------------------------+-----------------------------------
51
53{
54 // this can't be in ctor because pure virtual is called which is available
55 // only when more derived class is being constructed. SetupGetSet() must be
56 // called in ctor of a more derived class.
57
58 Rw11UnitDisk* pobj = &ObjUV();
59
60 fGets.Add<const string&> ("type", bind(&Rw11UnitDisk::Type, pobj));
61 fGets.Add<size_t> ("ncylinder", bind(&Rw11UnitDisk::NCylinder, pobj));
62 fGets.Add<size_t> ("nhead", bind(&Rw11UnitDisk::NHead, pobj));
63 fGets.Add<size_t> ("nsector", bind(&Rw11UnitDisk::NSector, pobj));
64 fGets.Add<size_t> ("blocksize", bind(&Rw11UnitDisk::BlockSize, pobj));
65 fGets.Add<size_t> ("nblock", bind(&Rw11UnitDisk::NBlock, pobj));
66 fGets.Add<bool> ("wprot", bind(&Rw11UnitDisk::WProt, pobj));
67
68 fSets.Add<const string&> ("type", bind(&Rw11UnitDisk::SetType,pobj, _1));
69
70 return;
71}
72
73} // end namespace Retro
void Add(const std::string &name, get_uptr_t &&upget)
FIXME_docs.
Definition: RtclGetList.cpp:52
RtclRw11UnitDisk(const std::string &type)
Constructor.
virtual Rw11UnitDisk & ObjUV()=0
void SetupGetSet()
FIXME_docs.
void Add(const std::string &name, set_uptr_t &&upset)
FIXME_docs.
Definition: RtclSetList.cpp:52
size_t NCylinder() const
FIXME_docs.
bool WProt() const
FIXME_docs.
size_t NHead() const
FIXME_docs.
const std::string & Type() const
FIXME_docs.
size_t NBlock() const
FIXME_docs.
virtual void SetType(const std::string &type)
FIXME_docs.
size_t NSector() const
FIXME_docs.
size_t BlockSize() const
FIXME_docs.
Declaration of class ReventLoop.
Definition: ReventLoop.cpp:47