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

Subversion Repositories w11

[/] [w11/] [tags/] [w11a_V0.61/] [tools/] [src/] [librtools/] [Rtools.hpp] - Diff between revs 21 and 26

Only display areas with differences | Details | Blame | View Log

Rev 21 Rev 26
// $Id: Rtools.hpp 516 2013-05-05 21:24:52Z mueller $
// $Id: Rtools.hpp 516 2013-05-05 21:24:52Z mueller $
//
//
// Copyright 2011-2013 by Walter F.J. Mueller <W.F.J.Mueller@gsi.de>
// Copyright 2011-2013 by Walter F.J. Mueller <W.F.J.Mueller@gsi.de>
//
//
// This program is free software; you may redistribute and/or modify it under
// This program is free software; you may redistribute and/or modify it under
// the terms of the GNU General Public License as published by the Free
// the terms of the GNU General Public License as published by the Free
// Software Foundation, either version 2, or at your option any later version.
// Software Foundation, either version 2, or at your option any later version.
//
//
// This program is distributed in the hope that it will be useful, but
// This program is distributed in the hope that it will be useful, but
// WITHOUT ANY WARRANTY, without even the implied warranty of MERCHANTABILITY
// WITHOUT ANY WARRANTY, without even the implied warranty of MERCHANTABILITY
// or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
// or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
// for complete details.
// for complete details.
// 
// 
// Revision History: 
// Revision History: 
// Date         Rev Version  Comment
// Date         Rev Version  Comment
// 2013-05-04   516   1.0.3  add CreateBackupFile(), String2Long()
// 2013-05-04   516   1.0.3  add CreateBackupFile(), String2Long()
// 2013-02-13   481   1.0.2  remove ThrowLogic(), ThrowRuntime()
// 2013-02-13   481   1.0.2  remove ThrowLogic(), ThrowRuntime()
// 2011-04-10   376   1.0.1  add ThrowLogic(), ThrowRuntime()
// 2011-04-10   376   1.0.1  add ThrowLogic(), ThrowRuntime()
// 2011-03-12   368   1.0    Initial version
// 2011-03-12   368   1.0    Initial version
// ---------------------------------------------------------------------------
// ---------------------------------------------------------------------------
 
 
/*!
/*!
  \file
  \file
  \version $Id: Rtools.hpp 516 2013-05-05 21:24:52Z mueller $
  \version $Id: Rtools.hpp 516 2013-05-05 21:24:52Z mueller $
  \brief   Declaration of class Rtools .
  \brief   Declaration of class Rtools .
*/
*/
 
 
#ifndef included_Retro_Rtools
#ifndef included_Retro_Rtools
#define included_Retro_Rtools 1
#define included_Retro_Rtools 1
 
 
#include <cstdint>
#include <cstdint>
#include <string>
#include <string>
 
 
#include "RerrMsg.hpp"
#include "RerrMsg.hpp"
#include "RparseUrl.hpp"
#include "RparseUrl.hpp"
 
 
namespace Retro {
namespace Retro {
 
 
  struct RflagName {
  struct RflagName {
    uint32_t      mask;
    uint32_t      mask;
    const char*   name;
    const char*   name;
  };
  };
 
 
  namespace Rtools {
  namespace Rtools {
    std::string     Flags2String(uint32_t flags, const RflagName* fnam,
    std::string     Flags2String(uint32_t flags, const RflagName* fnam,
                                 char delim='|');
                                 char delim='|');
 
 
    bool            String2Long(const std::string& str, long& res,
    bool            String2Long(const std::string& str, long& res,
                                RerrMsg& emsg, int base=10);
                                RerrMsg& emsg, int base=10);
    bool            String2Long(const std::string& str, unsigned long& res,
    bool            String2Long(const std::string& str, unsigned long& res,
                                RerrMsg& emsg, int base=10);
                                RerrMsg& emsg, int base=10);
 
 
    bool            CreateBackupFile(const std::string& fname, size_t nbackup,
    bool            CreateBackupFile(const std::string& fname, size_t nbackup,
                                     RerrMsg& emsg);
                                     RerrMsg& emsg);
    bool            CreateBackupFile(const RparseUrl& purl, RerrMsg& emsg);
    bool            CreateBackupFile(const RparseUrl& purl, RerrMsg& emsg);
  };
  };
 
 
} // end namespace Retro
} // end namespace Retro
 
 
//#include "Rtools.ipp"
//#include "Rtools.ipp"
 
 
#endif
#endif
 
 

powered by: WebSVN 2.1.0

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