TAO_UTO.h

Go to the documentation of this file.
00001 // -*- C++ -*-
00002 
00003 //=============================================================================
00004 /**
00005  *  @file    TAO_UTO.h
00006  *
00007  *  $Id: TAO_UTO.h 77001 2007-02-12 07:54:49Z johnnyw $
00008  *
00009  *  This class implements the CosTime::UTO IDL interface.
00010  *
00011  *
00012  *  @author Vishal Kachroo  <vishal@cs.wustl.edu>
00013  */
00014 //=============================================================================
00015 
00016 
00017 #ifndef TAO_UTO_H
00018 #define TAO_UTO_H
00019 #include /**/ "ace/pre.h"
00020 
00021 #include "orbsvcs/TimeServiceS.h"
00022 #include "orbsvcs/Time/time_export.h"
00023 
00024 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
00025 
00026 /**
00027  * @class TAO_UTO
00028  *
00029  * @brief Universal Time Object Implementation.
00030  *
00031  * This is an encapsulation of the time. It provides the following
00032  * operations on basic time.
00033  * - Construction of a UTO from piece parts, and extraction of the
00034  * piece parts from a UTO. The piece parts are the readonly
00035  * attributes :
00036  * time
00037  * inaccuracy
00038  * time displacement factor
00039  * structure with all the above.
00040  * - Comparison of time.
00041  * - Conversion from relative to absolute time, and conversion to
00042  * an interval (TIO).
00043  */
00044 class TAO_Time_Export TAO_UTO : public POA_CosTime::UTO
00045 {
00046 public:
00047   // = Initialization and termination methods.
00048   /// Constructor.
00049   TAO_UTO (TimeBase::TimeT time,
00050            TimeBase::InaccuracyT inaccuracy,
00051            TimeBase::TdfT tdf);
00052 
00053   /// Destructor.
00054   ~TAO_UTO (void);
00055 
00056   /// For the readonly attribute <time>.
00057   virtual TimeBase::TimeT time ();
00058 
00059   /// For the readonly attribute <inaccuracy>.
00060   virtual TimeBase::InaccuracyT  inaccuracy (void);
00061 
00062   /// For the readonly attribute <tdf>, which is the "time displacement
00063   /// factor".
00064   virtual TimeBase::TdfT tdf (void);
00065 
00066   /// For the readonly attribute <utc_time>.
00067   virtual TimeBase::UtcT utc_time (void);
00068 
00069   /**
00070    * Absolute time = Relative time + Base time.
00071    * ?? Find out more about the Base Time, UTC and
00072    *    Distributed Time Sync. Algos. [3
00073    */
00074   CosTime::UTO_ptr absolute_time (void);
00075 
00076   /// Compares the time contained in the object with the time in the
00077   /// supplied uto according to the supplied comparison type.
00078   CosTime::TimeComparison compare_time (CosTime::ComparisonType comparison_type,
00079                                         CosTime::UTO_ptr uto);
00080 
00081   /**
00082    * Returns a TIO representing the time interval between the time in
00083    * the object and the time in the UTO passed as a parameter. The
00084    * interval returned is the interval between the mid-points of the
00085    * two UTOs. Inaccuracies are ignored.  Note the result of this
00086    * operation is meaningless if the base times of UTOs are different.
00087    */
00088   CosTime::TIO_ptr time_to_interval (CosTime::UTO_ptr);
00089 
00090   /// Returns a TIO object representing the error interval around the
00091   /// time value in the UTO.
00092   CosTime::TIO_ptr interval (void);
00093 
00094 private:
00095   /**
00096    * The readonly attribute structure having the time, inaccuracy and
00097    * displacement.  The get methods for other readonly attributes
00098    * (time, inaccuracy, tdf) defined in the IDL use the members of
00099    * this structure and hence need not have separate member variables
00100    * for them.
00101    */
00102   TimeBase::UtcT attr_utc_time_;
00103 };
00104 
00105 TAO_END_VERSIONED_NAMESPACE_DECL
00106 
00107 #include /**/ "ace/post.h"
00108 #endif /* TAO_UTO_H */

Generated on Tue Feb 2 17:49:17 2010 for TAO_CosTime by  doxygen 1.4.7