Back to index

salome-kernel  6.5.0
Launcher_Utils.hxx
Go to the documentation of this file.
00001 // Copyright (C) 2007-2012  CEA/DEN, EDF R&D, OPEN CASCADE
00002 //
00003 // This library is free software; you can redistribute it and/or
00004 // modify it under the terms of the GNU Lesser General Public
00005 // License as published by the Free Software Foundation; either
00006 // version 2.1 of the License.
00007 //
00008 // This library is distributed in the hope that it will be useful,
00009 // but WITHOUT ANY WARRANTY; without even the implied warranty of
00010 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00011 // Lesser General Public License for more details.
00012 //
00013 // You should have received a copy of the GNU Lesser General Public
00014 // License along with this library; if not, write to the Free Software
00015 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
00016 //
00017 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
00018 //
00019 
00020 // Author: André RIBES - EDF R&D
00021 //
00022 #ifndef __LAUNCHER_UTILS_HXX__
00023 #define __LAUNCHER_UTILS_HXX__
00024 
00025 #include <iostream>
00026 
00027 #ifdef WIN32
00028 # if defined LAUNCHER_EXPORTS || defined Launcher_EXPORTS
00029 #  define LAUNCHER_EXPORT __declspec(dllexport)
00030 # else
00031 #  define LAUNCHER_EXPORT __declspec(dllimport)
00032 # endif
00033 #else
00034 # define LAUNCHER_EXPORT
00035 #endif
00036 
00037 // MESSAGES
00038 #define LAUNCHER_MESS_INIT(deb) std::cerr << deb
00039 #define LAUNCHER_MESS_BEGIN(deb) LAUNCHER_MESS_INIT(deb)<<__FILE__ <<" ["<<__LINE__<<"] : "
00040 #define LAUNCHER_MESS_END std::endl;
00041 #define LAUNCHER_INFOS(msg) {LAUNCHER_MESS_BEGIN("- Trace ") << msg << LAUNCHER_MESS_END}
00042 
00043 #if defined(_DEBUG_) || defined(_DEBUG)
00044 #define LAUNCHER_MESSAGE(msg) {LAUNCHER_MESS_BEGIN("- Trace ") << msg << LAUNCHER_MESS_END}
00045 #else /* ifdef _DEBUG_*/
00046 #define LAUNCHER_MESSAGE(msg) {}
00047 #endif /* ifdef _DEBUG_*/
00048 
00049 class LAUNCHER_EXPORT LauncherException
00050 {
00051 public:
00052   const std::string msg;
00053 
00054   LauncherException(const std::string m) : msg(m) {}
00055 };
00056 
00057 
00058 #endif