00001
00002
00003
00004
00005
00006
00007
00008 #ifndef IMP_BASE_TYPES_H
00009 #define IMP_BASE_TYPES_H
00010
00011 #define IMP_NUM_INLINE 5
00012
00013 #include "kernel_config.h"
00014 #include "Key.h"
00015
00016 #include <boost/version.hpp>
00017 #include <string>
00018 #include <vector>
00019
00020 IMP_BEGIN_NAMESPACE
00021
00022
00023
00024
00025
00026 typedef double Float;
00027
00028
00029 typedef std::pair<double, double> DerivativePair;
00030
00031
00032 typedef std::pair<Float, Float> FloatRange;
00033
00034
00035 typedef int Int;
00036
00037 typedef std::pair<Int, Int> IntRange;
00038 typedef std::vector<IntRange> IntRanges;
00039
00040
00041 typedef std::string String;
00042
00043
00044
00045 typedef std::vector<Float> Floats;
00046
00047 typedef std::vector<Int> Ints;
00048
00049 typedef std::vector<String> Strings;
00050
00051
00052
00053
00054
00055
00056
00057
00058
00059
00060 IMP_DECLARE_KEY_TYPE(FloatKey, 0);
00061
00062 IMP_DECLARE_KEY_TYPE(IntKey, 1);
00063
00064 IMP_DECLARE_KEY_TYPE(StringKey, 2);
00065
00066 IMP_DECLARE_KEY_TYPE(ParticleKey, 3);
00067
00068 IMP_DECLARE_KEY_TYPE(ObjectKey, 4);
00069
00070
00071
00072 #if !defined(IMP_DOXYGEN) && !defined(SWIG)
00073 inline void show(std::ostream &out, int i) {
00074 out << i;
00075 }
00076
00077 inline void show(std::ostream &out, unsigned int i) {
00078 out << i;
00079 }
00080
00081 inline void show(std::ostream &out, std::string i) {
00082 out << i;
00083 }
00084
00085 inline void show(std::ostream &out, double i) {
00086 out << i;
00087 }
00088 template <class T>
00089 inline void show(std::ostream &out, const T& i) {
00090 out << i;
00091 }
00092 template <class T>
00093 inline void show(std::ostream &out, const T*i) {
00094 out << i->get_name();
00095 }
00096 template <class T>
00097 inline void show(std::ostream &out, T*i) {
00098 out << i->get_name();
00099 }
00100 #endif
00101
00102 #ifndef SWIG
00103 #if IMP_BOOST_VERSION != BOOST_VERSION
00104 BOOST_STATIC_ASSERT(0
00105 && "The boost version IMP is built with must match the current one.");
00106 #endif
00107 #endif
00108
00109 IMP_END_NAMESPACE
00110
00111 #endif