Common/Util/IncludeEverywhere.h

Go to the documentation of this file.
00001 //-------------------------------------------------------------------
00004 //  Copyright (c) 2007 Celeritive Technologies, Inc.
00005 //
00006 // This library is free software; you can redistribute it and/or
00007 // modify it under the terms of the GNU Lesser General Public
00008 // License as published by the Free Software Foundation; either
00009 // version 2.1 of the License, or (at your option) any later version.
00010 //
00011 // This library 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 GNU
00014 // Lesser General Public License for more details.
00015 //
00016 // You should have received a copy of the GNU Lesser General Public
00017 // License along with this library; if not, write to the Free Software
00018 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
00019 //
00020 //-------------------------------------------------------------------
00021 
00022 #pragma once
00023 #ifndef VOLUMILL_INCLUDEEVERYWHERE_H
00024 #define VOLUMILL_INCLUDEEVERYWHERE_H
00025 
00026 #include <boost/shared_ptr.hpp>
00027 using boost::shared_ptr;
00028 #include <vector>
00029 #include <math.h>
00030 #include <Util/Validate.h>
00031 
00032 #ifdef WIN32
00033 #pragma warning (push)
00034 #pragma warning (disable : 4267)
00035 #endif
00036 #include <boost/archive/xml_iarchive.hpp>
00037 #include <boost/archive/xml_oarchive.hpp>
00038 #include <boost/archive/binary_iarchive.hpp>
00039 #include <boost/archive/binary_oarchive.hpp>
00040 #include <boost/serialization/is_abstract.hpp>
00041 #include <boost/serialization/nvp.hpp>
00042 #include <boost/serialization/base_object.hpp>
00043 #ifdef WIN32
00044 #pragma warning (pop)
00045 #endif
00046 
00047 #ifdef WIN32
00048 #define Clearfp() _clearfp()
00049 #else
00050 #include <fenv.h>
00051 static inline unsigned int Clearfp(void)
00052 {
00053         int ret = fetestexcept(FE_ALL_EXCEPT);
00054         feclearexcept(FE_ALL_EXCEPT);
00055         return ret;
00056 }
00057 #endif
00058 
00060 #ifdef WIN32
00061 #define OUT_EDGE_ITERATORS_EQUAL(x,y) boost::iterator_core_access::equal(x, y, boost::mpl::true_())
00062 #else
00063 #define OUT_EDGE_ITERATORS_EQUAL(x,y) (x == y)
00064 #endif
00065 
00066 namespace util
00067 {
00068    const double doubleEps = 1e-8;
00069    const double intersectionEps = 1e-6;
00070    const double pointResolution = 1e-5;
00071    const double pi = 3.141592653589793238462643383279;
00072 
00073    template<class T>
00074    inline void assignPtr (T* pT, const T& value)
00075    {
00076       if (pT)
00077          *pT = value;
00078    }
00079 
00080    template<class T>
00081    inline void ignoreUnusedVariableWarning (const T&) {}
00082 
00083    void sleep (int numSec);
00084 }
00085 
00086 #endif

Generated on Tue Jan 29 21:37:56 2008 for VoluMill Universal Client by  doxygen 1.4.6