00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030 #include "w_defines.h"
00031
00032
00033
00034 #ifdef __GNUG__
00035 #pragma implementation "tid_t.h"
00036 #endif
00037
00038 #include <w_stream.h>
00039 #include "basics.h"
00040 #include "tid_t.h"
00041
00042 const tid_t tid_t::null(0, 0);
00043 const tid_t tid_t::Max(tid_t::hwm, tid_t::hwm);
00044
00045 #ifdef EXPLICIT_TEMPLATE
00046 template class opaque_quantity<max_gtid_len>;
00047 template class opaque_quantity<max_server_handle_len>;
00048
00049 template ostream &operator<<(ostream &, const opaque_quantity<max_gtid_len> &);
00050 template bool operator==(const opaque_quantity<max_gtid_len> &,
00051 const opaque_quantity<max_gtid_len> &);
00052 template ostream &operator<<(ostream &, const opaque_quantity<max_server_handle_len> &);
00053 template bool operator==(const opaque_quantity<max_server_handle_len> &,
00054 const opaque_quantity<max_server_handle_len> &);
00055 #endif
00056
00057 #ifdef VCPP_BUG_3
00058
00059 bool operator==(const opaque_quantity<max_gtid_len> &l, const opaque_quantity <max_gtid_len> &r)
00060 {
00061 return ((l._length==r._length) &&
00062 (memcmp(l._opaque,r._opaque,l._length)==0));
00063 }
00064 bool operator==(const opaque_quantity<max_server_handle_len> &l, const opaque_quantity <max_server_handle_len> &r)
00065 {
00066 return ((l._length==r._length) &&
00067 (memcmp(l._opaque,r._opaque,l._length)==0));
00068 }
00069
00070 ostream &
00071 operator<<(ostream &o, const opaque_quantity<max_server_handle_len> &b)
00072 {
00073 return b.print(o);
00074 }
00075
00076 ostream &
00077 operator<<(ostream &o, const opaque_quantity<max_gtid_len> &b)
00078 {
00079 return b.print(o);
00080 }
00081
00082 #endif
00083