OpenCores
URL https://opencores.org/ocsvn/w11/w11/trunk

Subversion Repositories w11

[/] [w11/] [tags/] [w11a_V0.61/] [tools/] [src/] [librtools/] [RosPrintfBase.hpp] - Blame information for rev 40

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 19 wfjm
// $Id: RosPrintfBase.hpp 486 2013-02-10 22:34:43Z mueller $
2 10 wfjm
//
3
// Copyright 2006-2011 by Walter F.J. Mueller <W.F.J.Mueller@gsi.de>
4
//
5
// This program is free software; you may redistribute and/or modify it under
6
// the terms of the GNU General Public License as published by the Free
7
// Software Foundation, either version 2, or at your option any later version.
8
//
9
// This program is distributed in the hope that it will be useful, but
10
// WITHOUT ANY WARRANTY, without even the implied warranty of MERCHANTABILITY
11
// or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
12
// for complete details.
13
// 
14
// Revision History: 
15
// Date         Rev Version  Comment
16
// 2011-02-25   364   1.1    Support << also to string
17
// 2011-01-30   357   1.0    Adopted from CTBprintfBase
18
// 2006-04-16     -   -      Last change on CTBprintfBase
19
// ---------------------------------------------------------------------------
20
 
21
/*!
22
  \file
23 19 wfjm
  \version $Id: RosPrintfBase.hpp 486 2013-02-10 22:34:43Z mueller $
24 10 wfjm
  \brief   Declaration of RosPrintfBase class .
25
*/
26
 
27
#ifndef included_Retro_RosPrintfBase
28
#define included_Retro_RosPrintfBase 1
29
 
30
#include <ostream>
31
#include <string>
32
 
33
namespace Retro {
34
 
35
  class RosPrintfBase {
36
    public:
37
                    RosPrintfBase(const char* form, int width, int prec);
38
      virtual       ~RosPrintfBase();
39
 
40
      virtual void  ToStream(std::ostream& os) const = 0;
41
 
42
    protected:
43
      const char*   fForm;                  //!< format string
44
      int           fWidth;                 //!< field width
45
      int           fPrec;                  //!< field precision
46
  };
47
 
48
  std::ostream& operator<<(std::ostream& os, const RosPrintfBase& obj);
49
  std::string&  operator<<(std::string& os,  const RosPrintfBase& obj);
50
 
51
} // end namespace Retro
52
 
53
#include "RosPrintfBase.ipp"
54
 
55
#endif

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.