00001 /* SimData: Data Infrastructure for Simulations 00002 * Copyright (C) 2002 Mark Rose <tm2@stm.lbl.gov> 00003 * 00004 * This file is part of SimData. 00005 * 00006 * This program is free software; you can redistribute it and/or 00007 * modify it under the terms of the GNU General Public License 00008 * as published by the Free Software Foundation; either version 2 00009 * of the License, or (at your option) any later version. 00010 * 00011 * This program is distributed in the hope that it will be useful, 00012 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00013 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00014 * GNU General Public License for more details. 00015 * 00016 * You should have received a copy of the GNU General Public License 00017 * along with this program; if not, write to the Free Software 00018 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 00019 */ 00020 00021 00031 #ifndef __SIMDATA_PTS_H__ 00032 #define __SIMDATA_PTS_H__ 00033 00034 #include <SimData/Namespace.h> 00035 00036 00037 // is partial template specialization supported? 00038 #if defined(_MSC_VER) && (_MSC_VER <= 1300) 00039 #define __SIMDATA_PTS_SIM 00040 #endif 00041 00042 00043 NAMESPACE_SIMDATA 00044 00045 00048 namespace meta { 00049 00050 struct SelectThen 00051 { template<class Then, class Else> 00052 struct Result { typedef Then RET; }; 00053 }; 00054 00055 struct SelectElse 00056 { template<class Then, class Else> 00057 struct Result { typedef Else RET; }; 00058 }; 00059 00060 template<bool Condition> 00061 struct Selector { typedef SelectThen RET; }; 00062 00063 template<> 00064 struct Selector<false> { typedef SelectElse RET; }; 00065 00066 template<bool Condition, class Then, class Else> 00067 struct IF 00068 { typedef typename Selector<Condition>::RET select; 00069 typedef typename select::Result<Then,Else>::RET RET; 00070 }; 00071 00072 } // meta 00073 00074 00075 NAMESPACE_SIMDATA_END 00076 00077 #endif // __SIMDATA_PTS_H__ 00078 00079
|
SimData version pre-0.4.0. For more information on SimData, visit the SimData Homepage. Generated on Tue Oct 14 12:06:39 2003, using Doxygen 1.2.18. |