00001 #ifndef XDKWRL_SFTIME_H
00002 #define XDKWRL_SFTIME_H
00003
00004 #include <xdkwrl/fieldtypes.h>
00005 #include <iostream>
00006
00007 namespace wrl
00008 {
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018 class SFTime
00019 {
00020 public:
00021 inline SFTime();
00022 inline SFTime(const double b);
00023 inline double nbSeconds() const;
00024 inline void setNbSeconds(const double n);
00025 static inline const char* typeName();
00026 static inline FieldTypeId typeId();
00027 inline bool operator==(const SFTime& t) const;
00028 friend std::ostream& operator<<(std::ostream& s,const SFTime& t);
00029 protected:
00030 private:
00031 long double value_;
00032 };
00033
00034
00035
00036
00037
00038
00039 inline
00040 SFTime::SFTime()
00041 : value_(0)
00042 {
00043 }
00044 inline
00045 SFTime::SFTime(const double b)
00046 : value_(b)
00047 {
00048 }
00049 inline double
00050 SFTime::nbSeconds() const
00051 {
00052 return value_;
00053 }
00054 inline void
00055 SFTime::setNbSeconds(const double n)
00056 {
00057 value_ = n;
00058 }
00059 inline const char*
00060 SFTime::typeName()
00061 {
00062 return "SFTime";
00063 }
00064 inline FieldTypeId
00065 SFTime::typeId()
00066 {
00067 return sfTime;
00068 }
00069 inline bool
00070 SFTime::operator==(const SFTime& t) const
00071 {
00072 return value_ == t.value_;
00073 }
00074 inline std::ostream& operator<<(std::ostream& s,const SFTime& t)
00075 {
00076 return s<<t.value_;
00077 }
00078 };
00079
00080 #endif // XDKWRL_SFTIME_H