blob: dc1f22aaedd074112ec1c77893842503d47c028e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
#ifndef __COMMON_H
#define __COMMON_H
#include "Singleton.hpp"
#include <iostream>
#include <string>
using namespace std;
class Common : public Singleton< Common >
{
private:
string m_name;
public:
Common( ) : m_name( "noname" ) { cout << "Created common object" << endl; }
virtual ~Common( ) { cout << "Destroyed common object" << endl; }
void setName( string name ) { m_name = name; }
void print( string s ) { cout << m_name << ": " << s << endl; }
};
#endif
|