defuze.me  Client
singleton.hpp
00001 /**************************************************************************
00002 ** defuze.me Epitech Innovative Project
00003 **
00004 ** Copyright 2010
00005 **   Athena Calmettes - Jocelyn De La Rosa - Francois Gaillard
00006 **   Adrien Jarthon - Alexandre Moore - Luc Peres - Arnaud Sellier
00007 **
00008 ** All rights reserved.
00009 **************************************************************************/
00010 
00011 #ifndef SINGLETON_HPP
00012 #define SINGLETON_HPP
00013 
00020 template<typename T> class Singleton
00021 {
00022 public:
00023     static T& instance()
00024     {
00025         static T _instance;
00026         return _instance;
00027     }
00028 };
00029 
00030 #endif // SINGLETON_HPP