This repository has been archived on 2025-03-22. You can view files and clone it, but cannot push or open issues or pull requests.
travelguide/env/source_address.hpp
2013-08-05 03:10:18 +03:00

31 lines
454 B
C++

#pragma once
#include "../std/string.hpp"
namespace dbg
{
class SourceAddress
{
char const * m_file;
char const * m_func;
int m_line;
public:
SourceAddress(char const * file, char const * func, int line)
: m_file(file), m_func(func), m_line(line)
{
}
string ToString() const;
};
inline string ToString(SourceAddress const & sa)
{
return sa.ToString();
}
}
#define SRC() ::dbg::SourceAddress(__FILE__, __FUNCTION__, __LINE__)