26 lines
444 B
C++
26 lines
444 B
C++
|
#ifndef roza_SRCLOC_HPP
|
||
|
#define roza_SRCLOC_HPP
|
||
|
|
||
|
#include <filesystem>
|
||
|
|
||
|
namespace roza
|
||
|
{
|
||
|
class SrcLoc
|
||
|
{
|
||
|
public:
|
||
|
explicit SrcLoc(std::filesystem::path source_file = "???", int line=1);
|
||
|
virtual ~SrcLoc();
|
||
|
|
||
|
std::filesystem::path source_file() const { return m_source_file; }
|
||
|
int line() const { return m_line; }
|
||
|
|
||
|
void set_line(int line);
|
||
|
|
||
|
private:
|
||
|
std::filesystem::path m_source_file;
|
||
|
int m_line;
|
||
|
};
|
||
|
}
|
||
|
|
||
|
#endif
|