w11 - cpp 0.794
Backend server for Rlink and w11
Loading...
Searching...
No Matches
RosPrintBvi.hpp
Go to the documentation of this file.
1// $Id: RosPrintBvi.hpp 1186 2019-07-12 17:49:59Z mueller $
2// SPDX-License-Identifier: GPL-3.0-or-later
3// Copyright 2011- by Walter F.J. Mueller <W.F.J.Mueller@gsi.de>
4//
5// Revision History:
6// Date Rev Version Comment
7// 2011-03-05 366 1.0 Initial version
8// ---------------------------------------------------------------------------
9
14#ifndef included_Retro_RosPrintBvi
15#define included_Retro_RosPrintBvi 1
16
17#include <cstdint>
18#include <ostream>
19#include <string>
20
21namespace Retro {
22
24 public:
25 explicit RosPrintBvi(uint8_t val, size_t base=2, size_t nbit=8);
26 explicit RosPrintBvi(uint16_t val, size_t base=2, size_t nbit=16);
27 explicit RosPrintBvi(uint32_t val, size_t base=2, size_t nbit=32);
28
29 void Print(std::ostream& os) const;
30 void Print(std::string& os) const;
31
32 protected:
33 void Convert(char* pbuf) const;
34
35 protected:
36 uint32_t fVal;
37 size_t fBase;
38 size_t fNbit;
39
40 };
41
42 std::ostream& operator<<(std::ostream& os, const RosPrintBvi& obj);
43 std::string& operator<<(std::string& os, const RosPrintBvi& obj);
44
45} // end namespace Retro
46
47#include "RosPrintBvi.ipp"
48
49#endif
void Convert(char *pbuf) const
FIXME_docs.
void Print(std::ostream &os) const
FIXME_docs.
Definition: RosPrintBvi.cpp:82
uint32_t fVal
value to be printed
Definition: RosPrintBvi.hpp:36
size_t fBase
base: 2,8, or 16
Definition: RosPrintBvi.hpp:37
size_t fNbit
number of bits to print
Definition: RosPrintBvi.hpp:38
Declaration of class ReventLoop.
Definition: ReventLoop.cpp:47
std::ostream & operator<<(std::ostream &os, const RerrMsg &obj)