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