MAK RTIspy API Documentation for HLA Evolved
HLAfloat64Time.h
Go to the documentation of this file.
00001 /***********************************************************************
00002    The IEEE hereby grants a general, royalty-free license to copy, distribute,
00003    display and make derivative works from this material, for all purposes,
00004    provided that any use of the material contains the following
00005    attribution: "Reprinted with permission from IEEE 1516.1(TM)-2010".
00006    Should you require additional information, contact the Manager, Standards
00007    Intellectual Property, IEEE Standards Association (stds-ipr@ieee.org).
00008 ***********************************************************************/
00009 /***********************************************************************
00010    IEEE 1516.1 High Level Architecture Interface Specification C++ API
00011    File: RTI/time/HLAfloat64Time.h
00012 ***********************************************************************/
00013 
00014 #ifndef RTI_HLAfloat64Time_H_
00015 #define RTI_HLAfloat64Time_H_
00016 
00017 #include <RTI/LogicalTime.h>
00018 #include <RTI/time/HLAfloat64Interval.h>
00019 
00020 namespace rti1516e
00021 {
00022    class HLAfloat64TimeImpl;
00023 
00024    class RTI_EXPORT HLAfloat64Time : public rti1516e::LogicalTime
00025    {
00026    public:
00027       // Constructors
00028       HLAfloat64Time ();
00029 
00030       HLAfloat64Time (
00031          double const & value);
00032 
00033       HLAfloat64Time (
00034          rti1516e::LogicalTime const & value);
00035 
00036       HLAfloat64Time (
00037          HLAfloat64Time const & value);
00038 
00039       // Destructor
00040       virtual ~HLAfloat64Time ()
00041          throw ();
00042 
00043       // Basic accessors/mutators
00044       virtual void setInitial ();
00045 
00046       virtual bool isInitial () const;
00047 
00048       virtual void setFinal ();
00049 
00050       virtual bool isFinal () const;
00051 
00052       // Assignment
00053       virtual rti1516e::LogicalTime& operator= (
00054          rti1516e::LogicalTime const & value)
00055          throw (rti1516e::InvalidLogicalTime);
00056 
00057       // Operators
00058 
00059       virtual rti1516e::LogicalTime& operator+= (
00060          rti1516e::LogicalTimeInterval const & addend)
00061          throw (rti1516e::IllegalTimeArithmetic,
00062                 rti1516e::InvalidLogicalTimeInterval);
00063 
00064       virtual rti1516e::LogicalTime& operator-= (
00065          rti1516e::LogicalTimeInterval const & subtrahend)
00066          throw (rti1516e::IllegalTimeArithmetic,
00067                 rti1516e::InvalidLogicalTimeInterval);
00068 
00069       virtual bool operator> (
00070          rti1516e::LogicalTime const & value) const
00071          throw (rti1516e::InvalidLogicalTime);
00072 
00073       virtual bool operator< (
00074          rti1516e::LogicalTime const & value) const
00075          throw (rti1516e::InvalidLogicalTime);
00076 
00077       virtual bool operator== (
00078          rti1516e::LogicalTime const & value) const
00079          throw (rti1516e::InvalidLogicalTime);
00080 
00081       virtual bool operator>= (
00082          rti1516e::LogicalTime const & value) const
00083          throw (rti1516e::InvalidLogicalTime);
00084 
00085       virtual bool operator<= (
00086          rti1516e::LogicalTime const & value) const
00087          throw (rti1516e::InvalidLogicalTime);
00088 
00089       // Generates an encoded value that can be used to send
00090       // LogicalTimes to other federates in updates or interactions
00091       virtual rti1516e::VariableLengthData encode() const;
00092 
00093       // Alternate encode for directly filling a buffer
00094       virtual size_t encode (
00095          void* buffer,
00096          size_t bufferSize) const
00097          throw (rti1516e::CouldNotEncode);
00098 
00099       // The length of the encoded data
00100       virtual size_t encodedLength () const;
00101 
00102       // Decode VariableLengthData into self
00103       virtual void decode (
00104          rti1516e::VariableLengthData const & VariableLengthData)
00105          throw (rti1516e::InternalError,
00106                 rti1516e::CouldNotDecode);
00107 
00108       // Alternate decode that reads directly from a buffer
00109       virtual void decode (
00110          void* buffer,
00111          size_t bufferSize)
00112          throw (rti1516e::InternalError,
00113                 rti1516e::CouldNotDecode);
00114 
00115       // Diagnostic string representation of time
00116       virtual std::wstring toString () const;
00117 
00118       // Return the name of the Implementation, as needed by
00119       // createFederationExecution.
00120       virtual std::wstring implementationName() const;
00121 
00122    public:
00123       //-----------------------------------------------------------------
00124       // Implementation methods
00125       //-----------------------------------------------------------------
00126       virtual double getTime () const;
00127 
00128       virtual void setTime (
00129          double value);
00130 
00131       //-----------------------------------------------------------------
00132       // Implementation operators
00133       //-----------------------------------------------------------------
00134       virtual HLAfloat64Time& operator= (
00135          const HLAfloat64Time&)
00136          throw (rti1516e::InvalidLogicalTime);
00137 
00138       operator double() const;
00139 
00140    private:
00141 
00142       //-----------------------------------------------------------------
00143       // Interval implementation must have access to time implementation
00144       // in order to calculate difference
00145       //-----------------------------------------------------------------
00146       friend class HLAfloat64Interval;
00147 
00148       //-----------------------------------------------------------------
00149       // Pointer to internal implementation
00150       //-----------------------------------------------------------------
00151       HLAfloat64TimeImpl* _impl;
00152    };
00153 }
00154 
00155 #endif // RTI_HLAfloat64Time_H_
00156 

Document ID: Generated on Thu Jun 14 14:15:04 EDT 2012 from SVN revision 116116
Copyright © 2005-2012 VT MÄK Inc. All Rights Reserved (www.mak.com)