MAK RTIspy API Documentation for HLA 1516
logicalTimeImplFloat.h
Go to the documentation of this file.
00001 /*******************************************************************************
00002 ** Copyright (c) 2005 MaK Technologies, Inc.
00003 ** All rights reserved.
00004 *******************************************************************************/
00005 /*******************************************************************************
00006 ** $RCSfile: logicalTimeImplFloat.h,v $ $Revision: 1.1 $ $State: Exp $
00007 *******************************************************************************/
00008 
00009 #ifndef RTI_LogicalTimeImplFloat_H_
00010 #define RTI_LogicalTimeImplFloat_H_
00011 
00012 #include <RTI/LogicalTime.h>
00013 #include <RTI/logicalTimeIntervalImplFloat.h>
00014 
00015 const std::wstring LogicalTimeImplFloatName(L"double");
00016 
00017 class RTI_EXPORT_FEDTIME LogicalTimeImplFloat : public rti1516::LogicalTime
00018 {
00019 public:
00020    static std::wstring theImplementationName;
00021 
00022 public:
00023    // Constructors
00024    LogicalTimeImplFloat();
00025    LogicalTimeImplFloat(double const & value);
00026    LogicalTimeImplFloat(rti1516::LogicalTime const & value);
00027    LogicalTimeImplFloat(LogicalTimeImplFloat const & value);
00028 
00029    // Destructor
00030    virtual ~LogicalTimeImplFloat()
00031    throw ();
00032 
00033    // Basic accessors/mutators
00034    virtual void setInitial();
00035    virtual bool isInitial() const;
00036 
00037    virtual void setFinal();
00038    virtual bool isFinal() const;
00039 
00040    // Assignment
00041    virtual rti1516::LogicalTime& operator= (rti1516::LogicalTime const & value)
00042       throw (
00043          rti1516::InvalidLogicalTime);
00044 
00045    virtual
00046    rti1516::LogicalTime&
00047    operator+= (rti1516::LogicalTimeInterval const & addend)
00048       throw (
00049          rti1516::IllegalTimeArithmetic,
00050          rti1516::InvalidLogicalTimeInterval);
00051 
00052    virtual
00053    rti1516::LogicalTime&
00054    operator-= (rti1516::LogicalTimeInterval const & subtrahend)
00055       throw (
00056          rti1516::IllegalTimeArithmetic,
00057          rti1516::InvalidLogicalTimeInterval);
00058 
00059    virtual
00060    bool
00061    operator> (rti1516::LogicalTime const & value) const
00062       throw (
00063          rti1516::InvalidLogicalTime);
00064 
00065    virtual
00066    bool
00067    operator< (rti1516::LogicalTime const & value) const
00068       throw (
00069          rti1516::InvalidLogicalTime);
00070 
00071    virtual
00072    bool
00073    operator== (rti1516::LogicalTime const & value) const
00074       throw (
00075          rti1516::InvalidLogicalTime);
00076 
00077    virtual
00078    bool
00079    operator>= (rti1516::LogicalTime const & value) const
00080       throw (
00081          rti1516::InvalidLogicalTime);
00082 
00083    virtual
00084    bool
00085    operator<= (rti1516::LogicalTime const & value) const
00086       throw (
00087          rti1516::InvalidLogicalTime);
00088 
00089    // Generates an encoded value that can be used to send
00090    // LogicalTimes to other federates in updates or interactions
00091    virtual rti1516::VariableLengthData encode() const;
00092 
00093    // Alternate encode for directly filling a buffer
00094    virtual unsigned long encodedLength() const;
00095    virtual unsigned long encode(void* buffer, unsigned long bufferSize) const
00096        throw (rti1516::CouldNotEncode);
00097 
00098    // Decode VariableLengthData into self
00099    virtual void decode(rti1516::VariableLengthData const & VariableLengthData)
00100       throw (
00101          rti1516::InternalError,
00102          rti1516::CouldNotDecode);
00103 
00104    // Alternate decode that reads directly from a buffer
00105    virtual void decode(void* buffer, unsigned long bufferSize)
00106       throw (
00107          rti1516::InternalError,
00108          rti1516::CouldNotDecode);
00109 
00110    virtual std::wstring toString() const;
00111 
00112    // Returns the name of the Implementation, as needed by
00113    // createFederationExecution.
00114    virtual std::wstring implementationName() const;
00115 
00116 public:
00117    //-----------------------------------------------------------------
00118    // Implementation functions
00119    //-----------------------------------------------------------------
00120    virtual double getTime() const;
00121 
00122    //-----------------------------------------------------------------
00123    // Implementation operators
00124    //-----------------------------------------------------------------
00125    virtual LogicalTimeImplFloat& operator= (const LogicalTimeImplFloat&)
00126    throw (rti1516::InvalidLogicalTime);
00127 
00128    virtual rti1516::LogicalTime& operator= (double const & value)
00129    throw (rti1516::InvalidLogicalTime);
00130 
00131    virtual rti1516::LogicalTime& operator+= (double const & value)
00132    throw (rti1516::InvalidLogicalTime);
00133 
00134    virtual rti1516::LogicalTime& operator-= (double const & value)
00135    throw (rti1516::InvalidLogicalTime);
00136 
00137    virtual bool operator== (double const & value) const
00138    throw (rti1516::InvalidLogicalTime);
00139 
00140    virtual bool operator!= (double const & value) const
00141    throw (rti1516::InvalidLogicalTime);
00142 
00143    virtual bool operator!= (rti1516::LogicalTime const & value) const
00144    throw (rti1516::InvalidLogicalTime);
00145 
00146    virtual bool operator> (double const & value) const
00147       throw (rti1516::InvalidLogicalTime);
00148 
00149    virtual bool operator< (double const & value) const
00150       throw (rti1516::InvalidLogicalTime);
00151 
00152    virtual bool operator>= (double const & value) const
00153       throw (rti1516::InvalidLogicalTime);
00154 
00155    virtual bool operator<= (double const & value) const
00156       throw (rti1516::InvalidLogicalTime);
00157 
00158    private:
00159 
00160    friend class LogicalTimeIntervalImplFloat;
00161 
00162    //-----------------------------------------------------------------
00163    // Implementation member variables
00164    //-----------------------------------------------------------------
00165    double myLogicalTime;
00166    double myZero;
00167    double myEpsilon;
00168    double myPositiveInfinity;
00169 };
00170 
00171 #endif // RTI_LogicalTimeImplFloat_H_
00172 

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)