w11 - cpp 0.794
Backend server for Rlink and w11
Loading...
Searching...
No Matches
RosPrintfBase.hpp
Go to the documentation of this file.
1// $Id: RosPrintfBase.hpp 1186 2019-07-12 17:49:59Z mueller $
2// SPDX-License-Identifier: GPL-3.0-or-later
3// Copyright 2006-2011 by Walter F.J. Mueller <W.F.J.Mueller@gsi.de>
4//
5// Revision History:
6// Date Rev Version Comment
7// 2011-02-25 364 1.1 Support << also to string
8// 2011-01-30 357 1.0 Adopted from CTBprintfBase
9// 2006-04-16 - - Last change on CTBprintfBase
10// ---------------------------------------------------------------------------
11
16#ifndef included_Retro_RosPrintfBase
17#define included_Retro_RosPrintfBase 1
18
19#include <ostream>
20#include <string>
21
22namespace Retro {
23
25 public:
26 RosPrintfBase(const char* form, int width, int prec);
27 virtual ~RosPrintfBase();
28
29 virtual void ToStream(std::ostream& os) const = 0;
30
31 protected:
32 const char* fForm;
33 int fWidth;
34 int fPrec;
35 };
36
37 std::ostream& operator<<(std::ostream& os, const RosPrintfBase& obj);
38 std::string& operator<<(std::string& os, const RosPrintfBase& obj);
39
40} // end namespace Retro
41
42#include "RosPrintfBase.ipp"
43
44#endif
Base class for print objects. **.
virtual void ToStream(std::ostream &os) const =0
Concrete implementation of the ostream insertion.
const char * fForm
format string
int fPrec
field precision
virtual ~RosPrintfBase()
Destructor.
int fWidth
field width
Declaration of class ReventLoop.
Definition: ReventLoop.cpp:47
std::ostream & operator<<(std::ostream &os, const RerrMsg &obj)