SeldonData.hxx

00001 // Copyright (C) 2003-2007, Vivien Mallet
00002 //
00003 // This file is part of SeldonData library, used for data processing.
00004 //
00005 // SeldonData is free software; you can redistribute it and/or modify it under
00006 // the terms of the GNU General Public License as published by the Free
00007 // Software Foundation; either version 2 of the License, or (at your option)
00008 // any later version.
00009 //
00010 // SeldonData is distributed in the hope that it will be useful, but WITHOUT
00011 // ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
00012 // FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
00013 // more details.
00014 //
00015 // For more information, visit the SeldonData home page:
00016 //      http://vivienmallet.net/lib/seldondata/
00017 
00018 #ifndef FILE_SELDONDATA_SELDONDATA_HXX
00019 
00020 // Blitz++.
00021 #include <blitz/array.h>
00022 using namespace blitz;
00023 
00024 // Talos.
00025 #include <Talos.hxx>
00026 using namespace Talos;
00027 
00028 #include <string>
00029 #include <sstream>
00030 #include <exception>
00031 #include <stdexcept>
00032 
00034 namespace SeldonData
00035 {
00036 }
00037 
00038 
00040 // DEBUG LEVELS //
00042 
00043 #ifdef SELDONDATA_DEBUG_LEVEL_4
00044 #ifndef SELDONDATA_DEBUG_LEVEL_3
00045 #define SELDONDATA_DEBUG_LEVEL_3
00046 #endif
00047 #endif
00048 
00049 #ifdef SELDONDATA_DEBUG_LEVEL_3
00050 #ifndef SELDONDATA_DEBUG_CHECK_INDICES
00051 #define SELDONDATA_DEBUG_CHECK_INDICES
00052 #endif
00053 #ifndef SELDONDATA_DEBUG_LEVEL_2
00054 #define SELDONDATA_DEBUG_LEVEL_2
00055 #endif
00056 #endif
00057 
00058 #ifdef SELDONDATA_DEBUG_LEVEL_2
00059 #ifndef SELDONDATA_DEBUG_CHECK_DIMENSIONS
00060 #define SELDONDATA_DEBUG_CHECK_DIMENSIONS
00061 #endif
00062 #ifndef SELDONDATA_DEBUG_LEVEL_1
00063 #define SELDONDATA_DEBUG_LEVEL_1
00064 #endif
00065 #endif
00066 
00067 #ifdef SELDONDATA_DEBUG_LEVEL_1
00068 #ifndef SELDONDATA_DEBUG_CHECK_MEMORY
00069 #define SELDONDATA_DEBUG_CHECK_MEMORY
00070 #endif
00071 #ifndef SELDONDATA_DEBUG_CHECK_IO
00072 #define SELDONDATA_DEBUG_CHECK_IO
00073 #endif
00074 #ifndef SELDONDATA_DEBUG_LEVEL_0
00075 #define SELDONDATA_DEBUG_LEVEL_0
00076 #endif
00077 #endif
00078 
00079 
00080 #include "Errors.hxx"
00081 
00082 
00084 // MACROS //
00086 
00088 
00105 #ifdef TRY
00106 #undef TRY
00107 #endif
00108 #define TRY try\
00109 {
00110 
00111 #ifdef END
00112 #undef END
00113 #endif
00114 #define END \
00115 }\
00116 catch(SeldonData::Error& Err)\
00117 {\
00118 Err.What();\
00119 return 1;\
00120 }\
00121 catch (std::exception& Err)\
00122 {\
00123 cout << "C++ exception: " << Err.what() << endl;\
00124 return 1;\
00125 }\
00126 catch (std::string& str)\
00127 {\
00128 cout << str << endl;\
00129 return 1;\
00130 }\
00131 catch (const char* str)\
00132 {\
00133 cout << str << endl;\
00134 return 1;\
00135 }\
00136 catch(...)\
00137 {\
00138 cout << "Unknown error..." <<endl;\
00139 return 1;\
00140 }
00141 
00142 // To get 'min' and 'max' functions.
00143 #include <algorithm>
00144 
00145 #include "Function.hxx"
00146 #include "Grid.cxx"
00147 #include "Data.cxx"
00148 #include "Format.cxx"
00149 #include "Functions.cxx"
00150 
00151 #define FILE_SELDONDATA_SELDONDATA_HXX
00152 #endif

Generated on Wed May 21 16:28:04 2008 for SeldonData by  doxygen 1.5.1