w11 - cpp 0.794
Backend server for Rlink and w11
Loading...
Searching...
No Matches
RtclRw11UnitTape.cpp
Go to the documentation of this file.
1// $Id: RtclRw11UnitTape.cpp 1186 2019-07-12 17:49:59Z mueller $
2// SPDX-License-Identifier: GPL-3.0-or-later
3// Copyright 2015-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.1.3 use std::bind instead of lambda
8// 2018-12-15 1082 1.1.2 use lambda instead of boost::bind
9// 2018-10-06 1053 1.1.1 move using after includes (clang warning)
10// 2017-04-08 870 1.1 use Rw11UnitTape& ObjUV(); inherit from RtclRw11Unit
11// 2015-06-04 686 1.0 Initial version
12// 2015-05-17 683 0.1 First draft
13// ---------------------------------------------------------------------------
14
19#include <functional>
20
21#include "RtclRw11UnitTape.hpp"
22
23using namespace std;
24using namespace std::placeholders;
25
31// all method definitions in namespace Retro
32namespace Retro {
33
34//------------------------------------------+-----------------------------------
36
37RtclRw11UnitTape::RtclRw11UnitTape(const std::string& type)
38 : RtclRw11Unit(type)
39{}
40
41//------------------------------------------+-----------------------------------
43
45{}
46
47//------------------------------------------+-----------------------------------
49
51{
52 // this can't be in ctor because pure virtual is called which is available
53 // only when more derived class is being constructed. SetupGetSet() must be
54 // called in ctor of a more derived class.
55
56 Rw11UnitTape* pobj = &ObjUV();
57
58 fGets.Add<const string&> ("type", bind(&Rw11UnitTape::Type, pobj));
59 fGets.Add<bool> ("wprot", bind(&Rw11UnitTape::WProt, pobj));
60 fGets.Add<size_t> ("capacity", bind(&Rw11UnitTape::Capacity, pobj));
61 fGets.Add<bool> ("bot", bind(&Rw11UnitTape::Bot, pobj));
62 fGets.Add<bool> ("eot", bind(&Rw11UnitTape::Eot, pobj));
63 fGets.Add<bool> ("eom", bind(&Rw11UnitTape::Eom, pobj));
64 fGets.Add<int> ("posfile", bind(&Rw11UnitTape::PosFile, pobj));
65 fGets.Add<int> ("posrecord",bind(&Rw11UnitTape::PosRecord, pobj));
66
67 fSets.Add<const string&> ("type", bind(&Rw11UnitTape::SetType,pobj, _1));
68 fSets.Add<bool> ("wprot", bind(&Rw11UnitTape::SetWProt,pobj, _1));
69 fSets.Add<size_t> ("capacity", bind(&Rw11UnitTape::SetCapacity,pobj, _1));
70 fSets.Add<int> ("posfile", bind(&Rw11UnitTape::SetPosFile,pobj, _1));
71 fSets.Add<int> ("posrecord", bind(&Rw11UnitTape::SetPosRecord,pobj, _1));
72
73 return;
74}
75
76} // end namespace Retro
void Add(const std::string &name, get_uptr_t &&upget)
FIXME_docs.
Definition: RtclGetList.cpp:52
void SetupGetSet()
FIXME_docs.
RtclRw11UnitTape(const std::string &type)
Constructor.
virtual Rw11UnitTape & ObjUV()=0
void Add(const std::string &name, set_uptr_t &&upset)
FIXME_docs.
Definition: RtclSetList.cpp:52
bool Eom() const
FIXME_docs.
virtual void SetType(const std::string &type)
FIXME_docs.
bool Eot() const
FIXME_docs.
void SetCapacity(size_t nbyte)
FIXME_docs.
void SetPosRecord(int posrec)
FIXME_docs.
int PosFile() const
FIXME_docs.
bool WProt() const
FIXME_docs.
bool Bot() const
FIXME_docs.
const std::string & Type() const
FIXME_docs.
size_t Capacity() const
FIXME_docs.
int PosRecord() const
FIXME_docs.
void SetWProt(bool wprot)
FIXME_docs.
void SetPosFile(int posfile)
FIXME_docs.
Declaration of class ReventLoop.
Definition: ReventLoop.cpp:47