00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024 #ifndef __mess_h
00025 #define __mess_h
00026
00027 #include <utility>
00028
00029
00030 extern void pack (const char & __c);
00031
00032
00033 extern void pack (const float & __f, int __nitem = 1);
00034
00035
00036 extern void pack (const double & __d, int __nitem = 1);
00037
00038
00039 extern void pack (const int & __i, int __nitem = 1);
00040
00041
00042 extern void pack (const unsigned int & __ui, int __nitem = 1);
00043
00044
00045 extern void pack (const short & __sh, int __nitem = 1);
00046
00047
00048 extern void pack (const unsigned short & __ush, int __nitem = 1);
00049
00050
00051 extern void pack (const long & __l, int __nitem = 1);
00052
00053
00054 extern void pack (const unsigned long & __ul, int __nitem = 1);
00055
00056
00057 extern void pack (const char * __str);
00058
00059
00060 template <class T> void pack (const T * __ptr) {
00061
00062 pack ((unsigned long) __ptr);
00063 }
00064
00065
00066 template <class U, class V> void pack (const std :: pair <U, V> & __pair) {
00067
00068 pack (__pair.first);
00069 pack (__pair.second);
00070 }
00071
00072
00073
00074
00075 extern void unpack (char & __c);
00076
00077
00078 extern void unpack (float & __f, int __nitem = 1);
00079
00080
00081 extern void unpack (double & __d, int __nitem = 1);
00082
00083
00084 extern void unpack (int & __i, int __nitem = 1);
00085
00086
00087 extern void unpack (unsigned int & __ui, int __nitem = 1);
00088
00089
00090 extern void unpack (short & __sh, int __nitem = 1);
00091
00092
00093 extern void unpack (unsigned short & __ush, int __nitem = 1);
00094
00095
00096 extern void unpack (long & __l, int __nitem = 1);
00097
00098
00099 extern void unpack (unsigned long & __ul, int __nitem = 1);
00100
00101
00102 extern void unpack (char * __str);
00103
00104
00105 template <class T> void unpack (T * & __ptr) {
00106
00107 unsigned long p;
00108 unpack (p);
00109 __ptr = (T *) p;
00110 }
00111
00112
00113 template <class U, class V> void unpack (std :: pair <U, V> & __pair) {
00114
00115 unpack (__pair.first);
00116 unpack (__pair.second);
00117 }
00118
00119 #endif