remove deprecated classes : singleton

This commit is contained in:
Edouard Dupin 2012-02-20 20:32:06 +01:00
parent 1c0c59b0ca
commit 8e85f28fc8
3 changed files with 4 additions and 78 deletions

View File

@ -1,72 +0,0 @@
/**
*******************************************************************************
* @file etk/Singleton.h
* @brief ewol : singleton system class
* @author Edouard DUPIN
* @date 04/12/2010
* @par Project
* ewol TK
*
* @par Copyright
* Copyright 2011 Edouard DUPIN, all right reserved
*
* This software is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY.
*
* Licence summary :
* You can modify and redistribute the sources code and binaries.
* You can send me the bug-fix
*
* Term of the licence in in the file licence.txt.
*
*******************************************************************************
*/
#ifndef __ETK_SINGLETON_H__
#define __ETK_SINGLETON_H__
namespace etk {
template <typename T> class Singleton
{
protected:
// Constructeur/destructeur
Singleton(void) { }
~Singleton(void) { /*std::cout << "destroying singleton." << std::endl;*/ }
public:
// Interface publique
static T *Get(void)
{
if (NULL == _singleton)
{
_singleton = new T;
}
return (static_cast<T*> (_singleton));
}
static T *getInstance(void)
{
if (NULL == _singleton)
{
_singleton = new T;
}
return (static_cast<T*> (_singleton));
}
static void Kill(void)
{
if (NULL != _singleton)
{
delete _singleton;
_singleton = NULL;
}
}
private:
// Unique instance
static T *_singleton;
};
template <typename T> T *Singleton<T>::_singleton = NULL;
}
#endif

View File

@ -236,12 +236,11 @@ void ewol::Widget::SetCanHaveFocus(bool canFocusState)
}
}
#define TEST_CLIPPING_SIZE (10)
//#define TEST_CLIPPING_SIZE (10)
//#define TEST_CLIPPING_SIZE (3)
//#define TEST_CLIPPING_SIZE (0)
#define TEST_CLIPPING_SIZE (0)
#if 1
//def __PLATFORM__Android
#ifdef __PLATFORM__Android
# define clipping_type GLfloat
# define clipping_function glClipPlanef
#else
@ -255,7 +254,7 @@ bool ewol::Widget::GenDraw(void)
glTranslatef(m_origin.x,m_origin.y, 0);
//GLfloat
clipping_type eqn1[4] = { 0.0, 1.0, 0.0, -TEST_CLIPPING_SIZE}; // less the Y pos ...
clipping_type eqn2[4] = { 0.0, -1.0, 0.0, m_size.y-TEST_CLIPPING_SIZE-50}; // upper the y pos ...
clipping_type eqn2[4] = { 0.0, -1.0, 0.0, m_size.y-TEST_CLIPPING_SIZE}; // upper the y pos ...
clipping_type eqn3[4] = { 1.0, 0.0, 0.0, -TEST_CLIPPING_SIZE}; // less the x pos ...
clipping_type eqn4[4] = {-1.0, 0.0, 0.0, m_size.x-TEST_CLIPPING_SIZE}; // upper the x pos ...
//EWOL_DEBUG("widget size (" << m_size.x << "," << m_size.y << ")" );

View File

@ -28,7 +28,6 @@
#include <etk/Types.h>
#include <ewol/Debug.h>
#include <etk/VectorType.h>
#include <etk/Singleton.h>
#include <ewol/Widget.h>
#include <ewol/widgetMeta/Keyboard.h>