-
Notifications
You must be signed in to change notification settings - Fork 0
/
SEcho.cpp
38 lines (25 loc) · 816 Bytes
/
SEcho.cpp
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
#include "SEcho.hpp"
#include <iostream>
SEcho * SEcho::sech_instance_to_get = nullptr;
SEcho::SEcho() : message_to_show("Single instance obj. ")
{
std::cout << __PRETTY_FUNCTION__ << " called." << std::endl;
std::cout << __DATE__ << " date" << std::endl;
std::cout << __FILE__ << " file used" << std::endl;
std::cout << __LINE__ << " line" << std::endl;
std::cout << __TIME__ << " time" << std::endl;
// std::cout << __FUNCSIG__ << " time" << std::endl;
};
SEcho& SEcho::getInstance()
{
if(!sech_instance_to_get)
{
sech_instance_to_get = new SEcho();
}
return *sech_instance_to_get;
}
void SEcho::showMessageFromObject() const
{
std::cout << __PRETTY_FUNCTION__ << " called." << std::endl;
std::cout << message_to_show << std::endl;
}