TalosHeader.hxx

00001 // Copyright (C) 2004-2008, Vivien Mallet
00002 //
00003 // This file is part of Talos library, which provides miscellaneous tools to
00004 // make up for C++ lacks and to ease C++ programming.
00005 //
00006 // Talos is free software; you can redistribute it and/or modify it under the
00007 // terms of the GNU General Public License as published by the Free Software
00008 // Foundation; either version 2 of the License, or (at your option) any later
00009 // version.
00010 //
00011 // Talos is distributed in the hope that it will be useful, but WITHOUT ANY
00012 // WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
00013 // FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
00014 // details.
00015 //
00016 // For more information, visit the Talos home page:
00017 //     http://vivienmallet.net/lib/talos/
00018 
00019 
00020 #ifndef TALOS_FILE_TALOSHEADER_HXX
00021 
00022 namespace Talos
00023 {
00024 }
00025 
00026 #include <iostream>
00027 #include <exception>
00028 
00029 
00031 #ifndef ERR
00032 #define ERR(x) std::cout << "Hermes - " #x << std::endl
00033 #endif
00035 #ifndef DISP
00036 #define DISP(x) std::cout << #x ": " << (x) << std::endl
00037 #endif
00038 
00039 #ifdef TRY
00040 #undef TRY
00041 #endif
00042 #define TRY try                                 \
00043     {
00044 
00045 #ifdef END
00046 #undef END
00047 #endif
00048 #define END                                                     \
00049   }                                                             \
00050     catch (std::exception& Err)                                 \
00051       {                                                         \
00052         cout << "C++ exception: " << Err.what() << endl;        \
00053         return 1;                                               \
00054       }                                                         \
00055     catch (std::string& str)                                    \
00056       {                                                         \
00057         cout << str << endl;                                    \
00058         return 1;                                               \
00059       }                                                         \
00060     catch (const char* str)                                     \
00061       {                                                         \
00062         cout << str << endl;                                    \
00063         return 1;                                               \
00064       }                                                         \
00065     catch(...)                                                  \
00066       {                                                         \
00067         cout << "Unknown exception..." << endl;                 \
00068         return 1;                                               \
00069       }
00070 
00071 #include "String.hxx"
00072 #include "Date.hxx"
00073 #include "Files.hxx"
00074 
00075 #define TALOS_FILE_TALOSHEADER_HXX
00076 #endif

Generated on Mon Nov 17 18:20:41 2008 for Talos by  doxygen 1.5.1