worldsim/src/libinitializer.cpp

00001 /********************************************************************************
00002  *  WorldSim -- library for robot simulations                                   *
00003  *  Copyright (C) 2008-2011 Gianluca Massera <emmegian@yahoo.it>                *
00004  *                                                                              *
00005  *  This program is free software; you can redistribute it and/or modify        *
00006  *  it under the terms of the GNU General Public License as published by        *
00007  *  the Free Software Foundation; either version 2 of the License, or           *
00008  *  (at your option) any later version.                                         *
00009  *                                                                              *
00010  *  This program is distributed in the hope that it will be useful,             *
00011  *  but WITHOUT ANY WARRANTY; without even the implied warranty of              *
00012  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the               *
00013  *  GNU General Public License for more details.                                *
00014  *                                                                              *
00015  *  You should have received a copy of the GNU General Public License           *
00016  *  along with this program; if not, write to the Free Software                 *
00017  *  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA  *
00018  ********************************************************************************/
00019 
00020 #include "worldsimconfig.h"
00021 #include "wmatrix.h"
00022 #include "logger.h"
00023 
00024 #ifdef __GNUC__
00025 #pragma GCC diagnostic ignored "-Wunused-parameter"
00026 #endif
00027 #ifdef FARSA_USE_YARP_AND_ICUB
00028     #include "yarp/dev/Drivers.h"
00029 #endif
00030 #ifdef __GNUC__
00031 #pragma GCC diagnostic warning "-Wunused-parameter"
00032 #endif
00033 
00034 using namespace farsa;
00035 
00036 // This is not in the farsa namespace because otherwise we get problems with
00037 // Q_INIT_RESOURCE (undefined symbol qInitResources_textures
00038 bool initWorldSimLib() {
00039     static bool dummy = false;
00040     if ( dummy ) return true;
00041     Q_INIT_RESOURCE(textures);
00042     qRegisterMetaType<wMatrix>("wMatrix");
00043     qRegisterMetaType<real>("real");
00044     dummy = true;
00045     Logger::info( "Library WorldSim Initialized" );
00046     return true;
00047 }