-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathoutput.cpp
More file actions
48 lines (39 loc) · 1.33 KB
/
output.cpp
File metadata and controls
48 lines (39 loc) · 1.33 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
#include "output.h"
#include <iostream>
Output* Output::m_instance = nullptr;
Output* Output::getInstance(FileTracker &tracker)
{
if (m_instance == nullptr)
{
m_instance = new Output(tracker);
}
return m_instance;
}
void Output::onFileAdded(FileState &file)
{
std::cout << file.getFileDirectory().toStdString() << " was added to file tracker.\n";
}
void Output::onFileNotAddedFeatured(FileState &file)
{
std::cout << file.getFileDirectory().toStdString() << " was not added because it is already featured in the list.\n";
}
void Output::onFileRemoved(FileState &file)
{
std::cout << file.getFileDirectory().toStdString() << " was removed from file tracker.\n";
}
void Output::onFileNotRemovedNotFeatured(FileState &file)
{
std::cout << file.getFileDirectory().toStdString() << " cannot be removed because it is not featured in the list.\n";
}
void Output::onFileEdited(FileState &file)
{
std::cout << file.getFileDirectory().toStdString() << " was updated. Current size is "<< file.getSize() << " bytes.\n";
}
void Output::onFileCreated(FileState &file)
{
std::cout << file.getFileDirectory().toStdString() << " was created. Current size is "<< file.getSize() << " bytes.\n";
}
void Output::onFileDeleted(FileState &file)
{
std::cout << file.getFileDirectory().toStdString() << " was deleted.\n";
}