XdkWrl: sftime.h Source File

Home | Hierarchy | Members | Alphabetical | Related Pages

# sftime.h

Go to the documentation of this file.

    00001 #ifndef XDKWRL_SFTIME_H
    00002 #define XDKWRL_SFTIME_H
    00003
    00004 #include <xdkwrl/config.h>
    00005 #include <xdkwrl/fieldtypes.h>
    00006 #include <iostream>
    00007
    00008 namespace wrl
    00009 {
    00010   //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    00011   // Interface of SFTime
    00012   //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    00013   /*! \ingroup fieldtypes
    00014    *
    00015    * Represents a time value as a (float) number of seconds. Below is
    00016    * included the documentation for this field type from the ISO standard.
    00017    * \htmlinclude sftime.html
    00018    */
    00019   class XDKWRL_EXPORT SFTime
    00020   {
    00021   public:
    00022     inline SFTime();
    00023     inline SFTime(const double b);
    00024     inline double nbSeconds() const;
    00025     inline void setNbSeconds(const double n);
    00026     static inline const char* typeName();
    00027     static inline FieldTypeId typeId();
    00028     inline bool operator==(const SFTime& t) const;
    00029     friend std::ostream& operator<<(std::ostream& s,const SFTime& t);
    00030   protected:
    00031   private:
    00032     long double value_;
    00033   };
    00034   //************************************************************
    00035   // Implementation of SFTime
    00036   //************************************************************
    00037   /*!
    00038    * Creates a SFTime with default value 0.0f.
    00039    */
    00040   inline
    00041   SFTime::SFTime()
    00042     : value_(0)
    00043   {
    00044   }
    00045   inline
    00046   SFTime::SFTime(const double b)
    00047     : value_(b)
    00048   {
    00049   }
    00050   inline double
    00051   SFTime::nbSeconds() const
    00052   {
    00053     return value_;
    00054   }
    00055   inline void
    00056   SFTime::setNbSeconds(const double n)
    00057   {
    00058     value_ = n;
    00059   }
    00060   inline const char*
    00061   SFTime::typeName()
    00062   {
    00063     return "SFTime";
    00064   }
    00065   inline FieldTypeId
    00066   SFTime::typeId()
    00067   {
    00068     return sfTime;
    00069   }
    00070   inline bool
    00071   SFTime::operator==(const SFTime& t) const
    00072   {
    00073     return value_ == t.value_;
    00074   }
    00075 };
    00076
    00077 #endif // XDKWRL_SFTIME_H

Generated on 5 Jan 2007 with version 1.5.1. |