blob: e5c06249f8acd0ccf4425847a4a54622611b947d (
plain)
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
|
#ifndef __COMMON_H
#define __COMMON_H
#include "Singleton.hpp"
#include "Exportable.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; }
};
SINGLETON_EXTERN template class SINGLETON_EXPORT Singleton< Common >;
#endif
|