-
Notifications
You must be signed in to change notification settings - Fork 11
Expand file tree
/
Copy pathrp_base_reporter_impl.cpp
More file actions
83 lines (61 loc) · 1.92 KB
/
Copy pathrp_base_reporter_impl.cpp
File metadata and controls
83 lines (61 loc) · 1.92 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
#include "reporter/impl/rp_base_reporter_impl.hpp"
#include <string>
#include <std_fs>
//------------------------------------------------------------------------------
namespace reporter {
//------------------------------------------------------------------------------
BaseReporterImpl::BaseReporterImpl()
: m_maxFilesCount{ 0 }
, m_maxDetailsCount{ 0 }
, m_showStdFile{ false }
{
}
//------------------------------------------------------------------------------
void BaseReporterImpl::setMaxFilesCount( size_t _count )
{
m_maxFilesCount = _count;
}
//------------------------------------------------------------------------------
void BaseReporterImpl::setMaxDetailsCount( size_t _count )
{
m_maxDetailsCount = _count;
}
//------------------------------------------------------------------------------
size_t BaseReporterImpl::getMaxFilesCount() const
{
return m_maxFilesCount;
}
//------------------------------------------------------------------------------
size_t BaseReporterImpl::getMaxDetailsCount() const
{
return m_maxDetailsCount;
}
//------------------------------------------------------------------------------
void BaseReporterImpl::setShowStdFile( bool _enable )
{
m_showStdFile = _enable;
}
//------------------------------------------------------------------------------
bool BaseReporterImpl::getShowStdFiles() const
{
return m_showStdFile;
}
//------------------------------------------------------------------------------
std::string BaseReporterImpl::getPathWithoutProject(
const Path & _filePath,
const Path & _dirPath
) const
{
if( _dirPath.empty() )
return _filePath.string();
Path result = stdfs::lexically_relative( _filePath, _dirPath );
// if file out of project then return full path
if( ( !result.empty() ) && (*result.begin()) != ".." )
return result.string();
else
{
return _filePath.string();
}
}
//------------------------------------------------------------------------------
}