-
Notifications
You must be signed in to change notification settings - Fork 11
Expand file tree
/
Copy pathrp_base_reporter_impl.hpp
More file actions
66 lines (47 loc) · 1.52 KB
/
rp_base_reporter_impl.hpp
File metadata and controls
66 lines (47 loc) · 1.52 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
#pragma once
#include "reporter/api/rp_reporter.hpp"
#include <memory>
//------------------------------------------------------------------------------
namespace reporter {
//------------------------------------------------------------------------------
class BaseReporterImpl : public Reporter
{
public:
using SettingsPtr = std::unique_ptr< Settings >;
BaseReporterImpl( SettingsPtr && _settingsPtr );
~BaseReporterImpl();
const Settings & getSettings() const override;
void copySettings( const Settings & _settings ) override;
protected:
using Path = stdfs::path;
using CountType = size_t;
CountType getMaxFilesCount() const;
CountType getMaxDetailsCount() const;
bool getShowStdFiles() const;
static std::string getPathWithoutProject(
const Path & _filePath,
const Path & _dirPath
);
static bool isFromSameDirectory( const Path & _path1, const Path & _path2 );
static Path getCommonPath( const Path & _path1, const Path & _path2 );
bool isLimitFiles( CountType _currentNumber ) const;
bool isLimitFilesWithOriginSize(
CountType _currentNumber,
CountType _originSize
) const;
void printFileLimitLine(
CountType _filesCount,
std::ostream & _stream
) const;
bool isLimitDetails( CountType _currentNumber ) const;
void printDetailsLimitLine(
CountType _detailsCount,
std::ostream & _stream
) const;
private:
static bool isLimit( CountType _currentNumber, CountType _limit );
private:
SettingsPtr m_settings;
};
//------------------------------------------------------------------------------
}