// $Id: RlogMsg.hpp 490 2013-02-22 18:43:26Z mueller $
|
// $Id: RlogMsg.hpp 490 2013-02-22 18:43:26Z mueller $
|
//
|
//
|
// Copyright 2013- by Walter F.J. Mueller <W.F.J.Mueller@gsi.de>
|
// Copyright 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-02-22 490 1.0 Initial version
|
// 2013-02-22 490 1.0 Initial version
|
// ---------------------------------------------------------------------------
|
// ---------------------------------------------------------------------------
|
|
|
/*!
|
/*!
|
\file
|
\file
|
\version $Id: RlogMsg.hpp 490 2013-02-22 18:43:26Z mueller $
|
\version $Id: RlogMsg.hpp 490 2013-02-22 18:43:26Z mueller $
|
\brief Declaration of class RlogMsg.
|
\brief Declaration of class RlogMsg.
|
*/
|
*/
|
|
|
#ifndef included_Retro_RlogMsg
|
#ifndef included_Retro_RlogMsg
|
#define included_Retro_RlogMsg 1
|
#define included_Retro_RlogMsg 1
|
|
|
#include <sstream>
|
#include <sstream>
|
|
|
#include "boost/utility.hpp"
|
#include "boost/utility.hpp"
|
|
|
namespace Retro {
|
namespace Retro {
|
|
|
class RlogFile; // forw decl to avoid circular incl
|
class RlogFile; // forw decl to avoid circular incl
|
|
|
class RlogMsg : private boost::noncopyable {
|
class RlogMsg : private boost::noncopyable {
|
public:
|
public:
|
explicit RlogMsg(char tag = 0);
|
explicit RlogMsg(char tag = 0);
|
RlogMsg(RlogFile& lfile, char tag = 0);
|
RlogMsg(RlogFile& lfile, char tag = 0);
|
~RlogMsg();
|
~RlogMsg();
|
|
|
void SetTag(char tag);
|
void SetTag(char tag);
|
void SetString(const std::string& str);
|
void SetString(const std::string& str);
|
|
|
char Tag() const;
|
char Tag() const;
|
std::string String() const;
|
std::string String() const;
|
|
|
std::ostream& operator()();
|
std::ostream& operator()();
|
|
|
protected:
|
protected:
|
std::stringstream fStream; //!< string stream
|
std::stringstream fStream; //!< string stream
|
RlogFile* fLfile;
|
RlogFile* fLfile;
|
char fTag;
|
char fTag;
|
};
|
};
|
|
|
template <class T>
|
template <class T>
|
std::ostream& operator<<(RlogMsg& lmsg, const T& val);
|
std::ostream& operator<<(RlogMsg& lmsg, const T& val);
|
|
|
} // end namespace Retro
|
} // end namespace Retro
|
|
|
#include "RlogMsg.ipp"
|
#include "RlogMsg.ipp"
|
|
|
#endif
|
#endif
|
|
|