diff options
Diffstat (limited to 'CIAO/connectors/dds4ccm/impl/ndds/Time_t.h')
-rw-r--r-- | CIAO/connectors/dds4ccm/impl/ndds/Time_t.h | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/CIAO/connectors/dds4ccm/impl/ndds/Time_t.h b/CIAO/connectors/dds4ccm/impl/ndds/Time_t.h new file mode 100644 index 00000000000..a78b01a4058 --- /dev/null +++ b/CIAO/connectors/dds4ccm/impl/ndds/Time_t.h @@ -0,0 +1,41 @@ +/** + * @author William R. Otte <wotte@dre.vanderbilt.edu> + * @author Johnny Willemsen <jwillemsen@remedy.nl> + * + * $Id$ + * + * Wrapper facade for NDDS. + */ + +#ifndef DDS4CCM_TIME_T_H +#define DDS4CCM_TIME_T_H + +#if defined (CIAO_DDS4CCM_OPENDDS) && (CIAO_DDS4CCM_OPENDDS==1) +typedef ::DDS::Time_t DDS_Time_t; +#endif + +#if defined (CIAO_DDS4CCM_NDDS) && (CIAO_DDS4CCM_NDDS==1) +inline void +operator<<= (::DDS::Time_t &ddstime, const ::DDS_Time_t & time) +{ + ddstime.sec = time.sec; + ddstime.nanosec = time.nanosec; +} + +inline void +operator<<= (::DDS_Time_t &ddstime, const ::DDS::Time_t & time) +{ + ddstime.sec = time.sec; + ddstime.nanosec = time.nanosec; +} + +inline void +operator>>= (const ::DDS_Time_t &time, ::DDS::Time_t & ddstime) +{ + ddstime.sec = time.sec; + ddstime.nanosec = time.nanosec; +} +#endif + +#endif /* DDS4CCM_TIME_T_H */ + |