00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022 #ifndef PHY_EMPTY_HH_
00023 # define PHY_EMPTY_HH_
00024
00025 # include <wipal/phy/phy.hh>
00026
00027
00028 namespace phy
00029 {
00030 template <class B> struct empty_time;
00031 template <class B> struct empty_header;
00032 }
00033
00034
00035 namespace tool
00036 {
00037
00038 template <class B>
00039 struct types< phy::empty_time<B> >
00040 {
00041 struct impl_type {};
00042 };
00043
00044 template <class B>
00045 struct types< phy::empty_header<B> >
00046 {
00047 typedef phy::empty_time<bottom> time_type;
00048 };
00049
00050 }
00051
00052
00053 namespace phy
00054 {
00055
00056
00057
00058
00059
00066 template <class Bottom = tool::bottom>
00067 struct empty_time: WP_INHERIT(public time, empty_time<Bottom>)
00068 {
00070
00071 typedef WP_GET_EXACT(Bottom, empty_time<Bottom>) exact_type;
00072 typedef WP_TYPE(impl_type, exact_type) impl_type;
00073
00074 impl_type get_impl() const;
00075 exact_type& increment(tool::microseconds microseconds);
00077 };
00078
00079
00080
00081
00082
00083
00089 template <class Bottom = tool::bottom>
00090 struct empty_header: WP_INHERIT(public header, empty_header<Bottom>)
00091 {
00093
00094 typedef WP_GET_EXACT(Bottom, empty_header<Bottom>) exact_type;
00095 typedef WP_TYPE(time_type, exact_type) time_type;
00096
00097 size_t len_impl(size_t, bool) const;
00098 time_type time_get_impl(bool) const;
00099 void time_set_impl(const time_type&, bool);
00100
00101 template <class D1, class D2>
00102 static bool eq_time(const pcapxx::frame_descriptor<D1>& lhs,
00103 const pcapxx::frame_descriptor<D2>& rhs,
00104 const unsigned prec,
00105 const tool::endian::endianness phy_end);
00107 };
00108
00109 }
00110
00111 # include "empty.hxx"
00112
00113 #endif // ! PHY_EMPTY_HH_