#ifndef TESTMODEL_HPP
#define TESTMODEL_HPP
class Singleton
{
public:
~Singleton() {
//std::cout << "destructor called!" << std::endl;
}
Singleton(const Singleton&) = delete;
Singleton& operator=(const Singleton&) = delete;
static Singleton& get_instance() {
static Singleton instance;
return instance;
}
void Singleton::settotal(int index)
{
this->total = index;
}
private:
int total;
Singleton() {
//std::cout << "constructor called!" << std::endl;
}
};
#endif