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

Subversion Repositories w11

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

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 21 wfjm
// $Id: Rtools.hpp 516 2013-05-05 21:24:52Z mueller $
2 10 wfjm
//
3 19 wfjm
// Copyright 2011-2013 by Walter F.J. Mueller <W.F.J.Mueller@gsi.de>
4 10 wfjm
//
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 21 wfjm
// 2013-05-04   516   1.0.3  add CreateBackupFile(), String2Long()
17 19 wfjm
// 2013-02-13   481   1.0.2  remove ThrowLogic(), ThrowRuntime()
18 11 wfjm
// 2011-04-10   376   1.0.1  add ThrowLogic(), ThrowRuntime()
19 10 wfjm
// 2011-03-12   368   1.0    Initial version
20
// ---------------------------------------------------------------------------
21
 
22
/*!
23
  \file
24 21 wfjm
  \version $Id: Rtools.hpp 516 2013-05-05 21:24:52Z mueller $
25 10 wfjm
  \brief   Declaration of class Rtools .
26
*/
27
 
28
#ifndef included_Retro_Rtools
29
#define included_Retro_Rtools 1
30
 
31
#include <cstdint>
32
#include <string>
33
 
34 21 wfjm
#include "RerrMsg.hpp"
35
#include "RparseUrl.hpp"
36
 
37 10 wfjm
namespace Retro {
38
 
39
  struct RflagName {
40
    uint32_t      mask;
41
    const char*   name;
42 19 wfjm
  };
43 10 wfjm
 
44
  namespace Rtools {
45
    std::string     Flags2String(uint32_t flags, const RflagName* fnam,
46
                                 char delim='|');
47 21 wfjm
 
48
    bool            String2Long(const std::string& str, long& res,
49
                                RerrMsg& emsg, int base=10);
50
    bool            String2Long(const std::string& str, unsigned long& res,
51
                                RerrMsg& emsg, int base=10);
52
 
53
    bool            CreateBackupFile(const std::string& fname, size_t nbackup,
54
                                     RerrMsg& emsg);
55
    bool            CreateBackupFile(const RparseUrl& purl, RerrMsg& emsg);
56 10 wfjm
  };
57
 
58
} // end namespace Retro
59
 
60
//#include "Rtools.ipp"
61
 
62
#endif

powered by: WebSVN 2.1.0

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