3
* $Id: globals.h 3497 2011-03-14 10:01:05Z carlos $
6
* Copyright 2008-10 MetaEmotion S.L. All rights reserved.
7
* http://ginkgo-cadx.com
9
* This file is licensed under LGPL v3 license.
10
* See License.txt for details
20
#if defined (_GINKGO_DEBUG)
21
#define GDEBUG(expr) std::cout << "D: " << expr << " @ " << __FILE__ << ":" << __LINE__ << std::endl;
23
#else // !defined (_GINKGO_DEBUG)
24
#define GDEBUG(expr) /* nada */
27
#if defined (_GINKGO_TRACE)
28
#define GTRACE(expr) std::cout << "T: " << expr << " @ " << __FILE__ << ":" << __LINE__ << std::endl;
30
#else // !defined (_GINKGO_DEBUG)
31
#define GTRACE(expr) /* nada */
34
#if defined(__WXGTK__) || defined(__WXMAC__) || defined(__WXMSW__)
37
#define TOPATH(stringwx) (stringwx.To8BitData()==NULL)?"":stringwx.To8BitData()
38
#define FROMPATH(stringstd) wxString::From8BitData(stringstd.c_str())
40
#define TOPATH(stringwx) stringwx.ToUTF8()
41
#define FROMPATH(stringstd) wxString::FromUTF8(stringstd.c_str())
45
//#define AUI_NAMESPACE TEST::
50
#define GINKGO_AUI_DECLARE(clase) class clase;
51
#define AUI_USE_NAMESPACE()
53
#define GINKGO_AUI_DECLARE(clase) namespace AUI_NAMESPACE { class clase; }
54
#define AUI_USE_NAMESPACE() using namespace AUI_NAMESPACE;
66
LARGE_INTEGER mInicio;
68
LARGE_INTEGER mFrecuencia;
80
QueryPerformanceCounter( &mInicio );
88
QueryPerformanceCounter( &mInicio );
96
QueryPerformanceCounter(&mFin);
97
QueryPerformanceFrequency(&mFrecuencia);
103
friend std::ostream& operator<<(std::ostream& out, const Timer& t)
105
#if defined(_WINDOWS)
106
const double tiempo = (double)(t.mFin.QuadPart - t.mInicio.QuadPart ) / (double) t.mFrecuencia.QuadPart;
107
return out << tiempo << " seg. " << 1.0 / tiempo << " Op./seg.";
109
return out << "No implementado";
114
friend std::ostream& operator<<(std::ostream& out, const Timer* t)
117
return out << "NULL";