w11 - cpp 0.794
Backend server for Rlink and w11
Loading...
Searching...
No Matches
Rw11CntlBase.ipp
Go to the documentation of this file.
1// $Id: Rw11CntlBase.ipp 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-07 1078 1.0.3 use std::shared_ptr instead of boost
8// 2017-04-15 874 1.0.2 add UnitBase()
9// 2017-04-02 865 1.0.1 Dump(): add detail arg
10// 2013-03-06 495 1.0 Initial version
11// 2013-02-14 488 0.1 First draft
12// ---------------------------------------------------------------------------
13
18#include "librtools/RosFill.hpp"
20
21#include "Rw11CntlBase.hpp"
22
28// all method definitions in namespace Retro
29namespace Retro {
30
31//------------------------------------------+-----------------------------------
34template <class TU, size_t NU>
35inline Rw11CntlBase<TU,NU>::Rw11CntlBase(const std::string& type)
36 : Rw11Cntl(type)
37{}
39//------------------------------------------+-----------------------------------
42template <class TU, size_t NU>
44{}
45
46//------------------------------------------+-----------------------------------
48
49template <class TU, size_t NU>
50inline size_t Rw11CntlBase<TU,NU>::NUnit() const
51{
52 return NU;
53}
54
55//------------------------------------------+-----------------------------------
57
58template <class TU, size_t NU>
59inline Rw11Unit& Rw11CntlBase<TU,NU>::UnitBase(size_t index) const
60{
61 return *fspUnit[index];
62}
63
64//------------------------------------------+-----------------------------------
66
67template <class TU, size_t NU>
68inline TU& Rw11CntlBase<TU,NU>::Unit(size_t index) const
69{
70 return *fspUnit[index];
71}
72
73//------------------------------------------+-----------------------------------
75
76template <class TU, size_t NU>
77inline const std::shared_ptr<TU>&
79{
80 return fspUnit[index];
81}
82
83//------------------------------------------+-----------------------------------
85
86template <class TU, size_t NU>
87void Rw11CntlBase<TU,NU>::Dump(std::ostream& os, int ind,
88 const char* text, int detail) const
89{
90 RosFill bl(ind);
91 os << bl << (text?text:"--") << "Rw11CntlBase @ " << this << std::endl;
92 os << bl << " fspUnit: " << std::endl;
93 for (size_t i=0; i<NU; i++) {
94 os << bl << " " << RosPrintf(i,"d",2) << " : "
95 << fspUnit[i].get() << std::endl;
96 }
97 Rw11Cntl::Dump(os, ind, " ^", detail);
98 return;
99}
100
101} // end namespace Retro
I/O appicator to generate fill characters.
Definition: RosFill.hpp:24
virtual Rw11Unit & UnitBase(size_t index) const
FIXME_docs.
Rw11CntlBase(const std::string &type)
Constructor.
virtual void Dump(std::ostream &os, int ind=0, const char *text=0, int detail=0) const
FIXME_docs.
virtual size_t NUnit() const
FIXME_docs.
~Rw11CntlBase()
Destructor.
TU & Unit(size_t index) const
FIXME_docs.
const std::shared_ptr< TU > & UnitSPtr(size_t index) const
FIXME_docs.
FIXME_docs.
Definition: Rw11Cntl.hpp:42
virtual void Dump(std::ostream &os, int ind=0, const char *text=0, int detail=0) const
FIXME_docs.
Definition: Rw11Cntl.cpp:133
FIXME_docs.
Definition: Rw11Unit.hpp:39
RosPrintfS< bool > RosPrintf(bool value, const char *form=0, int width=0, int prec=0)
Creates a print object for the formatted output of a bool value.
Definition: RosPrintf.ipp:38
Declaration of class ReventLoop.
Definition: ReventLoop.cpp:47